Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for potentially corrupted refraction result on xbox #1699

Merged
merged 5 commits into from
Sep 9, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
try explicit NaN check
  • Loading branch information
FrancescoC-unity committed Aug 26, 2020
commit 5218b7ec4998850abc1775603be95367187e56d5
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ float IntersectSphereProxy(EnvLightData lightData, float3 dirPS, float3 position
{
float sphereOuterDistance = lightData.proxyExtents.x;
float projectionDistance = IntersectRaySphereSimple(positionPS, dirPS, sphereOuterDistance);
projectionDistance = max(projectionDistance, lightData.minProjectionDistance); // Setup projection to infinite if requested (mean no projection shape)
projectionDistance = max(isNaN(projectionDistance) ? 0 : projectionDistance, lightData.minProjectionDistance); // Setup projection to infinite if requested (mean no projection shape)

return projectionDistance;
}
Expand Down