Skip to content

Commit eefb458

Browse files
Fixed a nullref when enabling raycount without ray tracing. (#6455)
* Fixed a nullref when enabling raycount without ray tracing. * Update changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
1 parent 808ca10 commit eefb458

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
4747
- Fixed layer lit shader UI.
4848
- Fixed error thrown when layered lit material has an invalid material type.
4949
- Fixed a warning because of a null texture in the lens flare pass.
50+
- Fixed a nullref when enabling raycount without ray tracing.
5051

5152
## [12.1.2] - 2021-10-22
5253

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ internal static HDRenderPipeline currentPipeline
8989
/// </summary>
9090
/// <param name="rayValues">Specifes which ray count value should be returned.</param>
9191
/// <returns>The approximated ray count for a frame</returns>
92-
public uint GetRaysPerFrame(RayCountValues rayValues) { return m_RayCountManager.GetRaysPerFrame(rayValues); }
92+
public uint GetRaysPerFrame(RayCountValues rayValues) { return m_RayCountManager != null ? m_RayCountManager.GetRaysPerFrame(rayValues) : 0; }
9393

9494
// Renderer Bake configuration can vary depends on if shadow mask is enabled or no
9595
PerObjectData m_CurrentRendererConfigurationBakedLighting = HDUtils.k_RendererConfigurationBakedLighting;

0 commit comments

Comments
 (0)