Skip to content

Commit 9c8f1a6

Browse files
Bursted ShadowRequest updates (#94)
* Bursted shadow requests * Some fixup * Bursted index generation and shadow manager updates. * Normalization step and job combining * Bug fixing and some improvements * Some cleanup * More cleanup * Fixed profiler marker issue * Fixed light registration bug, more cleanup * Added initialization checks to HDCachedShadowAtlas. * Removed log warnings * Wrapped HDAdditionalLightData pointer properties in UnsafeLists
1 parent 5f06be2 commit 9c8f1a6

21 files changed

+4180
-601
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,18 @@ internal enum PointLightHDType
211211
[SerializeField, FormerlySerializedAs("lightTypeExtent"), FormerlySerializedAs("m_LightTypeExtent")]
212212
PointLightHDType m_PointlightHDType = PointLightHDType.Punctual;
213213

214+
internal PointLightHDType pointLightHDType
215+
{
216+
get => m_PointlightHDType;
217+
set
218+
{
219+
if (lightEntity.valid)
220+
{
221+
HDLightRenderDatabase.instance.GetShadowRequestUpdateInfoAsRef(lightEntity).pointLightHDType = m_PointlightHDType;
222+
}
223+
}
224+
}
225+
214226
// Only for Spotlight, should be hide for other light
215227
[SerializeField, FormerlySerializedAs("spotLightShape")]
216228
SpotLightShape m_SpotLightShape = SpotLightShape.Cone;
@@ -297,6 +309,8 @@ public SpotLightShape spotLightShape
297309
if (!supportedUnits.Any(u => u == lightUnit))
298310
lightUnit = supportedUnits.First();
299311
UpdateAllLightValues();
312+
313+
HDLightRenderDatabase.instance.GetShadowRequestUpdateInfoAsRef(lightEntity).spotLightShape = m_SpotLightShape;
300314
}
301315
}
302316

@@ -317,6 +331,8 @@ public AreaLightShape areaLightShape
317331
if (type == HDLightType.Area)
318332
ResolveAreaShape();
319333
UpdateAllLightValues();
334+
335+
HDLightRenderDatabase.instance.GetShadowRequestUpdateInfoAsRef(lightEntity).areaLightShape = m_AreaLightShape;
320336
}
321337
}
322338

0 commit comments

Comments
 (0)