refactor(srp): move rendering data ownership into universal package

This commit is contained in:
2026-04-19 14:19:57 +08:00
parent a7cda9375a
commit f4d4112e2f
14 changed files with 325 additions and 298 deletions

View File

@@ -0,0 +1,43 @@
using XCEngine;
namespace XCEngine.Rendering.Universal
{
public sealed class DirectionalLightData
{
internal static readonly DirectionalLightData Default =
new DirectionalLightData(
false,
false,
new Vector3(0.0f, 0.0f, -1.0f),
new Color(1.0f, 1.0f, 1.0f, 1.0f),
1.0f);
internal DirectionalLightData(
bool enabled,
bool castsShadows,
Vector3 direction,
Color color,
float intensity)
{
this.enabled = enabled;
this.castsShadows = castsShadows;
this.direction = direction;
this.color = color;
this.intensity = intensity;
}
public bool enabled { get; }
public bool castsShadows { get; }
public Vector3 direction { get; }
public Color color { get; }
public float intensity { get; }
public bool isValid =>
enabled;
}
}