Skip to content
Merged
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed AxF UI errors when surface type is switched to transparent
- Fixed a serialization issue, preventing quality level parameters to undo/redo and update scene view on change.
- Fixed an exception occuring when a camera doesn't have an HDAdditionalCameraData (1254383).
- Fixed ray tracing with XR single-pass.

### Changed
- Improve MIP selection for decals on Transparents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4470,9 +4470,7 @@ void RenderSSRTransparent(HDCamera hdCamera, CommandBuffer cmd, ScriptableRender
bool usesRaytracedReflections = hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && settings.rayTracing.value;
if (usesRaytracedReflections)
{
hdCamera.xr.StartSinglePass(cmd);
RenderRayTracedReflections(hdCamera, cmd, m_SsrLightingTexture, renderContext, m_FrameCount, true);
hdCamera.xr.StopSinglePass(cmd);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ void RenderPathTracing(HDCamera hdCamera, CommandBuffer cmd, RTHandle outputText
if (!pathTracingShader || !m_PathTracingSettings.enable.value)
return;

if (hdCamera.viewCount > 1)
{
Debug.LogError("Path Tracing is not supported when using XR single-pass rendering.");
return;
}

CheckDirtiness(hdCamera);

// Inject the ray-tracing sampling data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ DeferredLightingRTParameters PrepareIndirectDiffuseDeferredLightingRTParameters(
if (deferredParameters.viewCount > 1 && deferredParameters.rayBinning)
{
deferredParameters.rayBinning = false;
Debug.LogWarning("Ray binning is not supported with XR single-pass rendering!");
}

deferredParameters.globalCB = m_ShaderVariablesRayTracingCB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ DeferredLightingRTParameters PrepareReflectionDeferredLightingRTParameters(HDCam
if (deferredParameters.viewCount > 1 && deferredParameters.rayBinning)
{
deferredParameters.rayBinning = false;
Debug.LogWarning("Ray binning is not supported with XR single-pass rendering!");
}

deferredParameters.globalCB = m_ShaderVariablesRayTracingCB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
[shader("closesthit")]
void ClosestSubSurface(inout RayIntersectionSubSurface rayIntersection : SV_RayPayload, AttributeData attributeData : SV_IntersectionAttributes)
{
UNITY_XR_ASSIGN_VIEW_INDEX(DispatchRaysIndex().z);

// Always set the new t value
rayIntersection.t = RayTCurrent();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
[shader("closesthit")]
void ClosestHitForward(inout RayIntersection rayIntersection : SV_RayPayload, AttributeData attributeData : SV_IntersectionAttributes)
{
UNITY_XR_ASSIGN_VIEW_INDEX(DispatchRaysIndex().z);

// The first thing that we should do is grab the intersection vertice
IntersectionVertex currentVertex;
GetCurrentIntersectionVertex(attributeData, currentVertex);
Expand Down Expand Up @@ -212,6 +214,8 @@ void ClosestHitForward(inout RayIntersection rayIntersection : SV_RayPayload, At
[shader("anyhit")]
void AnyHitMain(inout RayIntersection rayIntersection : SV_RayPayload, AttributeData attributeData : SV_IntersectionAttributes)
{
UNITY_XR_ASSIGN_VIEW_INDEX(DispatchRaysIndex().z);

// The first thing that we should do is grab the intersection vertice
IntersectionVertex currentVertex;
GetCurrentIntersectionVertex(attributeData, currentVertex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
[shader("closesthit")]
void ClosestHitGBuffer(inout RayIntersectionGBuffer rayIntersectionGbuffer : SV_RayPayload, AttributeData attributeData : SV_IntersectionAttributes)
{
UNITY_XR_ASSIGN_VIEW_INDEX(DispatchRaysIndex().z);

// The first thing that we should do is grab the intersection vertice
IntersectionVertex currentVertex;
GetCurrentIntersectionVertex(attributeData, currentVertex);
Expand Down Expand Up @@ -53,6 +55,9 @@ void AnyHitGBuffer(inout RayIntersectionGBuffer rayIntersectionGbuffer : SV_RayP
#ifdef _SURFACE_TYPE_TRANSPARENT
IgnoreHit();
#else

UNITY_XR_ASSIGN_VIEW_INDEX(DispatchRaysIndex().z);

// The first thing that we should do is grab the intersection vertice
IntersectionVertex currentVertex;
GetCurrentIntersectionVertex(attributeData, currentVertex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
[shader("closesthit")]
void ClosestHitMain(inout RayIntersection rayIntersection : SV_RayPayload, AttributeData attributeData : SV_IntersectionAttributes)
{
UNITY_XR_ASSIGN_VIEW_INDEX(DispatchRaysIndex().z);

// The first thing that we should do is grab the intersection vertice
IntersectionVertex currentVertex;
GetCurrentIntersectionVertex(attributeData, currentVertex);
Expand Down Expand Up @@ -141,6 +143,9 @@ void AnyHitMain(inout RayIntersection rayIntersection : SV_RayPayload, Attribute
#ifdef _SURFACE_TYPE_TRANSPARENT
IgnoreHit();
#else

UNITY_XR_ASSIGN_VIEW_INDEX(DispatchRaysIndex().z);

// The first thing that we should do is grab the intersection vertice
IntersectionVertex currentVertex;
GetCurrentIntersectionVertex(attributeData, currentVertex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
[shader("closesthit")]
void ClosestHitVisibility(inout RayIntersection rayIntersection : SV_RayPayload, AttributeData attributeData : SV_IntersectionAttributes)
{
UNITY_XR_ASSIGN_VIEW_INDEX(DispatchRaysIndex().z);

// The first thing that we should do is grab the intersection vertice
IntersectionVertex currentVertex;
GetCurrentIntersectionVertex(attributeData, currentVertex);
Expand All @@ -26,6 +28,8 @@ void ClosestHitVisibility(inout RayIntersection rayIntersection : SV_RayPayload,
[shader("anyhit")]
void AnyHitVisibility(inout RayIntersection rayIntersection : SV_RayPayload, AttributeData attributeData : SV_IntersectionAttributes)
{
UNITY_XR_ASSIGN_VIEW_INDEX(DispatchRaysIndex().z);

// The first thing that we should do is grab the intersection vertice
IntersectionVertex currentVertex;
GetCurrentIntersectionVertex(attributeData, currentVertex);
Expand Down