public sealed class MaterialCompilationContextWhat a feature writes into while a material is being compiled.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
It carries the two things a feature cannot know about itself: where in the composition it ended up, and what has already been composed. The first decides what its parameters are called — Raven qualifies a composed shader's parameters by the path of types they were reached through, so a baseColor inside the chain is CompositeSurface.MetalRoughnessSurface.baseColor — and the second is what makes the duplicate check possible.
The naming rule is Raven's, implemented here without a compiler in the process. That is a duplicated rule and therefore a place where two things can drift apart, which is why the checked-in reflection for ForwardPlus exists and why MaterialReflectionTests compares this against it. Predicting the names is what lets a material be authored, edited and serialised on a machine with no shader compiler.
Fields and properties (1)
public string ShaderNameThe shading pass the material is being compiled for.
Methods (4)
public void Set<T>(string name, T value) where T : unmanagedSets one of the current feature's parameters.
public void SetPermutation<T>(string name, T defaultValue, T value) where T : notnullSets a permutation the current feature declares.
public void Compose(string slot, IMaterialFeature feature)Fills one of the current shader's compose slots with a feature.
public void Report(MaterialDiagnosticId id, string message, bool isError = true)Records something the author should know.
Used by (23)
- AnisotropicShadingVixen.Rendering
- AnisotropyFeatureVixen.Rendering
- BlendFeatureVixen.Rendering
- CelShadingVixen.Rendering
- ClearCoatFeatureVixen.Rendering
- ClearCoatNormalMapFeatureVixen.Rendering
- ClearCoatShadingVixen.Rendering
- EmissiveFeatureVixen.Rendering
- HairShadingVixen.Rendering
- IMaterialFeatureVixen.Rendering
- IMaterialShadingVixen.Rendering
- MaterialCompilerVixen.Rendering
- MaterialLayersFeatureVixen.Rendering
- MetalRoughnessFeatureVixen.Rendering
- NormalMapFeatureVixen.Rendering
- OcclusionFeatureVixen.Rendering
- SheenFeatureVixen.Rendering
- SheenShadingVixen.Rendering
- SpecularGlossinessFeatureVixen.Rendering
- StandardShadingVixen.Rendering
- SubsurfaceFeatureVixen.Rendering
- SubsurfaceShadingVixen.Rendering
- TexturedMetalRoughnessFeatureVixen.Rendering