public record class MaterialContentA material as a build wrote it and a frame reads it.
Remarks
The content form of MaterialDescriptor, and the reason the two are not one type. A descriptor holds a resolved IMaterialShading and says nothing about textures, because it is what MaterialCompiler consumes. This is what an asset is: a shading model named rather than constructed, so a document can carry a model this build has never heard of and be told so by name, and the texture assignments beside it, which the compiler has no use for and a host does.
Read from YAML by the importer and as a chunk by the runtime — the arrangement GraphicsCompositorAsset established, and for the same reason: this assembly links no YAML parser, so which file format an asset was authored in belongs to whoever authored it. A shipping build reads the baked record graph and never sees a .vxmat.
⚠ One declaration, two readers, and that is the part worth watching. The editor's MaterialAsset binds the same file to draw it in an inspector, and the two agree only so long as neither drops a key the other writes — which is why the editor's carries features and textures it does not yet edit. A binder skips a key it does not know, so the failure is not an error: it is a material saved by the editor with its features quietly gone.
Fields and properties (6)
public const int CurrentThe version this reader speaks.
public int VersionWhich version of the format this is.
public string ShaderWhich shading pass it is drawn with.
public string ShadingWhich shading model, by the name the renderer registers it under.
public IMaterialFeature[] FeaturesThe features, in the order they contribute.
public MaterialTexture[] TexturesThe textures its features sample, by the names they sample them under.
Methods (1)
public MaterialDescriptor ToDescriptor(IMaterialShading shading)The descriptor MaterialCompiler compiles.
Used by (13)
- AssetMaterialSourceVixen.Engine.Renderer
- AssetMaterialSourceTestsVixen.Engine.Renderer.Tests
- AssetTextureSourceTestsVixen.Engine.Renderer.Tests
- EntryVixen.Engine.Renderer
- MaterialSurfaceVixen.Rendering
- MaterialSurfaceTestsVixen.Rendering.Tests
- TypeRegistrationVixen.Rendering
- Vixen_Rendering_Materials_MaterialContentSerializerVixen.Rendering
- WorldRendererTestsVixen.Engine.Renderer.Tests
- MaterialImporterVixen.Editor.Assets
- MaterialImporterTestsVixen.Editor.Assets.Tests
- MaterialTestsVixen.Editor.AssetEditors.Tests
- ProjectSurfaceSourceVixen.Editor.Assets