Revision: 12791 http://sourceforge.net/p/skim-app/code/12791 Author: hofman Date: 2022-02-14 15:28:58 +0000 (Mon, 14 Feb 2022) Log Message: ----------- don't use extra variable
Modified Paths: -------------- trunk/SkimTransitions/SKTTransitions.cikernel Modified: trunk/SkimTransitions/SKTTransitions.cikernel =================================================================== --- trunk/SkimTransitions/SKTTransitions.cikernel 2022-02-14 15:09:10 UTC (rev 12790) +++ trunk/SkimTransitions/SKTTransitions.cikernel 2022-02-14 15:28:58 UTC (rev 12791) @@ -52,7 +52,7 @@ kernel vec4 radarTransition(sampler src, sampler trgt, vec2 center, float angle, float width, float t) { vec2 t1; - float a1, da1, da2, angle1, x, pi, pi2; + float a1, da1, angle1, x, pi, pi2; vec4 p1, p2; pi = 3.14159265358979324; @@ -62,12 +62,12 @@ a1 = abs(t1.y) > abs(t1.x) ? 0.5 * pi - atan(t1.x, t1.y) : atan(t1.y, t1.x); da1 = mod(angle - a1 + 0.5 * width, pi2); da1 = da1 < 0.0 ? da1 + pi2 : da1; - da2 = da1 < pi ? da1 : da1 - pi2; angle1 = 2.0 * (pi + width) * t; + da1 = angle1 > pi2 && da1 > pi ? da1 - pi2 : da1; p1 = sample(src, samplerCoord(src)); p2 = sample(trgt, samplerCoord(trgt)); - x = angle1 > pi2 ? 1.0 - smoothstep(-width, 0.0, -da2) * smoothstep(-width, 0.0, da2 - angle1 + pi2) : smoothstep(0.0, width, da1) * smoothstep(0.0, width, angle1 - da1); + x = angle1 > pi2 ? 1.0 - smoothstep(-width, 0.0, -da1) * smoothstep(-width, 0.0, da1 - angle1 + pi2) : smoothstep(0.0, width, da1) * smoothstep(0.0, width, angle1 - da1); return mix(p1, p2, x); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit