ability to set background color in electricity shader
This commit is contained in:
parent
79294c0098
commit
7cf99cb510
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue