First wrong framebuffer implementation.

This commit is contained in:
Filippo Scognamiglio
2018-12-01 21:10:08 +01:00
parent 4aea85649f
commit f497bb4b44
3 changed files with 223 additions and 77 deletions
-5
View File
@@ -53,7 +53,6 @@ ShaderEffect {
float alpha = 0.0;
float outShadowLength = shadowLength;
float inShadowLength = 0.5 * shadowLength;
float outShadow = max2(1.0 - smoothstep(vec2(-outShadowLength), vec2(0.0), coords) + smoothstep(vec2(1.0), vec2(1.0 + outShadowLength), coords));
outShadow = clamp(0.0, 1.0, outShadow);
@@ -61,10 +60,6 @@ ShaderEffect {
alpha = sum2(1.0 - step(0.0, coords) + step(1.0, coords));
alpha = clamp(alpha, 0.0, 1.0) * mix(1.0, 0.9, sqrt(outShadow));
float inShadow = min2(step(vec2(0.0), coords) - step(vec2(1.0), coords));
inShadow -= min2(smoothstep(0.0, inShadowLength, coords) - smoothstep(1.0 - inShadowLength, 1.0, coords));
alpha += 0.35 * inShadow;
gl_FragColor = vec4(color * alpha, alpha);
}
"