From 400043e5890a7d669fb6233bb526545fc2d9fa9a Mon Sep 17 00:00:00 2001 From: Emmanuel Turquin Date: Mon, 8 Jun 2020 14:26:02 +0200 Subject: [PATCH 1/2] Increased path tracing roughness range. --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../RenderPipeline/PathTracing/Shaders/PathTracingBSDF.hlsl | 4 ++-- .../PathTracing/Shaders/PathTracingMain.raytrace | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index b643a5f3075..278b87ee999 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -786,6 +786,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Pre-warm the RTHandle system to reduce the amount of memory allocations and the total memory needed at all points. - DXR: Only read the geometric attributes that are required using the share pass info and shader graph defines. - DXR: Dispatch binned rays in 1D instead of 2D. +- Increased path tracing BSDFs roughness range from [0.001, 0.999] to [0.00001, 0.99999]. ## [7.1.1] - 2019-09-05 diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingBSDF.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingBSDF.hlsl index 9ae7e4bcd8c..526b983bb9f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingBSDF.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingBSDF.hlsl @@ -4,8 +4,8 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/SubSurface.hlsl" #define DELTA_PDF 1000000.0 -#define MIN_GGX_ROUGHNESS 0.001 -#define MAX_GGX_ROUGHNESS 0.999 +#define MIN_GGX_ROUGHNESS 0.00001 +#define MAX_GGX_ROUGHNESS 0.99999 // Adapted from: "Sampling the GGX Distribution of Visible Normals", by E. Heitz // http://jcgt.org/published/0007/04/01/paper.pdf diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingMain.raytrace b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingMain.raytrace index c1d8da2604e..e38166d52a7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingMain.raytrace +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingMain.raytrace @@ -108,7 +108,7 @@ void RayGen() pathIntersection.value = 1.0; pathIntersection.remainingDepth = _RaytracingMaxRecursion; pathIntersection.pixelCoord = currentPixelCoord; - pathIntersection.maxRoughness = 0.001; + pathIntersection.maxRoughness = 0.0; // In order to achieve filtering for the textures, we need to compute the spread angle of the pixel pathIntersection.cone.spreadAngle = _RaytracingPixelSpreadAngle; From dc9be789a5870c559d93a7fe436304e2cedb82a1 Mon Sep 17 00:00:00 2001 From: Emmanuel Turquin Date: Tue, 9 Jun 2020 17:00:56 +0200 Subject: [PATCH 2/2] Updated failing tests reference images. --- .../Linear/WindowsEditor/Direct3D12/None/5001_PathTracing.png | 4 ++-- .../Direct3D12/None/5003_PathTracing_transparency.png | 4 ++-- .../Direct3D12/None/5004_PathTracing_arealight.png | 4 ++-- .../WindowsEditor/Direct3D12/None/5006_PathTracing_DoF.png | 4 ++-- .../Direct3D12/None/5007_PathTracing_Materials_SG_Lit.png | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5001_PathTracing.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5001_PathTracing.png index 38aa3b7635d..42836bef2d4 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5001_PathTracing.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5001_PathTracing.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a3895661050aac74184f0828cbedeadd6344b378ef97c7c1d638afb68956245c -size 602331 +oid sha256:c41d3240cc1a61873e44b11f3727b02b0796b9a15a21ad28e1b072c3cf53ba30 +size 594955 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5003_PathTracing_transparency.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5003_PathTracing_transparency.png index 8e108fcf9d7..d373862e147 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5003_PathTracing_transparency.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5003_PathTracing_transparency.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0cbcabf92bd1e0b92be8ecd9bbb0f15b6f80360506edfd255407bab4c6d70942 -size 816576 +oid sha256:94b15e3f04fea302b44fc24973c3271fb93cc193ebf512e5c66783eccf5af478 +size 816378 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5004_PathTracing_arealight.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5004_PathTracing_arealight.png index ba07a88d5f6..f1ba4805c13 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5004_PathTracing_arealight.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5004_PathTracing_arealight.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97af6b6b524474fd78fef8d2d50c4dafebd6f45b49f5c598669311fcb291b03b -size 175997 +oid sha256:4a812bb84d35db5575a730bf753959063c30fb21921a003cb988e2aa4cd711e2 +size 171136 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5006_PathTracing_DoF.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5006_PathTracing_DoF.png index b3b1fcf58a8..9ce3911c7b6 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5006_PathTracing_DoF.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5006_PathTracing_DoF.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aff5b5bfea6fafd52bb2a32bacb7dfbddfaec62937c616706da6770e95496a3a -size 583942 +oid sha256:293a4b4420f4ff33b083bae34a3b9bff853b3b29e5d06a9308aa365781280882 +size 582743 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5007_PathTracing_Materials_SG_Lit.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5007_PathTracing_Materials_SG_Lit.png index c8cbc803c52..3ab8e3d69dc 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5007_PathTracing_Materials_SG_Lit.png +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5007_PathTracing_Materials_SG_Lit.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:58698111dd23aae471a3872331d06c0cd9db5b33015b8e8dcb56cb69ef337a85 -size 556660 +oid sha256:c5b765dace74f6bdd1005f95800e3f7680f3c8c3b6f50936da14f2c5d41f146d +size 509269