Use simpler math for crossfade

Just mix it.
This commit is contained in:
Matthias Clasen
2017-09-22 17:54:24 -04:00
parent 2a4070fa8a
commit 1a7faa5e6b
4 changed files with 1 additions and 2 deletions

View File

@@ -15,7 +15,6 @@ void main()
{
vec4 start = texture (startTexture, inTexCoord);
vec4 end = texture (endTexture, inTexCoord);
float alpha = mix (start.a, end.a, inProgress);
color = clip (inPos, vec4(mix (start.rgb, end.rgb, inProgress) / alpha, alpha));
color = clip (inPos, mix (start, end, inProgress));
}