public sealed class SceneConstantsThe frame's own descriptor set: the environment, the probes, the shadow atlas, the sun.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Set 0's counterpart to ViewConstants, and the piece that was missing once ForwardPlus.rvn started saying which set each of its bindings was in. Everything here is true of the whole frame — one sky, one sun, one set of probes, one shadow atlas — so it is written once and bound once, where a per-material set is written per material and a per-draw block per object.
Unlike set 1, this one holds resources as well as a block, which is why it resolves through the effect rather than being configured like ViewConstants is. Set 1 is a contract between shaders — its layout must be identical everywhere or the shared set cannot survive a pipeline change — while set 0 belongs to whichever pass is drawing, so taking its shape from that pass's own binding plan is both possible and right.
The names are the shader's and the indices are its too: a host sets ForwardPlusKeys.Environment and EffectSetWriter finds where environment goes. Adding a texture above it in the .rvn renumbers the binding and changes nothing here.
Fields and properties (7)
public DescriptorAllocator? DescriptorsWhere the descriptor sets come from. Without one, nothing is bound.
public DescriptorSetSlot SlotWhich of the four conventional sets this is.
public ParameterCollection ParametersThe values and resources the frame binds, by the names the generator interned.
public SceneLighting? LightingThe scene's lighting, written into Parameters on every bind.
public int WriteCountHow many times the set has been written, which settles once the frame stops changing.
public bool IsCompleteWhether the last Bind found everything it needed.
public string? MissingBindingThe shader's names for every binding that stopped the last Bind, or null.
Methods (3)
public SceneConstants(IGraphicsDevice device, string name = "Scene")The frame's own descriptor set: the environment, the probes, the shadow atlas, the sun.
public bool Bind(ICommandList commands, Effect effect)Fills the frame's set from an effect's plan and binds it.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (24)
- ArenaThirdPersonShooter
- ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
- CompositorBuilderVixen.Rendering
- DistanceFieldAoImageTestsVixen.Graphics.Golden.Tests
- ForwardFrameTestsVixen.Rendering.Tests
- FrameVixen.Rendering.Tests
- FullScreenRendererVixen.Rendering
- GlobalDistanceFieldRendererVixen.Rendering
- GlobalDistanceFieldRendererTestsVixen.Rendering.Tests
- GpuClusterResolveVixen.Rendering
- IndirectDiffuseImageTestsVixen.Graphics.Golden.Tests
- IrradianceBounceDeviceTestsVixen.Graphics.Golden.Tests
- IrradianceFieldRendererVixen.Rendering
- IrradianceShadingDeviceTestsVixen.Graphics.Golden.Tests
- MaterialBindingTestsVixen.Rendering.Tests
- MeshRenderFeatureVixen.Rendering
- PostEffectRendererVixen.Rendering.PostFx
- RenderDrawContextVixen.Rendering
- RenderPassRendererVixen.Rendering
- SceneLightingTestsVixen.Rendering.Tests
- SurfaceCacheRendererVixen.Rendering
- VirtualGeometrySystemVixen.Rendering
- VisibilityBufferRendererVixen.Rendering
- WorldRendererVixen.Engine.Renderer