Skip to content

Commit eb68547

Browse files
KarlBKentDeployer User
authored andcommitted
Update HDAdditionalLightData.cs (#83)
* Update HDAdditionalLightData.cs required for lightexture cookie capture support
1 parent 23cc429 commit eb68547

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,10 @@ internal int shadowPrecision
17951795
byte showAdditionalSettings = 0;
17961796
#pragma warning restore 0414
17971797

1798-
HDShadowRequest[] shadowRequests;
1798+
// custom begin
1799+
internal
1800+
// custom end
1801+
HDShadowRequest[] shadowRequests;
17991802
int[] m_ShadowRequestIndices;
18001803

18011804

@@ -1810,7 +1813,7 @@ internal int shadowPrecision
18101813

18111814
// temporary matrix that stores the previous light data (mainly used to discard history for ray traced screen space shadows)
18121815
[System.NonSerialized] internal Matrix4x4 previousTransform = Matrix4x4.identity;
1813-
1816+
18141817
// custom-begin:
18151818
// Cache shadow data from render loop in order to simplify sending shadow data of light sources to custom data structures.
18161819
// This avoids manually authoring a ton of spaghetti code to wire up additional custom shadow data requests.
@@ -2142,7 +2145,7 @@ internal void ReserveShadowMap(Camera camera, HDShadowManager shadowManager, HDS
21422145
distance01 = 1.0f - Mathf.Pow(distance01, 2);
21432146
}
21442147

2145-
// normalized ratio between light range and distance
2148+
// normalized ratio between light range and distance
21462149
float range01 = Mathf.Clamp01(visibleLight.range / Vector3.Distance(camera.transform.position, visibleLight.GetPosition()));
21472150

21482151
float scaleFactor01 = Mathf.Max(distance01, range01);
@@ -3466,7 +3469,7 @@ public void SetShadowDimmer(float shadowDimmer = 1, float volumetricShadowDimmer
34663469
/// </summary>
34673470
/// <param name="cullingMask"></param>
34683471
public void SetUseViewFrustumForShadowCasterCull(bool useViewFrustumForShadowCasterCull) => legacyLight.useViewFrustumForShadowCasterCull = useViewFrustumForShadowCasterCull;
3469-
3472+
34703473
/// <summary>
34713474
/// Set the light layer shadow cull distances.
34723475
/// </summary>

0 commit comments

Comments
 (0)