Fix #19
This commit is contained in:
1 parent
69be4233ea
commit
dec4ce41f5
4 files changed
+5
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -131,6 +131,11 @@ fun Preview() {
|
|||||||
float refractedDistance = circleMap(1.0 - -sd / height) * amount;
|
float refractedDistance = circleMap(1.0 - -sd / height) * amount;
|
||||||
float2 refractedDirection = normalize(normal + eccentricFactor * normalize(centeredCoord));
|
float2 refractedDirection = normalize(normal + eccentricFactor * normalize(centeredCoord));
|
||||||
float2 refractedCoord = coord + refractedDistance * refractedDirection;
|
float2 refractedCoord = coord + refractedDistance * refractedDirection;
|
||||||
|
if (refractedCoord.x < -0.5 || refractedCoord.x > size.x + 0.5 ||
|
||||||
|
refractedCoord.y < -0.5 || refractedCoord.y > size.y + 0.5) {
|
||||||
|
return half4(0.0, 0.0, 0.0, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
return image.eval(refractedCoord);
|
return image.eval(refractedCoord);
|
||||||
} else {
|
} else {
|
||||||
return image.eval(coord);
|
return image.eval(coord);
|
||||||
|
|||||||
Reference in new issue
Block a user