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,6 +111,9 @@ 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));
@ -123,3 +126,4 @@ void fragment() {
// 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);
} }
}