BltShader: More hacks! Yay!

Seriously, I'm about to kill myself over this..
Not even gonna bother with math-if optimization.
This commit is contained in:
Jonas Kulla 2013-12-20 07:39:11 +01:00
parent 99cbb4d594
commit 3a5c4eba52
1 changed files with 5 additions and 1 deletions

View File

@ -27,7 +27,11 @@ void main()
float at = ab*as; float at = ab*as;
resFrag.a = at + ad - ad*at; resFrag.a = at + ad - ad*at;
resFrag.rgb = as*srcFrag.rgb + (1.0-at) * ad * dstFrag.rgb; // Sigh...
if (ad == 0.0)
resFrag.rgb = srcFrag.rgb;
else
resFrag.rgb = as*srcFrag.rgb + (1.0-at) * ad * dstFrag.rgb;
gl_FragColor = resFrag; gl_FragColor = resFrag;
} }