diff --git a/shaders/electricity.gdshader b/shaders/electricity.gdshader index 9f236b4..625d032 100644 --- a/shaders/electricity.gdshader +++ b/shaders/electricity.gdshader @@ -10,6 +10,7 @@ uniform vec4 arc_color : hint_color = vec4(1.0, 0.93, 0.0, 1.0); uniform float gamma = 2.0; uniform float flash_rate = 3.0; uniform float flash_intensity = 0.2; +uniform vec4 background_color : hint_color = vec4(0.0, 0.0, 0.0, 0.0); // Description : Array and textureless GLSL 2D/3D/4D simplex // noise functions. @@ -118,6 +119,7 @@ void fragment() { } else { vec4 tex_color = texture(TEXTURE, UV); tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / (gamma + sin(fract(TIME * floor(flash_rate)) * TAU) * flash_intensity))); + tex_color.rgb = mix(tex_color.rgb, background_color.rgb, background_color.a); // 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 += (round(sin(TIME * 20.0) * 4.0)) * 0.25 * 0.05;