refactor(rendering): split managed SRP layers and namespaces
This commit is contained in:
38
managed/XCEngine.ScriptCore/Rendering/Data/LightingData.cs
Normal file
38
managed/XCEngine.ScriptCore/Rendering/Data/LightingData.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using XCEngine;
|
||||
|
||||
namespace XCEngine.Rendering
|
||||
{
|
||||
public sealed class LightingData
|
||||
{
|
||||
internal static readonly LightingData Default =
|
||||
new LightingData(
|
||||
DirectionalLightData.Default,
|
||||
false,
|
||||
0);
|
||||
|
||||
internal LightingData(
|
||||
DirectionalLightData mainDirectionalLight,
|
||||
bool hasMainDirectionalShadow,
|
||||
int additionalLightCount)
|
||||
{
|
||||
this.mainDirectionalLight =
|
||||
mainDirectionalLight ?? DirectionalLightData.Default;
|
||||
this.hasMainDirectionalShadow =
|
||||
hasMainDirectionalShadow;
|
||||
this.additionalLightCount = additionalLightCount;
|
||||
}
|
||||
|
||||
public DirectionalLightData mainDirectionalLight { get; }
|
||||
|
||||
public bool hasMainDirectionalShadow { get; }
|
||||
|
||||
public int additionalLightCount { get; }
|
||||
|
||||
public bool hasMainDirectionalLight =>
|
||||
mainDirectionalLight.enabled;
|
||||
|
||||
public bool hasAdditionalLights =>
|
||||
additionalLightCount > 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user