Skip to content

Commit e3d69ef

Browse files
belgaardEvergreen
authored andcommitted
Moved the toggle to enable/disable hardware ray tracing
1 parent 8a92ef6 commit e3d69ef

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

Packages/com.unity.render-pipelines.core/Editor/PathTracing/BakeInputSerialization.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public void Transfer(IBakeInputVisitor visitor)
262262
visitor.TransferBlittable(ref mixedLightingMode);
263263
visitor.TransferBoolean(ref aoEnabled);
264264
visitor.TransferBlittable(ref aoDistance);
265-
visitor.TransferBlittable(ref useHardwareRayTracing);
265+
visitor.TransferBoolean(ref useHardwareRayTracing);
266266
}
267267
}
268268

Packages/com.unity.render-pipelines.core/Editor/PathTracing/LightBakerStrangler.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -493,12 +493,10 @@ private static ulong CalculateIntegratedLightmapWorkSteps(uint samplesPerTexel,
493493

494494
private static IntegrationSettings GetIntegrationSettings(in BakeInput bakeInput)
495495
{
496-
IntegrationSettings retVal = IntegrationSettings.Default;
497-
retVal.Backend = RayTracingBackend.Compute;
498-
// TODO(pema.malling)
499-
// retVal.Backend =
500-
// bakeInput.lightingSettings.useHardwareRayTracing && RayTracingContext.IsBackendSupported(RayTracingBackend.Hardware) ?
501-
// RayTracingBackend.Hardware : RayTracingBackend.Compute;
496+
var retVal = IntegrationSettings.Default;
497+
retVal.Backend =
498+
bakeInput.lightingSettings.useHardwareRayTracing && RayTracingContext.IsBackendSupported(RayTracingBackend.Hardware) ?
499+
RayTracingBackend.Hardware : RayTracingBackend.Compute;
502500

503501
return retVal;
504502
}

0 commit comments

Comments
 (0)