Class MaterialTemplate

Namespace
Elegy.RenderBackend.Templating
Assembly
Elegy.RenderBackend.dll
public class MaterialTemplate
Inheritance
MaterialTemplate
Inherited Members

Constructors

MaterialTemplate(MaterialTemplate, ShaderTemplate)

public MaterialTemplate(MaterialTemplate data, ShaderTemplate shaderTemplate)

Parameters

data MaterialTemplate
shaderTemplate ShaderTemplate

Properties

Data

public MaterialTemplate Data { get; }

Property Value

MaterialTemplate

ResourceLayouts

public ResourceLayout[] ResourceLayouts { get; }

Property Value

ResourceLayout[]

ShaderTemplate

public ShaderTemplate ShaderTemplate { get; }

Property Value

ShaderTemplate

ShaderVariants

public Dictionary<string, ShaderVariant> ShaderVariants { get; }

Property Value

Dictionary<string, ShaderVariant>

Methods

CompileResources(GraphicsDevice, Func<ShaderVariantEntry, bool, OutputDescription>, Func<string, string?>)

public bool CompileResources(GraphicsDevice gd, Func<ShaderVariantEntry, bool, OutputDescription> outputDescriptionFunc, Func<string, string?> pathTo)

Parameters

gd GraphicsDevice
outputDescriptionFunc Func<ShaderVariantEntry, bool, OutputDescription>
pathTo Func<string, string>

Returns

bool

GetVariant(int)

public ShaderVariant GetVariant(int id)

Parameters

id int

Returns

ShaderVariant

GetVariantPipeline(string)

public Pipeline GetVariantPipeline(string name)

Parameters

name string

Returns

Pipeline

HasVariant(string)

public bool HasVariant(string name)

Parameters

name string

Returns

bool

ValidateDataExists(Func<string, string?>, StringBuilder)

public bool ValidateDataExists(Func<string, string?> pathTo, StringBuilder errorStrings)

Parameters

pathTo Func<string, string>
errorStrings StringBuilder

Returns

bool