diff --git a/shaders/tag.fs b/shaders/tag.fs index a7bf4cc..118bc1a 100644 --- a/shaders/tag.fs +++ b/shaders/tag.fs @@ -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); }