public record class TexturedMetalRoughnessFeatureThe metalness/roughness workflow with a base-colour map.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The first material feature that samples a texture, which doc 06 records as a gap for as long as a feature had no way to name one: sampling needs a binding index only the compiled shader knows, and a feature is composed into a shader it has never seen.
It carries no texture handle. What it carries is a name — the parameter the host writes a table slot into — and the texture itself is assigned on the material, paired to that name through MaterialRenderFeature.TextureIndices. That indirection is the whole of what "materials are values, not resources" means here: this record is data that serialises, and nothing in it is a handle to something on a device.
Needs a device with HasBindless and a host that gave the material feature a BindlessTable. Without one the index stays zero and every material samples the table's fallback, so a project targeting GL or WebGL2 uses MetalRoughnessFeature and tints instead — which is the same fork ADR-011 makes everywhere else.
Fields and properties (6)
public Vector3 BaseColorMultiplied into the map, so a shared map can be tinted per material.
public float MetalnessHow much of a conductor this is, 0..1.
public float RoughnessPerceptual roughness, as authored.
public string BaseColorMapWhat the material calls the base-colour map it wants sampled.
public string ShaderNameThe Raven shader implementing this feature, from Raven/Library/Material.
public bool IsBaseSurface
Methods (2)
public static string BaseColorIndexParameter(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 (20)
- FrameDocumentTestsThirdPersonShooter.Frame.Tests
- AssetMaterialSourceTestsVixen.Engine.Renderer.Tests
- AssetTextureSourceTestsVixen.Engine.Renderer.Tests
- MaterialBaseSurfaceTestsVixen.Rendering.Tests
- MaterialCompilerTestsVixen.Rendering.Tests
- MaterialFeatureOrderTestsVixen.Rendering.Tests
- MaterialSurfaceVixen.Rendering
- MaterialSurfaceTestsVixen.Rendering.Tests
- ParallaxMaterialImageTestsVixen.Graphics.Golden.Tests
- TextureDemandTestsVixen.Engine.Renderer.Tests
- TexturedMaterialTestsVixen.Rendering.Tests
- TypeRegistrationVixen.Rendering
- Vixen_Rendering_Materials_TexturedMetalRoughnessFeatureSerializerVixen.Rendering
- WorldRendererVixen.Engine.Renderer
- WorldRendererTestsVixen.Engine.Renderer.Tests
- BakedMaterialFileTestsVixen.Editor.AssetEditors.Tests
- MaterialBakeVixen.Editor.Assets
- MaterialBakeRouteDeviceTestsVixen.Editor.Texturing.Tests
- MaterialBakeTestsVixen.Editor.Assets.Tests
- MaterialMapNamingVixen.Editor.Assets