diff --git a/res/sploosh.png b/res/sploosh.png index 4981f78..bdbd730 100644 Binary files a/res/sploosh.png and b/res/sploosh.png differ diff --git a/src/shaders/reveal/fragment.glsl b/src/shaders/reveal/fragment.glsl index c549fa7..1987c23 100644 --- a/src/shaders/reveal/fragment.glsl +++ b/src/shaders/reveal/fragment.glsl @@ -7,19 +7,21 @@ varying vec2 vUv; void main() { vec4 color = texture2D(texture, vUv); - gl_FragColor = color; - if(gl_FragColor.a > alphaBound){ - gl_FragColor.a = alphaBound; + vec4 outp = color; + if(outp.a > alphaBound){ + outp.a = alphaBound; } if(vUv.x > reveal && vUv.x < reveal + 0.05){ - gl_FragColor.a *= 1. - ((vUv.x - reveal)/0.05); - }else if(vUv.x >= reveal + 0.05){ - gl_FragColor.a = 0.; + outp.a *= 1. - ((vUv.x - reveal)/0.05); + } + else if(vUv.x >= reveal + 0.05){ + outp.a -= 0.5; } if(reveal == 0.){ - gl_FragColor.a = 0.; + outp.a = 0.; } + gl_FragColor = outp; }