make electrified thing stainable

This commit is contained in:
Haze Weathers 2023-09-14 21:37:48 -04:00
parent 0aa328fb59
commit 9ff570e869

View file

@ -111,15 +111,19 @@ float snoise(vec3 v) {
void fragment() { void fragment() {
if (AT_LIGHT_PASS) {
COLOR = vec4(1.0, 1.0, 1.0, COLOR.a);
} else {
vec4 tex_color = texture(TEXTURE, UV); vec4 tex_color = texture(TEXTURE, UV);
tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / (gamma + sin(TIME * flash_rate) * flash_intensity))); tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / (gamma + sin(TIME * flash_rate) * flash_intensity)));
// tex_color.rgb = pow(tex_color.rgb, vec3(0.5 + sin(TIME * 20.0) * 0.1)); // tex_color.rgb = pow(tex_color.rgb, vec3(0.5 + sin(TIME * 20.0) * 0.1));
// tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / 2.0)); // tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / 2.0));
// tex_color.rgb += (round(sin(TIME * 20.0) * 4.0)) * 0.25 * 0.05; // tex_color.rgb += (round(sin(TIME * 20.0) * 4.0)) * 0.25 * 0.05;
float n = snoise(vec3(SCREEN_UV / SCREEN_PIXEL_SIZE / arc_scale, floor(TIME * arc_fps) * arc_speed / arc_fps)); float n = snoise(vec3(SCREEN_UV / SCREEN_PIXEL_SIZE / arc_scale, floor(TIME * arc_fps) * arc_speed / arc_fps));
n = step(abs(n), arc_threshold); n = step(abs(n), arc_threshold);
COLOR = vec4(mix(tex_color.rgb, arc_color.rgb, n * arc_color.a), tex_color.a); COLOR = vec4(mix(tex_color.rgb, arc_color.rgb, n * arc_color.a), tex_color.a);
// float worley = worley(SCREEN_UV, 128.0, 96.0); // float worley = worley(SCREEN_UV, 128.0, 96.0);
// vec4 tex_color = texture(TEXTURE, UV); // vec4 tex_color = texture(TEXTURE, UV);
// COLOR = vec4(mix(vec3(1.0, 1.0, 0.2), tex_color.rgb, step(worley, 0.5)), tex_color.a); // COLOR = vec4(mix(vec3(1.0, 1.0, 0.2), tex_color.rgb, step(worley, 0.5)), tex_color.a);
}
} }