update Shaders

This commit is contained in:
Anthony Calosa
2022-11-28 19:18:33 +08:00
parent 735b085998
commit 55d3ffe9f2
6 changed files with 96 additions and 21 deletions

View File

@@ -11,6 +11,7 @@ uniform sampler2D u_texture;
uniform float u_amount;
uniform float u_speed;
uniform float u_time;
uniform float u_bias;
void main () {
vec2 uv = v_texCoords;
@@ -19,5 +20,7 @@ void main () {
uv.x += (sin((uv.y + (u_time * 0.07 * u_speed)) * 15.0) * 0.0029 * u_amount) + (sin((uv.y + (u_time * 0.1 * u_speed)) * 15.0) * 0.002 * u_amount);
gl_FragColor = texture2D(u_texture, uv);
vec4 texColor = texture2D(u_texture, uv);
gl_FragColor = mix(vec4(0.0, 0.0, 0.0, 1.0), texColor, u_bias);
}