Skip to content

Commit

Permalink
[RayTracing] Fix for case UUM-47435.
Browse files Browse the repository at this point in the history
Fix for case UUM-47435.

- Fixed static batched geometries not built correctly in acceleration structures causing missing objects in ray tracing effects or using wrong materials.
- Removed Static Batching Off requirement in HDRP + DXR Wizard (Static Batching is supported now in Ray Tracing!!!).
- Removed "DisableBatching" = "True" shader tag that forced batching to be disabled in graphics tests.
  • Loading branch information
IonutNedelcuUnity authored and Evergreen committed Sep 2, 2023
1 parent 64a923e commit 98f306e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This version is compatible with Unity 2023.3.0a1.

### Changed
- Stripping or IRenderPipelineGraphicsSettings.
- Removed Static Batching (disabled) requirement from HDRP Wizard. Static Batching is now supported with ray tracing.

### Fixed
- Fix leak with Compute Buffer from APV Resources.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ Entry[] BuildEntryList()
{
new Entry(QualityScope.Global, InclusiveMode.DXROptional, Style.dxrAutoGraphicsAPIWarning_WindowsOnly, IsDXRAutoGraphicsAPICorrect_WindowsOnly, FixDXRAutoGraphicsAPI_WindowsOnly),
new Entry(QualityScope.Global, InclusiveMode.DXROptional, Style.dxrD3D12Warning_WindowsOnly, IsDXRDirect3D12Correct_WindowsOnly, FixDXRDirect3D12_WindowsOnly),
new Entry(QualityScope.Global, InclusiveMode.DXR, Style.dxrStaticBatching, IsDXRStaticBatchingCorrect, FixDXRStaticBatching),
new Entry(QualityScope.CurrentQuality, InclusiveMode.DXR, Style.dxrActivated, IsDXRActivationCorrect, FixDXRActivation),
new Entry(QualityScope.Global, InclusiveMode.DXR, Style.dxrBuildTarget, IsValidBuildTarget, FixBuildTarget),
new Entry(QualityScope.Global, InclusiveMode.DXR, Style.dxrResources, IsDXRResourcesCorrect, FixDXRResources),
Expand All @@ -210,7 +209,6 @@ Entry[] BuildEntryList()
{
new Entry(QualityScope.Global, InclusiveMode.DXR, Style.dxrAutoGraphicsAPI, IsDXRAutoGraphicsAPICorrect, FixDXRAutoGraphicsAPI),
new Entry(QualityScope.Global, InclusiveMode.DXR, Style.dxrD3D12, IsDXRDirect3D12Correct, FixDXRDirect3D12),
new Entry(QualityScope.Global, InclusiveMode.DXR, Style.dxrStaticBatching, IsDXRStaticBatchingCorrect, FixDXRStaticBatching),
new Entry(QualityScope.CurrentQuality, InclusiveMode.DXR, Style.dxrActivated, IsDXRActivationCorrect, FixDXRActivation),
new Entry(QualityScope.Global, InclusiveMode.DXR, Style.dxrBuildTarget, IsValidBuildTarget, FixBuildTarget),
new Entry(QualityScope.Global, InclusiveMode.DXR, Style.dxrResources, IsDXRResourcesCorrect, FixDXRResources),
Expand Down Expand Up @@ -870,14 +868,6 @@ void FixBuildTarget(bool fromAsyncUnused)
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows64);
}

bool IsDXRStaticBatchingCorrect()
=> !GetStaticBatching(CalculateSelectedBuildTarget());

void FixDXRStaticBatching(bool fromAsyncUnused)
{
SetStaticBatching(CalculateSelectedBuildTarget(), false);
}

bool IsDXRActivationCorrect()
=> HDRenderPipeline.currentAsset != null
&& HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.supportRayTracing;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ public ConfigStyle(string label, string error, string button = null, MessageType
public static readonly ConfigStyle dxrBuildTarget = new ConfigStyle(
label: L10n.Tr("Build Target"),
error: L10n.Tr("To build your Project as a Unity Player your build target must be StandaloneWindows64, Playstation5 or Xbox series X"));
public static readonly ConfigStyle dxrStaticBatching = new ConfigStyle(
label: L10n.Tr("Static Batching"),
error: L10n.Tr("Static Batching is not supported!"));
public static readonly ConfigStyle dxrActivated = new ConfigStyle(
label: L10n.Tr("DXR activated"),
error: L10n.Tr("DXR is not activated!"));
Expand Down

0 comments on commit 98f306e

Please sign in to comment.