From 1f4d8c378998ee016ead27a76c7ab7895f6c2c30 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 23 May 2023 12:22:14 +0200 Subject: [PATCH] fix shader --- shaders/tag.fs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); }