Merge pull request #19 from bmdelacruz/master

Fixes #18. Updated wavy fragment shader
This commit is contained in:
Allen Ray 2021-06-22 08:08:55 -04:00 committed by GitHub
commit 93f9cd5359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -67,6 +67,7 @@ func main() {
var fragmentShader = `
#version 330 core
in vec2 vTexCoords;
out vec4 fragColor;
uniform sampler2D uTexture;
@ -77,7 +78,7 @@ uniform float uSpeed;
uniform float uTime;
void main() {
vec2 t = gl_FragCoord.xy / uTexBounds.zw;
vec2 t = vTexCoords / uTexBounds.zw;
vec3 influence = texture(uTexture, t).rgb;
if (influence.r + influence.g + influence.b > 0.3) {