add test effects: grayscale and negative
This commit is contained in:
parent
ba170035ef
commit
5678700826
5
res/shaders/effects/grayscale.glsl
Normal file
5
res/shaders/effects/grayscale.glsl
Normal file
@ -0,0 +1,5 @@
|
||||
vec4 effect() {
|
||||
vec3 color = texture(u_screen, v_uv).rgb;
|
||||
float m = (color.r + color.g + color.b) / 3.0;
|
||||
return vec4(mix(color, vec3(m), u_intensity), 1.0);
|
||||
}
|
||||
6
res/shaders/effects/negative.glsl
Normal file
6
res/shaders/effects/negative.glsl
Normal file
@ -0,0 +1,6 @@
|
||||
vec4 effect() {
|
||||
vec4 color = texture(u_screen, v_uv);
|
||||
color = mix(color, 1.0 - color, u_intensity);
|
||||
color.a = 1.0;
|
||||
return color;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user