public record class TexturedOpacityFeatureCoverage from a map: a mask, a fade, a dissolve.
Remarks
⚠ It reads the map's red channel and not its alpha, and that is the whole decision in this feature. An opacity mask is authored as one channel — BC4, or R8 — and a one-channel texture samples alpha as 1, so a feature that read .a would make every mask fully opaque and every cutout material solid. The case where coverage is a base-colour map's alpha is already covered, by TexturedMetalRoughnessFeature: it multiplies the sampled alpha into alpha itself. This feature is for the mask that is its own texture.
Multiplied into whatever coverage is already there rather than replacing it, on OcclusionFeature's argument: a base colour's alpha and a separate mask compose without either knowing about the other.
⚠ Writing coverage is not the same as the material being transparent. Whether alpha reaches a blend or a cutout is the pass's — the material's blend state and the stage it sorts into — so a material with this feature and an opaque blend state draws exactly as it did.
Fields and properties (3)
public string OpacityMapWhat the material calls the opacity mask it wants sampled.
public float OpacityWhat the map is scaled by, so a whole surface can be faded. One is the map exactly.
public string ShaderNameThe Raven shader implementing this feature, from Raven/Library/Material.
Methods (2)
public static string OpacityIndexParameter(string path)What the shader calls the slot, under a composition path.
public void Compile(MaterialCompilationContext context)Writes this feature's parameters, and fills any slots of its own.
Used by (8)
- MaterialCompilerTestsVixen.Rendering.Tests
- TexturedMaterialTestsVixen.Rendering.Tests
- TypeRegistrationVixen.Rendering
- Vixen_Rendering_Materials_TexturedOpacityFeatureSerializerVixen.Rendering
- WorldRendererVixen.Engine.Renderer
- MaterialBakeVixen.Editor.Assets
- MaterialBakeTestsVixen.Editor.Assets.Tests
- MaterialMapNamingVixen.Editor.Assets