Revision: 12785 http://sourceforge.net/p/skim-app/code/12785 Author: hofman Date: 2022-02-13 15:49:06 +0000 (Sun, 13 Feb 2022) Log Message: ----------- make more use of vector functions
Modified Paths: -------------- trunk/SkimTransitions/SKTTransitions.cikernel Modified: trunk/SkimTransitions/SKTTransitions.cikernel =================================================================== --- trunk/SkimTransitions/SKTTransitions.cikernel 2022-02-12 18:45:47 UTC (rev 12784) +++ trunk/SkimTransitions/SKTTransitions.cikernel 2022-02-13 15:49:06 UTC (rev 12785) @@ -79,7 +79,7 @@ vec4 extent, p1, p2; loc = destCoord() - center; - r = sqrt(loc.x * loc.x + loc.y * loc.y); + r = sqrt(dot(loc, loc)); a = atan(loc.y, loc.x) - pi2 * t * t / (1.0 + 0.01 * r); a = a > -0.5 * pi2 ? a : a + pi2; @@ -95,7 +95,7 @@ factor = 1.0 - (1.0 + (x * x * (1.0 - x) * (1.0 - x))) * t; factor = factor < 0.00000001 ? 0.00000001 : factor; r /= factor; - loc = vec2(r * cos(a), r * sin(a)); + loc = r * vec2(cos(a), sin(a)); p1 = any(lessThan(loc, extent.xy)) || any(greaterThanEqual(loc, extent.xy + extent.zw)) ? vec4(0.0) : sample(src, samplerTransform(src, loc + center)); 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