Skip to content

Commit

Permalink
Merge branch 'pkristof/improveMvecCalc' into 'main'
Browse files Browse the repository at this point in the history
Replace wrapper with a parameter default

See merge request lightspeedrtx/dxvk-remix-nv!1183
  • Loading branch information
pkristof committed Nov 23, 2024
2 parents 4a713fd + 94c4542 commit b4ca5f6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/dxvk/shaders/rtx/concept/ray/ray.slangh
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,13 @@ Ray rayCreatePrimary(Camera camera, vec2 screenUV, float16_t screenSpacePixelSpr
}

// Convenience function that creates a primary ray based on pixel index instead of UVs.
Ray rayCreatePrimaryFromPixel(Camera camera, ivec2 pixelCoordinate, bool jitter)
Ray rayCreatePrimaryFromPixel(Camera camera, ivec2 pixelCoordinate, bool jitter = true)
{
const vec2 inUV = cameraPixelCoordinateToScreenUV(camera, pixelCoordinate);

return rayCreatePrimary(camera, inUV, float16_t(cb.screenSpacePixelSpreadHalfAngle), jitter);
}

// Overload for creating a primary ray from a pixel index, but with the assumption of using jittering (as this is
// the most common use case).
Ray rayCreatePrimaryFromPixel(Camera camera, ivec2 pixelCoordinate)
{
return rayCreatePrimaryFromPixel(camera, pixelCoordinate, true);
}

// Create a ray that passes through a render target
Ray rayCreateRenderTarget(Camera camera, vec2 screenUV, Ray viewRay)
{
Expand Down

0 comments on commit b4ca5f6

Please sign in to comment.