public struct StaticShadowCasterClaims that an entity's geometry never moves, so its shadow can be cached across frames.
As a scene component
- Size
- 1 bytes — 1260 rows in a 16 KB chunk, alone on the archetype
Remarks
The scene's half of ShadowMapRenderer.StaticCasterStage. That node draws one stage into a cache only when something invalidates it and copies the cache into the working atlas every frame, which needs the casters split into "level" and "everything that moves" — and a stage is exactly the shape of that split, because "which objects, in what order" is what a stage means. This is how an entity says which side it is on: StaticStages is the mask an entity carrying this is stamped with instead of Stages.
⚠ A claim, not a detection, and the renderer cannot check it. An entity that carries this and then moves keeps the shadow it was first drawn with — the shadow stays where the object used to be, in a frame where the object is visibly elsewhere. That is the bargain the word "static" already implied; the escape hatch for a level that genuinely changes is ShadowMapRenderer.StaticVersion, which redraws the cache once.
⚠ Read when the entity is extracted, and extraction happens once. A settled entity is never re-extracted, so adding or removing this afterwards does not restamp the mask it already has. An entity whose staticness is decided at all should be decided before it first draws.
[Component] and [DataContract], deliberately both, on PlayerPawn's terms: it carries no handle and no derived state, so it is an authored fact a scene and a prefab must both be able to say.
Used by (7)
- ArenaThirdPersonShooter
- ComponentRegistrationVixen.Rendering
- MeshExtractionSystemVixen.Rendering
- MeshExtractionTestsVixen.Rendering.Tests
- TypeRegistrationVixen.Rendering
- Vixen_Rendering_Ecs_StaticShadowCasterSerializerVixen.Rendering
- MaterialIconsVixen.Editor.App