Skip to content

Commit c765662

Browse files
authored
Merge pull request BradLarson#97 from joshbernfeld/sphere-refraction
Fixed Sphere Refraction
2 parents 222868e + cac6623 commit c765662

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

framework/Source/Operations/GlassSphere.metal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fragment half4 glassSphereFragment(SingleInputVertexIO fragmentInput [[stage_in]
1717
texture2d<half> inputTexture [[texture(0)]],
1818
constant GlassSphereUniform& uniform [[buffer(1)]])
1919
{
20-
constexpr sampler quadSampler(coord::pixel);
20+
constexpr sampler quadSampler;
2121
float2 textureCoordinateToUse = float2(fragmentInput.textureCoordinate.x, (fragmentInput.textureCoordinate.y * uniform.aspectRatio + 0.5 - 0.5 * uniform.aspectRatio));
2222
float distanceFromCenter = distance(uniform.center, textureCoordinateToUse);
2323
float checkForPresenceWithinSphere = step(distanceFromCenter, uniform.radius);

framework/Source/Operations/SphereRefraction.metal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fragment half4 sphereRefractionFragment(SingleInputVertexIO fragmentInput [[stag
1414
texture2d<half> inputTexture [[texture(0)]],
1515
constant SphereRefractionUniform& uniform [[buffer(1)]])
1616
{
17-
constexpr sampler quadSampler(coord::pixel);
17+
constexpr sampler quadSampler;
1818
float2 textureCoordinateToUse = float2(fragmentInput.textureCoordinate.x, (fragmentInput.textureCoordinate.y * uniform.aspectRatio + 0.5 - 0.5 * uniform.aspectRatio));
1919
float distanceFromCenter = distance(uniform.center, textureCoordinateToUse);
2020
float checkForPresenceWithinSphere = step(distanceFromCenter, uniform.radius);

0 commit comments

Comments
 (0)