Skip to content

Commit 5369ca7

Browse files
committed
remove redundant check
1 parent 4392824 commit 5369ca7

File tree

1 file changed

+1
-1
lines changed
  • com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing

1 file changed

+1
-1
lines changed

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private Vector4 ComputeDoFConstants(HDCamera hdCamera, PathTracing settings)
104104
// focalLength is in mm, so we need to convert to meters. We also want the aperture radius, not diameter, so we divide by two.
105105
float apertureRadius = (enableDof && hdCamera.physicalParameters != null && hdCamera.physicalParameters.aperture > 0) ? 0.5f * 0.001f * hdCamera.camera.focalLength / hdCamera.physicalParameters.aperture : 0.0f;
106106

107-
return new Vector4(enableDof ? apertureRadius : 0.0f, dofSettings.focusDistance.value, 0.0f, 0.0f);
107+
return new Vector4(apertureRadius, dofSettings.focusDistance.value, 0.0f, 0.0f);
108108
}
109109

110110
#if UNITY_EDITOR

0 commit comments

Comments
 (0)