forked from team-sg/hero-mark-2
make electrified thing stainable
This commit is contained in:
parent
0aa328fb59
commit
9ff570e869
1 changed files with 15 additions and 11 deletions
|
@ -111,15 +111,19 @@ float snoise(vec3 v) {
|
||||||
|
|
||||||
|
|
||||||
void fragment() {
|
void fragment() {
|
||||||
vec4 tex_color = texture(TEXTURE, UV);
|
if (AT_LIGHT_PASS) {
|
||||||
tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / (gamma + sin(TIME * flash_rate) * flash_intensity)));
|
COLOR = vec4(1.0, 1.0, 1.0, COLOR.a);
|
||||||
// tex_color.rgb = pow(tex_color.rgb, vec3(0.5 + sin(TIME * 20.0) * 0.1));
|
} else {
|
||||||
// tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / 2.0));
|
vec4 tex_color = texture(TEXTURE, UV);
|
||||||
// tex_color.rgb += (round(sin(TIME * 20.0) * 4.0)) * 0.25 * 0.05;
|
tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / (gamma + sin(TIME * flash_rate) * flash_intensity)));
|
||||||
float n = snoise(vec3(SCREEN_UV / SCREEN_PIXEL_SIZE / arc_scale, floor(TIME * arc_fps) * arc_speed / arc_fps));
|
// tex_color.rgb = pow(tex_color.rgb, vec3(0.5 + sin(TIME * 20.0) * 0.1));
|
||||||
n = step(abs(n), arc_threshold);
|
// tex_color.rgb = pow(tex_color.rgb, vec3(1.0 / 2.0));
|
||||||
COLOR = vec4(mix(tex_color.rgb, arc_color.rgb, n * arc_color.a), tex_color.a);
|
// tex_color.rgb += (round(sin(TIME * 20.0) * 4.0)) * 0.25 * 0.05;
|
||||||
// float worley = worley(SCREEN_UV, 128.0, 96.0);
|
float n = snoise(vec3(SCREEN_UV / SCREEN_PIXEL_SIZE / arc_scale, floor(TIME * arc_fps) * arc_speed / arc_fps));
|
||||||
// vec4 tex_color = texture(TEXTURE, UV);
|
n = step(abs(n), arc_threshold);
|
||||||
// COLOR = vec4(mix(vec3(1.0, 1.0, 0.2), tex_color.rgb, step(worley, 0.5)), 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);
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue