Skip to content

Commit

Permalink
Merge branch 'sultimt/sanitize-vertex-normals' into 'main'
Browse files Browse the repository at this point in the history
[REMIX-2481] Sanitize unreliable app-side interpolated normals

See merge request lightspeedrtx/dxvk-remix-nv!717
  • Loading branch information
sultim-t-nv committed Mar 1, 2024
2 parents 10739f0 + 0d2a38e commit 45f387e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ SurfaceInteraction surfaceInteractionCreate(
// Really the only reason to flip this normal is for double-sided geometry. Do not flip based on view vector!
const bool interpolatedNormalSameDirection = dot(interpolatedNormal, flippedTriangleNormal) >= float16_t(0.0);
const f16vec3 flippedInterpolatedNormal = interpolatedNormalSameDirection ? interpolatedNormal : -interpolatedNormal;
surfaceInteraction.interpolatedNormal = flippedInterpolatedNormal;

surfaceInteraction.interpolatedNormal = getBentNormal(surfaceInteraction.triangleNormal, flippedInterpolatedNormal, ray.direction);
}

// Compute motion
Expand Down

0 comments on commit 45f387e

Please sign in to comment.