Vixen
02b45cc4
csharp
public sealed class Material

What a surface is drawn with: a shader, its parameters, and the descriptors they resolved to.

Read the guide page for this →

Remarks

A reference type, and the one place in the frame path that is. Everything per-object is a value in an array; a material is shared by many objects and is the unit a user edits, so objects hold an index into a list of these rather than a copy.

The EffectKey is not stored: it is derived from Parameters and the effect's own UsedPermutationKeys whenever the permutation version moves. Storing it would mean two things that must agree, and the one that goes stale is the one that decides which shader runs.

Fields and properties (4)

  • public string ShaderName

    The shader this material is a variant of.

  • public ParameterCollection Parameters

    The values and permutations set on it.

  • public ShaderComposition Composition

    Which implementation fills each of the shader's compose slots.

  • public DescriptorSetHandle Descriptors

    The descriptor set holding this material's resources.

Methods (2)

  • public Material(string shaderName)

    What a surface is drawn with: a shader, its parameters, and the descriptors they resolved to.

  • public override string ToString()

    Returns a string that represents the current object.

Used by (49, showing 40)

  • ArenaThirdPersonShooter
  • AssetMaterialSourceVixen.Engine.Renderer
  • AssetMaterialSourceTestsVixen.Engine.Renderer.Tests
  • AssetTextureSourceTestsVixen.Engine.Renderer.Tests
  • BinVixen.Rendering
  • BindlessFrameTestsVixen.Rendering.Tests
  • ClusterResolveTestsVixen.Rendering.Tests
  • ClusteredShadingDeviceTestsVixen.Graphics.Golden.Tests
  • CompositorAssetTestsVixen.Rendering.Tests
  • CompositorImageTestsVixen.Graphics.Golden.Tests
  • DeferredMaterialVixen.Rendering.Tests
  • DepthPrepassTestsVixen.Rendering.Tests
  • DistanceFieldDeviceTestsVixen.Graphics.Golden.Tests
  • DrawCompactionTestsVixen.Rendering.Tests
  • EntryVixen.Engine.Renderer
  • GpuClusterResolveVixen.Rendering
  • GraphicsCompositorTestsVixen.Rendering.Tests
  • IMaterialSourceVixen.Rendering
  • IrradianceBounceDeviceTestsVixen.Graphics.Golden.Tests
  • IrradianceShadingDeviceTestsVixen.Graphics.Golden.Tests
  • MaterialBindingTestsVixen.Rendering.Tests
  • MaterialCompilationVixen.Rendering
  • MaterialCompilerVixen.Rendering
  • MaterialCompilerTestsVixen.Rendering.Tests
  • MaterialRecordBufferTestsVixen.Rendering.Tests
  • MaterialReflectionTestsVixen.Rendering.Tests
  • MaterialRenderFeatureVixen.Rendering
  • MaterialTextureIndexTestsVixen.Rendering.Tests
  • MeshExtractionSystemVixen.Rendering
  • MeshExtractionTestsVixen.Rendering.Tests
  • MeshRenderFeatureTestsVixen.Rendering.Tests
  • MeshRenderableVixen.Rendering
  • OneMaterialVixen.Rendering.Tests
  • PaintVixen.Engine.Renderer
  • ParticleRenderFeatureTestsVixen.Rendering.Tests
  • ParticleSpriteDeviceTestsVixen.Graphics.Golden.Tests
  • ParticleSpriteMaterialVixen.Rendering
  • PrimitiveShapeVixen.Rendering
  • ResolveMaterialVixen.Rendering
  • SkinningAndInstancingTestsVixen.Rendering.Tests