Vixen
02b45cc4
csharp
public sealed class ComputeRenderer

A compute pass: what it reads, what it writes, and how many groups of it to run.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The node that makes clustered light culling — and every other compute stage in doc 06's list — a thing the compositor can express. Its whole value over a hand-written dispatch is the two lists: a pass that says it writes the cluster buffer, next to a pass that says it reads it, is a pass the graph orders first and puts a barrier after. That edge is the one nobody maintains correctly by hand, and it is the reason a compute pass in a frame graph is worth more than a compute pass in a function.

The effect is resolved through the ordinary EffectSystem, so a compute shader is permuted, cached and baked exactly like a graphics one — and a shipping build cannot compile one for the same structural reason it cannot compile a vertex shader.

Fields and properties (16)

  • public required string ShaderName

    The compute shader to run.

  • public ParameterCollection Parameters

    The permutations selecting which variant of it, and the values its block is filled from.

  • public IReadOnlyList<ParameterKey> PermutationKeys

    Which permutation keys the shader's variants are selected by.

  • public IList<string> BufferReads

    The names of buffers the dispatch reads.

  • public IList<string> BufferWrites

    The names of buffers it writes.

  • public IList<string> Reads

    The names of textures it samples or reads.

  • public IList<string> Writes

    The names of textures it writes, as storage images.

  • public Int3 Groups

    How many workgroups to run.

  • public SamplerCache? Samplers

    Where a described sampler comes from, for a binding that names one by value.

  • public ComputePipelineCache? Pipelines

    Where compute pipelines come from. Set before the first frame that builds.

  • public ShaderComposition Composition

    What fills the compose slots the compilation declares.

  • public DescriptorBindings Descriptors

    The set it writes for itself, out of the resources it declared.

  • public uint? ConstantBinding

    Which binding this shader's own uniform block occupies, or null for one with none.

  • public ReadOnlySpan<byte> Constants

    The block as it was last filled, for a test or an inspector.

  • public int UploadCount

    How many times the block has actually gone to the GPU.

  • public Action<ComputeDispatch>? OnBind

    What binds anything the declaration cannot express, before the dispatch.

Methods (2)

  • protected internal override void Build(GraphicsCompositor compositor, CompositorFrame frame)

    Declares this node's render-graph passes.

  • public void Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Used by (11)

  • AutoExposureRendererVixen.Rendering.PostFx
  • AutoExposureTestsVixen.Rendering.PostFx.Tests
  • BufferTransferDeviceTestsVixen.Graphics.Golden.Tests
  • ClusterCullingDeviceTestsVixen.Graphics.Golden.Tests
  • ClusteredLightingTestsVixen.Rendering.Tests
  • ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
  • CompositorAssetTestsVixen.Rendering.Tests
  • CompositorBuilderVixen.Rendering
  • ComputeDispatchVixen.Rendering
  • DescriptorBindingTestsVixen.Rendering.Tests
  • HarnessVixen.Rendering.Tests