Vixen
02b45cc4
csharp
public sealed class Effect

One compiled variant of a shader: its bytecode, and what a host has to bind to run it.

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

Remarks

Immutable, and shared by every draw that resolves to the same EffectKey. An effect is expensive to produce and free to reuse, which is the whole reason the cache exists.

It holds the bytecode and layout, not a pipeline. A pipeline also depends on the vertex layout, the render pass and the blend and depth state, none of which the shader knows — so one effect backs many pipelines, and keying pipelines by effect alone is a cache that returns an object drawn with the wrong blend mode.

Fields and properties (11)

  • public required EffectKey Key

    The key this was compiled for.

  • public required ImmutableArray<EffectStage> Stages

    The compiled stages.

  • public ImmutableArray<DescriptorSetLayoutHandle> SetLayouts

    The descriptor set layouts the pipeline layout is built from, in set order.

  • public PipelineLayoutHandle Layout

    The pipeline layout every pipeline using this effect shares.

  • public int ConstantBufferSize

    How many bytes the shader's uniform block needs.

  • public ImmutableArray<EffectParameter> Parameters

    The value parameters this variant actually has, for filling that block.

  • public ImmutableArray<EffectBinding> Bindings

    Where each of its resources sits, by the shader's name for it.

  • public ImmutableArray<EffectPushConstant> PushConstants

    The push-constant ranges its pipeline layout declares.

  • public ImmutableArray<EffectVertexInput> VertexInputs

    The vertex attributes its vertex stage reads, with their locations.

  • public bool IsPlaceholder

    Whether this is something to draw with until the real variant arrives.

  • public ImmutableArray<ParameterKey> UsedPermutationKeys

    The permutation keys this variant's output depended on.

Methods (5)

  • public EffectBlock BlockOf(DescriptorSetSlot slot)

    One set's uniform block: where it goes, how big it is, and what is in it.

  • public EffectBlock RecordOf(DescriptorSetSlot slot)

    The per-material record a shader reads, when its block is an element of a buffer.

  • public EffectBinding? BindingOf(string name)

    Where a named resource sits, or null when this variant has no such name.

  • public Effect AsPlaceholder()

    This effect again, marked as something to draw with until the real one arrives.

  • public override string ToString()

    Returns a string that represents the current object.

Used by (121, showing 40)

  • DevelopmentEffectsThirdPersonShooter
  • LibraryEffectsVirtualGeometry
  • AlwaysCompilesVixen.Rendering.PostFx.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.PostFx.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.PostFx.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AlwaysCompilesVixen.Rendering.Tests
  • AutoExposureTestsVixen.Rendering.PostFx.Tests
  • BakedVixen.Graphics.Golden.Tests
  • BakedVixen.Graphics.Golden.Tests
  • BakedVixen.Rendering.Tests
  • BakedVixen.Graphics.Golden.Tests
  • BinVixen.Rendering
  • BindlessFrameTestsVixen.Rendering.Tests
  • BindlessSamplingDeviceTestsVixen.Graphics.Golden.Tests
  • BindlessSetLayoutTestsVixen.Shaders.Tests
  • BloomTestsVixen.Rendering.PostFx.Tests
  • BufferTransferDeviceTestsVixen.Graphics.Golden.Tests
  • ChainVixen.Graphics.Golden.Tests
  • ClusterCullingDeviceTestsVixen.Graphics.Golden.Tests
  • ClusteredLightingTestsVixen.Rendering.Tests
  • ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
  • CompilerVixen.Graphics.Golden.Tests
  • CompilesVixen.Rendering.Tests