From 11a086a5aed990bb82c8f092380c7090e2d7d2ff Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Wed, 28 Apr 2021 17:34:53 +0200 Subject: [PATCH] Fix fog precision --- .../ShaderLibrary/VolumeRendering.hlsl | 2 +- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.core/ShaderLibrary/VolumeRendering.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/VolumeRendering.hlsl index b44c2357d20..cc8aa7eb356 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/VolumeRendering.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/VolumeRendering.hlsl @@ -142,7 +142,7 @@ real OpticalDepthHeightFog(real baseExtinction, real baseHeight, real2 heightExp real H = heightExponents.y; real rcpH = heightExponents.x; real Z = cosZenith; - real absZ = max(abs(cosZenith), REAL_EPS); + real absZ = max(abs(cosZenith), 0.001f); real rcpAbsZ = rcp(absZ); real endHeight = startHeight + intervalLength * Z; diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index a0f0029cc18..07c8beeab8f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -159,6 +159,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed CustomPassUtils scaling issues when used with RTHandles allocated from a RenderTexture. - Fixed ResourceReloader that was not call anymore at pipeline construction - Fixed undo of some properties on light editor. +- Fixed fog precision in some camera positions (case 1329603). ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard