Vixen
dd8b0a81
csharp
public interface IMaterialFeature

One choice in a material's feature tree — a base workflow, a normal map, a clear coat.

Read the guide page for this →

Remarks

Stride's composable model, resolved through Raven's compose rather than through a mixin system: a feature names the shader that implements it, and MaterialCompiler turns a list of them into the bindings that select those shaders and the parameters that feed them. Adding a feature is a shader in Raven/Library/Material and an implementation of this — no registration table, and nothing in the pass changes.

An interface with a [DataContract] name per implementation, which is how the rest of the engine does polymorphism in a file: the contract name is the YAML tag, so !MetalRoughness selects the type.

A feature is values, not resources. Every parameter here is written into the material's constant buffer; a feature that samples a texture needs a descriptor, and which binding index it lands on is the compiled shader's decision — the same authoring gap the compositor's nodes have. Until it closes, a textured material sets the values and a host builds the descriptor set.

Fields and properties (3)

  • string ShaderName

    The Raven shader implementing this feature, from Raven/Library/Material.

  • MaterialFeatureStage Stage

    Where in the chain this feature has to run for the ones after it to be right.

  • bool IsBaseSurface

    Whether this feature is the surface, rather than contributing to one.

Methods (1)

Used by (47, showing 40)

  • AnisotropyFeatureVixen.Rendering
  • AssetMaterialSourceVixen.Engine.Renderer
  • BlendFeatureVixen.Rendering
  • ClearCoatFeatureVixen.Rendering
  • ClearCoatNormalMapFeatureVixen.Rendering
  • DisplaceFeatureVixen.Rendering.Tests
  • EmissiveFeatureVixen.Rendering
  • GraphMaterialImageTestsVixen.Graphics.Golden.Tests
  • GraphSurfaceFeatureVixen.Rendering
  • MaterialBaseSurfaceTestsVixen.Rendering.Tests
  • MaterialCompilationContextVixen.Rendering
  • MaterialCompilerVixen.Rendering
  • MaterialCompilerTestsVixen.Rendering.Tests
  • MaterialContentVixen.Rendering
  • MaterialDescriptorVixen.Rendering
  • MaterialFeatureOrderTestsVixen.Rendering.Tests
  • MaterialLayersFeatureVixen.Rendering
  • MaterialPermutationInventoryTestsVixen.Engine.Renderer.Tests
  • MaterialSurfaceVixen.Rendering
  • MaterialSurfaceTestsVixen.Rendering.Tests
  • MetalRoughnessFeatureVixen.Rendering
  • NormalMapFeatureVixen.Rendering
  • OcclusionFeatureVixen.Rendering
  • ParallaxOcclusionFeatureVixen.Rendering
  • SheenFeatureVixen.Rendering
  • SpecularGlossinessFeatureVixen.Rendering
  • StandardFrameExposureDeviceTestsVixen.Graphics.Golden.Tests
  • StandardFrameTierImageTestsVixen.Graphics.Golden.Tests
  • SubsurfaceFeatureVixen.Rendering
  • TexturedEmissiveFeatureVixen.Rendering
  • TexturedMaterialLayersFeatureVixen.Rendering
  • TexturedMaterialTestsVixen.Rendering.Tests
  • TexturedMetalRoughnessFeatureVixen.Rendering
  • TexturedNormalMapFeatureVixen.Rendering
  • TexturedOcclusionFeatureVixen.Rendering
  • TexturedOpacityFeatureVixen.Rendering
  • TexturedOrmFeatureVixen.Rendering
  • TileFeatureVixen.Rendering.Tests
  • Vixen_Rendering_Materials_BlendFeatureSerializerVixen.Rendering
  • Vixen_Rendering_Materials_MaterialContentSerializerVixen.Rendering