Skip to content

Fix cached directional update upon rotation and add API to don't render on placement for OnDemand #3607

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

Merged
merged 105 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from 100 commits
Commits
Show all changes
105 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
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
317f976
Fix keywords with fbx importer (#3350)
adrien-de-tocqueville Feb 4, 2021
ca0a238
Fix WillFitAtlas + add API entry with light data itself.
FrancescoC-unity Feb 4, 2021
b975641
Light is placed API
FrancescoC-unity Feb 4, 2021
08cd371
Changelog
FrancescoC-unity Feb 4, 2021
8dfda16
Placed and rendered API
FrancescoC-unity Feb 4, 2021
b480510
Fixed lightmaps not working properly with shader graphs in ray traced…
anisunity Feb 4, 2021
ff57004
revert: Reset ambient probe upon switching to very different skies (#…
sebastienlagarde Feb 4, 2021
8250779
Merge branch 'master' into hd/bugfix
sebastienlagarde Feb 5, 2021
f41f5cf
Hdrp/fix tesselation wireframe (#3355)
kecho Feb 5, 2021
ab6fc9e
Adding missing meta from HDRP_test
sebastienlagarde Feb 8, 2021
0923df0
Hd/fix input registering domain reload (#3373)
RSlysz Feb 8, 2021
14bb032
Merge branch 'master' into hd/bugfix
sebastienlagarde Feb 10, 2021
53be5eb
Fix nullref (#3460)
adrien-de-tocqueville Feb 10, 2021
5d7fb34
Merge branch 'master' into hd/bugfix
sebastienlagarde Feb 11, 2021
7655f87
Fix DepthOfField CoC debug view (#3466)
FrancescoC-unity Feb 11, 2021
890195a
Fixed an issue with first frame of ao causing some kind of ghosting e…
JulienIgnace-Unity Feb 12, 2021
78864e9
Fix mipmap generation internal format (#3470)
pmavridis Feb 12, 2021
4402cf2
Change wizard check to be ok with -force api (#3422)
FrancescoC-unity Feb 12, 2021
cac2a5a
Merge branch 'master' into hd/bugfix
sebastienlagarde Feb 14, 2021
4ec6ec4
Delete Volumes.meta
sebastienlagarde Feb 14, 2021
24fa85c
revert: Hd/fix input registering domain reload #3373
sebastienlagarde Feb 14, 2021
9160de3
update Vulkan win reference screenshots
sebastienlagarde Feb 14, 2021
c11fb81
Merge branch 'master' into hd/bugfix
sebastienlagarde Feb 14, 2021
e1d44d1
Fixed performance issue with ShaderGraph and Alpha Test
sebastienlagarde Feb 14, 2021
b0aaf41
Fixed dimensionality of a couple vectors (from 3 to 2). (#3395)
eturquin Feb 15, 2021
0ef72d6
Fix error when increasing the maximum planar reflection limit (#3332)
pmavridis Feb 17, 2021
0818713
Updated documentation of RequestRenderNextUpdate (#3368)
fredericv-unity3d Feb 17, 2021
e3088c8
Fix assert
FrancescoC-unity Feb 22, 2021
3c893e8
Fix alpha output in AOVs and debug views when using shadow matte (#3593)
pmavridis Feb 22, 2021
04e4583
Doc update
FrancescoC-unity Feb 22, 2021
2b9782b
Fix caching of directional shadows
FrancescoC-unity Feb 22, 2021
e4f6a15
Merge branch 'HDRP/fix-and-add-would-fit' into HDRP/fix-couple-of-cac…
FrancescoC-unity Feb 22, 2021
413890e
Doc
FrancescoC-unity Feb 22, 2021
da5d050
Sync point (need switching branch)
FrancescoC-unity Feb 22, 2021
2cf3468
Allow to skip rendering on placement
FrancescoC-unity Feb 23, 2021
2982c27
Changelog
FrancescoC-unity Feb 23, 2021
96022c0
Expose update upon light movement
FrancescoC-unity Feb 23, 2021
d48393c
changelog again
FrancescoC-unity Feb 23, 2021
5d27497
Merge branch 'master' into HDRP/fix-couple-of-cached-shadows-issues
sebastienlagarde Feb 25, 2021
3d82662
Update CHANGELOG.md
sebastienlagarde Feb 25, 2021
5bf8ee9
Update CHANGELOG.md
sebastienlagarde Feb 25, 2021
8efcbdb
Merge branch 'master' into HDRP/fix-couple-of-cached-shadows-issues
sebastienlagarde Feb 25, 2021
a6ac25b
Merge branch 'master' into HDRP/fix-couple-of-cached-shadows-issues
sebastienlagarde Feb 25, 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
13 changes: 8 additions & 5 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added UV manipulation for Decals (edit mode).
- Added color and intensity customization for Decals.
- Added a history rejection criterion based on if the pixel was moving in world space (case 1302392).
- Added new API in CachedShadowManager
- Added the default quality settings to the HDRP asset for RTAO, RTR and RTGI (case 1304370).
- API to allow OnDemand shadows to not render upon placement in the Cached Shadow Atlas.
- Exposed update upon light movement for directional light shadows in UI.

### Fixed
- Fixed an exception when opening the color picker in the material UI (case 1307143).
Expand All @@ -33,9 +36,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix issue with Depth of Field CoC debug view.
- Fixed an issue where first frame of SSAO could exhibit ghosting artefacts.
- Fixed an issue with the mipmap generation internal format after rendering format change.

### Added
- Added new AOV APIs for overriding the internal rendering format, and for outputing the world space position.
- Fixed performance issue with ShaderGraph and Alpha Test
- Fixed error when increasing the maximum planar reflection limit (case 1306530).
- Fixed alpha output in debug view and AOVs when using shadow matte (case 1311830).
- Fixed WouldFitInAtlas that would previously return wrong results if any one face of a point light would fit (it used to return true even though the light in entirety wouldn't fit).
- Fixed update upon light movement for directional light rotation.

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand All @@ -59,8 +64,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Change Assets/Create/Rendering/C# Custom Pass to Assets/Create/Rendering/HDRP C# Custom Pass
- Change Assets/Create/Rendering/C# Post Process Volume to Assets/Create/Rendering/HDRP C# Post Process Volume
- Change labels about scroll direction and cloud type.

### Changed
- Improved shadow cascade GUI drawing with pixel perfect, hover and focus functionalities.

## [11.0.0] - 2020-10-21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ A Light's **Update Mode** determines whether or not HDRP caches its shadow map:I
When a Light that caches its shadows renders its shadow map for the first time, HDRP registers it with the cached shadow manager which assigns the shadow map to a cached shadow atlas. In the case of directional Lights, HDRP uses the same shadow atlas for cached and non-cached directional Lights.

If the Light's **Update Mode** is set to **OnDemand**, you can manually request HDRP to update the Light's shadow map. To do this, access the Light's **HDAdditionalLightData** component and call the `RequestShadowMapRendering` function. Also, if the Light has multiple shadows (e.g. multiple cascades of a directional light), you can request the update of a specific sub-shadow. To do this, use the `RequestSubShadowMapRendering(shadowIndex)` function.
By default when **Update Mode** is set to **OnDemand** the shadow maps will be rendered OnEnable the first time or when first registered with the system, however it is possible to change this behaviour by changing the property `onDomandShadowRenderOnPlacement`. If this property is set to false, the shadows won't be rendered until explicitly calling `RequestShadowMapRendering` or `RequestSubShadowMapRendering(shadowIndex)` .


For a Light that does cache its shadows, if you disable it or set its **Update Mode** to **Every Frame**, you can tell HDRP to preserve the Light's shadow map's place in the cached shadow atlas. This means that, if you enable the Light again, HDRP does not need to re-render the shadow map or place it into a shadow atlas. For information on how to make a Light preserve its shadow map's place in the cached shadow atlas, see [Preserving shadow atlas placement](#preserving-shadow-atlas-placement).

As a shortcut for a common case, HDRP offers an option to automatically trigger an update when either the position or rotation of a light changes above a certain threshold. To enable this option, select a [Light](https://github.com/Unity-Technologies/Graphics/pull/Light-Component.md) and, in the **Shadow** section of its Inspector, enable **Update on light movement**.
Expand All @@ -132,6 +135,8 @@ If the shadow atlas is full when a Light requests a spot, the cached shadow mana
After a Scene loads with all the already placed Lights, if you add a new Light with cached shadows to the Scene, HDRP tries to place it in order to fill the holes in the atlas. However, depending on the order of insertion, the atlas may be fragmented and the holes available are not enough to place the Light's shadow map in. In this case, you can defragment the atlas to allow for additional Lights. To do this, pass the target atlas into the following function: `HDCachedShadowManager.instance.DefragAtlas`
Note that this causes HDRP to mark all the shadow maps in the atlas as dirty which means HDRP renders them the moment their parent Light becomes visible.

It is possible to check if a light has its shadow maps has a placement in the cached shadow atlas `HDCachedShadowManager.instance.LightHasBeenPlacedInAtlas` and if it has been placed and rendered at least once with `HDCachedShadowManager.instance.LightHasBeenPlaceAndRenderedAtLeastOnce`.

### Preserving shadow atlas placement

If you disable the Light or change its **Update Mode** to **Every Frame**, the cached shadow manager unreserves the Light's shadow map's space in the cached shadow atlas and HDRP begins to render the Light's shadow map to the normal shadow atlases every frame. If the cached shadow manager needs to allocate space on the atlas for another Light, it can overwrite the space currently taken up by the original Light's shadow map.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,8 @@ static void DrawShadowMapContent(SerializedHDLight serialized, Editor owner)
#if UNITY_2021_1_OR_NEWER
EditorGUILayout.PropertyField(serialized.shadowAlwaysDrawDynamic, s_Styles.shadowAlwaysDrawDynamic);
#endif
EditorGUILayout.PropertyField(serialized.shadowUpdateUponTransformChange, s_Styles.shadowUpdateOnLightTransformChange);
}
EditorGUILayout.PropertyField(serialized.shadowUpdateUponTransformChange, s_Styles.shadowUpdateOnLightTransformChange);

HDLightType lightType = serialized.type;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Pass
#ifndef DEBUG_DISPLAY
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
#if !defined(_SURFACE_TYPE_TRANSPARENT) && defined(_ALPHATEST)
#if !defined(_SURFACE_TYPE_TRANSPARENT)
#if SHADERPASS == SHADERPASS_FORWARD
#define SHADERPASS_FORWARD_BYPASS_ALPHA_TEST
#elif SHADERPASS == SHADERPASS_GBUFFER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public class GeneralSection
public static readonly GUIContent pointCoockieSizeContent = EditorGUIUtility.TrTextContent("Point Cookie Size", "Specifies the maximum size for the Cube cookies HDRP uses for Point Lights.");
#endif
public static readonly GUIContent pointCookieTextureArraySizeContent = EditorGUIUtility.TrTextContent("Cubemap Array Size", "Sets the maximum Texture Array size for the Cube cookies HDRP uses for Directional and Spot Lights. Higher values allow HDRP to use more cookies concurrently on screen.");
public static readonly GUIContent maxPlanarReflectionOnScreen = EditorGUIUtility.TrTextContent("Max Planar Reflection On Screen", "Sets the maximum number of the Planar Reflection HDRP can handle on screen at once.");
public static readonly GUIContent maxPlanarReflectionOnScreen = EditorGUIUtility.TrTextContent("Max Planar Reflection On Screen", "Sets the maximum number of the Planar Reflection HDRP can handle on screen at once. For performance reasons this number cannot be higher than 32.");

public static readonly GUIContent cookieAtlasSizeContent = EditorGUIUtility.TrTextContent("2D Atlas Size", "Specifies the size of the atlas used for 2D cookies (Directional, Spot and Rectangle Lights).");
public static readonly GUIContent cookieAtlasFormatContent = EditorGUIUtility.TrTextContent("Format", "Specifies the HDR format of the atlas used for 2D cookies. R16G16B16A16 can be use for EXR cookies (it provides more precision than R11G11B10)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,10 @@ static void Drawer_SectionReflection(SerializedHDRenderPipelineAsset serialized,
string message = string.Format(Styles.cacheInfoFormat, HDEditorUtils.HumanizeWeight(currentCache));
EditorGUILayout.HelpBox(message, MessageType.Info);
}
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightLoopSettings.maxPlanarReflectionOnScreen, Styles.maxPlanarReflectionOnScreen);
if (EditorGUI.EndChangeCheck())
serialized.renderPipelineSettings.lightLoopSettings.maxPlanarReflectionOnScreen.intValue = Mathf.Clamp(serialized.renderPipelineSettings.lightLoopSettings.maxPlanarReflectionOnScreen.intValue, 1, ShaderVariablesGlobal.s_MaxEnv2DLight);
}

EditorGUILayout.Space();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,27 @@ public bool preserveCachedShadow
}
}

[SerializeField]
bool m_OnDemandShadowRenderOnPlacement = true;
/// <summary>
/// If the shadow update mode is set to OnDemand, this parameter controls whether the shadows are rendered the first time without needing an explicit render request. If this properties is false,
/// the OnDemand shadows will never be rendered unless a render request is performed explicitly.
/// </summary>
public bool onDomandShadowRenderOnPlacement
{
get => m_OnDemandShadowRenderOnPlacement;
set
{
if (m_OnDemandShadowRenderOnPlacement == value)
return;

m_OnDemandShadowRenderOnPlacement = value;
}
}

// This is a bit confusing, but it is an override to ignore the onDomandShadowRenderOnPlacement field when a light is registered for the first time as a consequence of a request for shadow update.
internal bool forceRenderOnPlacement = false;

/// <summary>
/// True if the light affects volumetric fog, false otherwise
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ void Awake()
public static class HDAdditionalReflectionDataExtensions
{
/// <summary>
/// Request to render this probe next update.
/// Requests that Unity renders the passed in Reflection Probe during the next update.
/// </summary>
/// <remarks>
/// If you call this method for a Reflection Probe using <see cref="ProbeSettings.RealtimeMode.OnDemand"/> mode, Unity renders the probe the next time the probe influences a Camera rendering.
///
/// Call this method with the mode <see cref="ProbeSettings.RealtimeMode.OnDemand"/> and the probe will
/// be rendered the next time it will influence a camera rendering.
/// If the Reflection Probe doesn't have an attached <see cref="HDAdditionalReflectionData"/> component, calling this function has no effect.
///
/// If the probe don't have a <see cref="HDAdditionalReflectionData"/> component, nothing is done.
/// </summary>
/// <param name="probe">The probe to request a render.</param>
/// Note: If any part of a Camera's frustum intersects a Reflection Probe's influence volume, the Reflection Probe influences the Camera.
/// </remarks>
/// <param name="probe">The Reflection Probe to request a render for.</param>
public static void RequestRenderNextUpdate(this ReflectionProbe probe)
{
var add = probe.GetComponent<HDAdditionalReflectionData>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,15 @@ internal void SetIsRendered()
public virtual void PrepareCulling() {}

/// <summary>
/// Request to render this probe next update.
///
/// Call this method with the mode <see cref="ProbeSettings.RealtimeMode.OnDemand"/> and the probe will
/// be rendered the next time it will influence a camera rendering.
/// Requests that Unity renders this Reflection Probe during the next update.
/// </summary>
/// <remarks>
/// If the Reflection Probe uses <see cref="ProbeSettings.RealtimeMode.OnDemand"/> mode, Unity renders the probe the next time the probe influences a Camera rendering.
///
/// If the Reflection Probe doesn't have an attached <see cref="HDAdditionalReflectionData"/> component, calling this function has no effect.
///
/// Note: If any part of a Camera's frustum intersects a Reflection Probe's influence volume, the Reflection Probe influences the Camera.
/// </remarks>
public void RequestRenderNextUpdate() => m_WasRenderedSinceLastOnDemandRequest = false;

// Forces the re-rendering for both OnDemand and OnEnable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ bool SampleGGX_VNDF(float roughness_,

float VdotH;
float3 localV, localH;
SampleGGXVisibleNormal(inputSample, V, localToWorld, roughness, localV, localH, VdotH);
SampleGGXVisibleNormal(inputSample.xy, V, localToWorld, roughness, localV, localH, VdotH);

// Compute the reflection direction
float3 localL = 2.0 * VdotH * localH - localV;
Expand Down
Loading