Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HDRP][PathTracing] High resolution sky on camera ray misses #3389

Merged
merged 79 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
b9da5fa
Hd/fix 1299116 tesselation cull (#3057)
kecho Jan 14, 2021
5b57f64
Change the source value for the ray tracing frame index iterator from…
anisunity Jan 14, 2021
b21345b
[HDRP] Added a RenderGraph pass that resets the camera size after the…
alelievr Jan 14, 2021
9581f38
Fix Light Intensity UI Prefab Override Application (1299563) (#3061)
johnpars Jan 14, 2021
525ebf5
Fix Undo/Redo Stability for Light Temperature (1304176, 1301076) (#3079)
johnpars Jan 14, 2021
8007c48
Fix labels style (#3046)
adrien-de-tocqueville Jan 14, 2021
2df0185
Fixed side effect on styles during compositor rendering. (#3081)
adrien-de-tocqueville Jan 14, 2021
bf833ce
[HDRP][Compositor] Fix size and spacing of compositor info boxes (#3101)
pmavridis Jan 14, 2021
7be5e6c
[HDRP][Compositor] Fix color picker UI glitch in the Graphics Composi…
pmavridis Jan 14, 2021
6413dc6
Fix 1299233 ies resize bug (#3094)
skhiat Jan 14, 2021
8998567
filter for xbone addded (#3116)
martint-unity Jan 15, 2021
027cb37
[Yamato] Enable cache server for standalone build jobs (#3106)
sophiaaar Jan 15, 2021
6429445
Fix undo redo on layered lit editor (#3059)
adrien-de-tocqueville Jan 15, 2021
d910dc8
Merge branch 'master' into hd/bugfix
sebastienlagarde Jan 15, 2021
9c216c8
[HDRP] Added Vulkan install in system requirements (#3122)
alelievr Jan 15, 2021
8dbde86
[HDRP] Fix issue with compositor related custom passes (#3055)
pmavridis Jan 15, 2021
a5a6590
Fixed some render texture leaks. (#3050)
JulienIgnace-Unity Jan 15, 2021
229f3e8
Hd/fix wizard runtime resources (#3123)
RSlysz Jan 15, 2021
0a42f9b
[HDRP] Fixed lookdev reload bug when viewing a scene object (#3108)
alelievr Jan 15, 2021
eb1d074
[HDRP] Fix error in Depth Of Field near radius blur calculation (#3131)
pmavridis Jan 15, 2021
22b5b7f
[HDRP] Fix GC allocs (#3136)
pmavridis Jan 15, 2021
8cd8fe6
Revert: Fix 1299233 ies resize bug (#3094)
sebastienlagarde Jan 15, 2021
9bcb75f
Merge branch 'master' into hd/bugfix
sebastienlagarde Jan 16, 2021
31defd2
Merge branch 'master' into hd/bugfix
sebastienlagarde Jan 16, 2021
6dffbc8
Hide light shadow near plane gizmo when shadows are disabled (#3114)
adrien-de-tocqueville Jan 16, 2021
9ba9620
Hd/fix backplate globalcubemap2 (#3111)
JulienIgnace-Unity Jan 18, 2021
b4214a4
[HDRP][Path Tracing] Added alpha channel to path traced results (#3127)
eturquin Jan 18, 2021
feb0fe0
Doc update (#3160)
JulienIgnace-Unity Jan 18, 2021
d315646
Merge branch 'master' into hd/bugfix
sebastienlagarde Jan 18, 2021
f9c97c1
Fix various shader warnings (#3158)
FrancescoC-unity Jan 18, 2021
316d6a6
Update Override-Screen-Space-GI.md
sebastienlagarde Jan 18, 2021
be8f685
Fixed shadow matte not working with ambient occlusion when MSAA is en…
sebastienlagarde Jan 18, 2021
44ba81f
Merge branch 'master' into hd/bugfix
sebastienlagarde Jan 18, 2021
4de9b07
Update HDLightUI.cs (#3203)
sebastienlagarde Jan 20, 2021
1557004
[HDRP] fix nullref when chaging RP from HDRP to URP (#3191)
alelievr Jan 20, 2021
acd6199
fix case 1307653 (#3205)
sebastienlagarde Jan 20, 2021
f18d053
Merge branch 'master' into hd/bugfix
sebastienlagarde Jan 21, 2021
abd7de7
Fix LookDev env library assignment after leaving playmode. (#3214)
JulienIgnace-Unity Jan 21, 2021
6349ef2
Update Hair Shader Preset Documentation (#3208)
johnpars Jan 21, 2021
cace53e
[HDRP] Fix locale diffusion profile shader property value in ShaderGr…
alelievr Jan 21, 2021
760837b
Fix error in the RTHandle scale of Depth Of Field when TAA is enabled…
pmavridis Jan 21, 2021
3f480bd
Reset to current quality settings after preprocess build in HDRP (#3218)
jenniferd-unity Jan 21, 2021
4c7dfb6
Merge branch 'master' into hd/bugfix
sebastienlagarde Jan 21, 2021
3b4b1fb
Have bilinear default (#3223)
FrancescoC-unity Jan 21, 2021
50af2f9
Merged changes for high res sky display in path tracing.
eturquin Jan 25, 2021
44355b4
Uncommented PS5 includes.
eturquin Jan 26, 2021
32a16ff
Merge branch 'master' into hd/pt_env_high_res
eturquin Jan 26, 2021
992ceb6
Cosmetic.
eturquin Jan 29, 2021
a890c49
Merge branch 'master' into hd/bugfix
sebastienlagarde Feb 1, 2021
4477283
Update CHANGELOG.md
sebastienlagarde Feb 1, 2021
3112950
Added missing character to the layered lit document (#3310)
JordanL8 Feb 1, 2021
ac55059
Fix needs of exposure for debug display "SSR Transparent" (#3308)
skhiat Feb 1, 2021
bc0aa7d
[HDRP] Fix GUI exception in material UI (#3315)
alelievr Feb 1, 2021
c34ba38
[HDRP] Update decal angle fade tooltip (#3322)
alelievr Feb 1, 2021
1f827f1
Mention in TAA doc that a certain use case will lead to problems. (#3…
FrancescoC-unity Feb 1, 2021
fe86016
Hide shadow resolution value (#3335)
adrien-de-tocqueville Feb 1, 2021
7a6ec1e
Bump timer of 2nd runtime test to make it work on all platforms. (#3…
FrancescoC-unity Feb 2, 2021
b84c14b
Fix light frustum planes (#3341)
adrien-de-tocqueville Feb 2, 2021
2cc4b51
Project skybox without perspective for ortho cameras (#2955)
adrien-de-tocqueville Feb 2, 2021
1c9a0ff
Fix non temporal SSAO issues with the rendergraph pass (#3351)
FrancescoC-unity Feb 2, 2021
b648896
Merge branch 'master' into hd/bugfix
sebastienlagarde Feb 2, 2021
4338bc4
Reset ambient probe upon switching to very different skies (#3340)
FrancescoC-unity Feb 2, 2021
0c56c5f
Fix white flash on camera cuts with volumetric (#3354)
FrancescoC-unity Feb 3, 2021
43e6d15
Fix issues with light layers issues when editing multiple lights (#3323)
FrancescoC-unity Feb 3, 2021
bd1934f
Maximum of reflection distance must be bound by the min of all dimens…
kecho Feb 3, 2021
e813067
Fixed debug panel reseting when going through enum items (#3370)
JulienIgnace-Unity Feb 3, 2021
e05a4c4
Made the code more rendergraph compliant and cleaner.
eturquin Feb 4, 2021
317f976
Fix keywords with fbx importer (#3350)
adrien-de-tocqueville Feb 4, 2021
9a085d0
Higt res env on camera misses, render sky only on first accum frame.
eturquin Feb 4, 2021
2ad6fc6
Updated changelog.
eturquin Feb 4, 2021
d8ab1b1
Support for camera motion blur when recording.
eturquin Feb 4, 2021
2d17429
Fixed typo.
eturquin Feb 4, 2021
ff27488
Merge branch 'hd/bugfix' into hd/pt_env_high_res
eturquin Feb 4, 2021
09748ca
Merge branch 'master' into hd/pt_env_high_res
sebastienlagarde Feb 17, 2021
2383469
Update CHANGELOG.md
sebastienlagarde Feb 17, 2021
26df9ed
Formatting
sebastienlagarde Feb 18, 2021
19938c2
Update 5005 PT screenshots
sebastienlagarde Feb 18, 2021
0cd037c
Fixed dirtiness issue with multiple cameras setup.
eturquin Feb 18, 2021
514e0e0
Merge branch 'master' into hd/pt_env_high_res
eturquin Feb 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hd/fix backplate globalcubemap2 (#3111)
* Removed backplate from rendering of lighting cubemap as it did not really work conceptually and caused artefacts.

* Update changelog

* Remove useless code

* Compilation fix.

* Update doc

* Update Override-HDRI-Sky.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
  • Loading branch information
JulienIgnace-Unity and sebastienlagarde authored Jan 18, 2021
commit 9ba9620c99f6135c476dca5f1d44728759105859
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Changed the clamping approach for RTR and RTGI (in both perf and quality) to improve visual quality.
- Changed the warning message for ray traced area shadows (case 1303410).
- Disabled specular occlusion for what we consider medium and larger scale ao > 1.25 with a 25cm falloff interval.
- Removed backplate from rendering of lighting cubemap as it did not really work conceptually and caused artefacts.

## [10.3.0] - 2020-12-01

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@ These properties only appear if you enable [more options](More-Options.md).
| -**Shadow Tint** | Specifies the color to tint shadows cast onto the backplate. |
| - **Reset Color** | Resets the saved **Shadow Tint** for the shadow. HDRP calculates a new default shadow tint when the HDRI changes. |

**Note**: To use ambient occlusion in the backplate, increase the value of the **Direct Lighting Strength** property on the [Ambient Occlusion](Override-Ambient-Occlusion.md) component override. As the backplate does not have global illumination, it can only get ambient occlusion from direct lighting.
**Note**: To use ambient occlusion in the backplate, increase the value of the **Direct Lighting Strength** property on the [Ambient Occlusion](Override-Ambient-Occlusion.md) component override. As the backplate does not have global illumination, it can only get ambient occlusion from direct lighting.

**Limitation**: The backplate don't affect the Sky lighting (Sky Reflection / Ligthmaps / LightProbes / Ambient Probe). It will not appear with the default sky reflection but only in local reflection probes.
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,6 @@ Shader "Hidden/HDRP/Sky/HDRISky"
return results;
}

float4 FragBakingBackplate(Varyings input) : SV_Target
{
return RenderBackplate(input, 1.0);
}

float4 FragRenderBackplate(Varyings input) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
Expand All @@ -338,12 +333,6 @@ Shader "Hidden/HDRP/Sky/HDRISky"
return depth;
}

float FragBakingBackplateDepth(Varyings input) : SV_Depth
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
return GetDepthWithBackplate(input);
}

float4 FragRenderBackplateDepth(Varyings input, out float depth : SV_Depth) : SV_Target0
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
Expand Down Expand Up @@ -392,20 +381,6 @@ Shader "Hidden/HDRP/Sky/HDRISky"
ENDHLSL
}

// HDRI Sky with Backplate
// For cubemap with Backplate
Pass
{
ZWrite Off
ZTest Always
Blend Off
Cull Off

HLSLPROGRAM
#pragma fragment FragBakingBackplate
ENDHLSL
}

// For fullscreen Sky with Backplate
Pass
{
Expand All @@ -419,20 +394,6 @@ Shader "Hidden/HDRP/Sky/HDRISky"
ENDHLSL
}

// HDRI Sky with Backplate for PreRenderSky (Depth Only Pass)
// DepthOnly For cubemap with Backplate
Pass
{
ZWrite On
ZTest LEqual
Blend Off
Cull Off

HLSLPROGRAM
#pragma fragment FragBakingBackplateDepth
ENDHLSL
}

// DepthOnly For fullscreen Sky with Backplate
Pass
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ class HDRISkyRenderer : SkyRenderer

private static int m_RenderCubemapID = 0; // FragBaking
private static int m_RenderFullscreenSkyID = 1; // FragRender
private static int m_RenderCubemapWithBackplateID = 2; // FragBakingBackplate
private static int m_RenderFullscreenSkyWithBackplateID = 3; // FragRenderBackplate
private static int m_RenderDepthOnlyCubemapWithBackplateID = 4; // FragBakingBackplateDepth
private static int m_RenderDepthOnlyFullscreenSkyWithBackplateID = 5; // FragRenderBackplateDepth
private static int m_RenderFullscreenSkyWithBackplateID = 2; // FragRenderBackplate
private static int m_RenderDepthOnlyFullscreenSkyWithBackplateID = 3; // FragRenderBackplateDepth

public HDRISkyRenderer()
{
Expand Down Expand Up @@ -92,16 +90,10 @@ public override bool RequiresPreRenderSky(BuiltinSkyParameters builtinParams)
return hdriSky.enableBackplate.value;
}

public override void PreRenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap, bool renderSunDisk)
public override void PreRenderSky(BuiltinSkyParameters builtinParams)
{
var hdriSky = builtinParams.skySettings as HDRISky;

int passID;
if (renderForCubemap)
passID = m_RenderDepthOnlyCubemapWithBackplateID;
else
passID = m_RenderDepthOnlyFullscreenSkyWithBackplateID;

float intensity, phi, backplatePhi;
GetParameters(out intensity, out phi, out backplatePhi, builtinParams, hdriSky);

Expand All @@ -113,7 +105,7 @@ public override void PreRenderSky(BuiltinSkyParameters builtinParams, bool rende

m_PropertyBlock.SetMatrix(HDShaderIDs._PixelCoordToViewDirWS, builtinParams.pixelCoordToViewDirMatrix);

CoreUtils.DrawFullScreen(builtinParams.commandBuffer, m_SkyHDRIMaterial, m_PropertyBlock, passID);
CoreUtils.DrawFullScreen(builtinParams.commandBuffer, m_SkyHDRIMaterial, m_PropertyBlock, m_RenderDepthOnlyFullscreenSkyWithBackplateID);
}
}

Expand All @@ -123,19 +115,20 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo
float intensity, phi, backplatePhi;
GetParameters(out intensity, out phi, out backplatePhi, builtinParams, hdriSky);
int passID;
if (hdriSky.enableBackplate.value == false)
if (renderForCubemap)
{
if (renderForCubemap)
passID = m_RenderCubemapID;
else
passID = m_RenderFullscreenSkyID;
passID = m_RenderCubemapID;
}
else
{
if (renderForCubemap)
passID = m_RenderCubemapWithBackplateID;
if (hdriSky.enableBackplate.value == false)
{
passID = m_RenderFullscreenSkyID;
}
else
{
passID = m_RenderFullscreenSkyWithBackplateID;
}
}

if (hdriSky.enableDistortion.value == true)
Expand Down Expand Up @@ -182,6 +175,7 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo
shadowFilter |= unchecked((uint)LightFeatureFlags.Area);
m_SkyHDRIMaterial.SetInt(HDShaderIDs._BackplateShadowFilter, unchecked((int)shadowFilter));


// This matrix needs to be updated at the draw call frequency.
m_PropertyBlock.SetMatrix(HDShaderIDs._PixelCoordToViewDirWS, builtinParams.pixelCoordToViewDirMatrix);
CoreUtils.DrawFullScreen(builtinParams.commandBuffer, m_SkyHDRIMaterial, m_PropertyBlock, passID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@ public void Build(HDRenderPipelineAsset hdAsset, RenderPipelineResources default
m_SkyboxBSDFCubemapIntermediate = RTHandles.Alloc(resolution, resolution, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, dimension: TextureDimension.Cube, useMipMap: true, autoGenerateMips: false, filterMode: FilterMode.Trilinear, name: "SkyboxBSDFIntermediate");
m_CubemapScreenSize = new Vector4((float)resolution, (float)resolution, 1.0f / (float)resolution, 1.0f / (float)resolution);

var cubeProj = Matrix4x4.Perspective(90.0f, 1.0f, 0.01f, 1.0f);

for (int i = 0; i < 6; ++i)
{
var lookAt = Matrix4x4.LookAt(Vector3.zero, CoreUtils.lookAtList[i], CoreUtils.upVectorList[i]);
Expand Down Expand Up @@ -962,7 +960,7 @@ public void PreRenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer
}

if (preRenderSky)
skyContext.skyRenderer.PreRenderSky(m_BuiltinParameters, false, hdCamera.camera.cameraType != CameraType.Reflection || skyContext.skySettings.includeSunInBaking.value);
skyContext.skyRenderer.PreRenderSky(m_BuiltinParameters);

if (skyContext.HasClouds() && skyContext.cloudRenderer.RequiresPreRenderClouds(m_BuiltinParameters))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@ public abstract class SkyRenderer
/// <param name="builtinParams">Engine parameters that you can use to render the sky.</param>
/// <param name="renderForCubemap">Pass in true if you want to render the sky into a cubemap for lighting. This is useful when the sky renderer needs a different implementation in this case.</param>
/// <param name="renderSunDisk">If the sky renderer supports the rendering of a sun disk, it must not render it if this is set to false.</param>
public virtual void PreRenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap, bool renderSunDisk) {}
[System.Obsolete("Please override PreRenderSky(BuiltinSkyParameters) instead.")]
public virtual void PreRenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap, bool renderSunDisk)
{
PreRenderSky(builtinParams);
}

/// <summary>
/// Preprocess for rendering the sky. Called before the DepthPrePass operations
/// </summary>
/// <param name="builtinParams">Engine parameters that you can use to render the sky.</param>
public virtual void PreRenderSky(BuiltinSkyParameters builtinParams) {}


/// <summary>
/// Whether the PreRenderSky step is required.
Expand Down