public sealed class WorldRendererEverything between a world and a drawn frame, assembled.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The join an application was missing. The scene half was finished — components, extraction systems, a residency cache — and so was the frame half, and nothing put them together: a game had to construct four features, a geometry buffer, a residency, two extraction systems and a host, in an order, and get every reference between them right. The samples opened a device and issued draws instead, which is why none of them is a game.
What it is not is a policy. It creates the standard features and the standard extraction, and it decides nothing about the frame: the compositor comes from a document, the stages come with it, and the content comes from wherever the application mounted it. A project that wants a different set adds to Host and skips Register.
The order it enforces is the one worth enforcing. Extraction runs in SystemPhase.PreRender after the transforms are written, so an object is culled against where it is this frame rather than where it was last one; the compositor then collects the views and runs the render system's own phases. Both of those are decisions somebody has already made correctly, and this is where a second host stops being able to make them again differently.
Fields and properties (40)
public const int MeshParticleLayoutWhich entry of this renderer's vertex layout table describes a mesh drawn as particles.
public IGraphicsDevice DeviceThe device everything here lives on.
public SceneRenderHost HostThe frame: a compositor, a graph and the render system.
public DescriptorAllocator MaterialDescriptorsWhere a material's own descriptor set is allocated from, frame by frame.
public int UploadedBytesHow many bytes of geometry have been copied to the device.
public SamplerCache SamplersThe samplers the frame's nodes share.
public SceneConstants SceneBlockThe frame's set 0: the lighting environment every shading pass reads.
public SceneLighting SceneEnvironmentWhat the scene contributes to it: the sky, the probes, the sun.
public EnvironmentTexture? EnvironmentThe prefiltered sky to copy up before the frame that samples it, or null for a host that uploads its own.
public ViewConstants ViewBlockThe camera's set 1, which fills itself from whichever view is being drawn.
public GeometryBuffer GeometryThe shared vertex and index memory every scene mesh is suballocated from.
public GeometryResidency ResidencyWhat decides which meshes are in it, and shares one slice between every user.
public MeshRenderFeature MeshesThe feature that draws them.
public MorphRenderFeature MorphingThe blend-shape pre-pass, which gives a morphed mesh a vertex buffer of its own.
public LodRenderFeature LodsWhich level of each authored LOD group a view sees, and which it hides.
public MaterialRenderFeature MaterialsThe materials they are drawn with.
public TransformRenderFeature TransformsTheir world matrices.
public MotionVectorRenderFeature MotionAnd where those matrices were last frame, for the velocity pass.
public ForwardLightingRenderFeature LightingThe lights that reach them.
public ParticleRenderFeature ParticlesThe feature that draws VfxSystems, for a frame with a stage to put them in.
public UiRenderFeature UiThe interfaces drawn inside this frame, and where a game mounts its HUD.
public MaterialRenderFeature ParticleMaterialsThe materials Particles is drawn with, which are not Materials.
public IMeshSource? SourceWhere the geometry a mesh reference names comes from.
public IMaterialSource? PainterWhere the material a reference names comes from.
public BindlessTable? TableThe frame's texture table, on a device that has one.
public AssetTextureSource? PaintedWhere a material's textures come from, once content is mounted.
public TextureDemand? DemandWhat sizes them, on a renderer whose textures are streamed.
public TextureStreamingQuality TexturesThe texture numbers the host's tier resolved to, read by Mount.
public ILogger? LoggerWhere the streaming pool's refusals are reported, or null for nobody watching.
public VirtualGeometrySystem? ClustersThe virtualized stack, if this renderer was given one.
public IVirtualGeometrySource? HierarchiesWhere the cluster hierarchy a mesh reference names comes from.
public MeshExtractionSystem? ExtractionThe extraction the last Register added, or null.
public LodExtractionSystem? LodExtractionThe LOD producer the last Register added, or null.
public TerrainSceneSource TerrainSceneThe frame's terrains, filled by the terrain bridge and read by a !Terrain node.
public AssetTerrainSource? TerrainsWhere the terrain a component names comes from. Null until Mount.
public TerrainExtractionSystem? TerrainExtractionThe terrain bridge the last Register added, or null.
public VfxExtractionSystem? EmittersThe emitter bridge the last Register added, or null.
public IVfxEffectSource? VfxEffectsWhere the effect a VfxEmitter names comes from.
public Material ParticleMaterialWhat every emitter's particles are drawn with.
public Material MeshParticleMaterialWhat an effect authored as a mesh renderer is drawn with.
Methods (5)
public WorldRenderer(IGraphicsDevice device, EffectSystem effects, int vertexCapacity = 1048576, int indexCapacity = 2097152)Builds the standard renderer for a world.
public void Mount(AssetManager assets)Points the renderer at a content manager, so mesh references resolve.
public void Register(EngineLoop loop, RenderStageMask stages, RenderStageMask particleStages = default(RenderStageMask), RenderStageMask staticStages = default(RenderStageMask), RenderStageMask casterStages = default(RenderStageMask))Adds the extraction systems to a loop, so the world's entities reach the render system.
public void Draw(ICommandList commands)Draws the frame, having first put the content work the frame needs on the list.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (23)
- ArenaThirdPersonShooter
- ArenaIlluminationThirdPersonShooter
- PbrShowcaseGamePbrShowcase
- AppGraphicsVixen.App.Hosting
- InterfaceInAWorldTestsVixen.Engine.Renderer.Tests
- LodExtractionTestsVixen.Engine.Renderer.Tests
- MaterialPairingInventoryTestsVixen.Engine.Renderer.Tests
- MaterialPermutationInventoryTestsVixen.Engine.Renderer.Tests
- SettlingVixen.Engine.Renderer.Tests
- StandardFrameTierImageTestsVixen.Graphics.Golden.Tests
- StreamingOverlayVixen.Engine.Renderer
- TextureDemandTestsVixen.Engine.Renderer.Tests
- TierSceneVixen.Graphics.Golden.Tests
- WorldRendererTestsVixen.Engine.Renderer.Tests
- ComposedPaneTestsVixen.Editor.App.Tests
- EditorMountTestsVixen.Editor.App.Tests
- EditorWorldRendererVixen.Editor.App
- EditorWorldRendererTestsVixen.Editor.App.Tests
- FramePresenterVixen.Editor.App
- FramePresenterTestsVixen.Editor.App.Tests
- HostedOverlayTestsVixen.App.Tests
- HostedRendererTestsVixen.App.Tests
- LayeredGameVixen.App.Tests