fix shader

This commit is contained in:
Mylloon 2023-05-23 12:22:14 +02:00
parent 8cccb01a75
commit 1f4d8c3789
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -26,8 +26,7 @@ void main(void) {
vec4 color1 = texture(tex0, vsoTexCoord);
vec4 color2 = texture(tex1, vsoTexCoord);
float fadeFactor = smoothstep(fadeStart, fadeEnd, 1 - vsoTexCoord.x);
fragColor = phongIL * mix(color1, color2, fadeFactor * fadeAmount) + ispec * vec4(1);
float fadeFactor = smoothstep(fadeStart, fadeEnd, fadeAmount / vsoTexCoord.x);
fragColor = phongIL * mix(color1, color2, fadeFactor) + ispec * vec4(1);
}