Table of Contents

Class Material

Namespace
ValveResourceFormat.ResourceTypes
Assembly
ValveResourceFormat.dll

Represents a material resource containing shader parameters and texture references.

public class Material : KeyValuesOrNTRO

Inheritance

Inherited Members

Extension Methods

Properties

DynamicExpressions

Gets the evaluated dynamic expressions for dynamic scalar and texture parameters.

public Dictionary<string, string> DynamicExpressions { get; }

Property Value

Dictionary<string, string>

FloatAttributes

Gets the floating-point material attributes.

public Dictionary<string, float> FloatAttributes { get; }

Property Value

Dictionary<string, float>

FloatParams

Gets the floating-point shader parameters.

public Dictionary<string, float> FloatParams { get; }

Property Value

Dictionary<string, float>

InputSignature

Gets the vertex shader input signature defining vertex attributes.

public Material.VsInputSignature InputSignature { get; }

Property Value

Material.VsInputSignature

IntAttributes

Gets the integer material attributes.

public Dictionary<string, long> IntAttributes { get; }

Property Value

Dictionary<string, long>

IntParams

Gets the integer shader parameters.

public Dictionary<string, long> IntParams { get; }

Property Value

Dictionary<string, long>

Name

Gets or sets the material name.

public string Name { get; set; }

Property Value

string

ShaderName

Gets or sets the shader name used by this material.

public string ShaderName { get; set; }

Property Value

string

StringAttributes

Gets the string material attributes.

public Dictionary<string, string> StringAttributes { get; }

Property Value

Dictionary<string, string>

TextureParams

Gets the texture shader parameters.

public Dictionary<string, string> TextureParams { get; }

Property Value

Dictionary<string, string>

VectorAttributes

Gets the vector material attributes.

public Dictionary<string, Vector4> VectorAttributes { get; }

Property Value

Dictionary<string, Vector4>

VectorParams

Gets the vector shader parameters.

public Dictionary<string, Vector4> VectorParams { get; }

Property Value

Dictionary<string, Vector4>

Methods

FindD3DInputSignatureElement(VsInputSignature, string, int)

Finds an input signature element by Direct3D semantic name and index.

public static Material.InputSignatureElement FindD3DInputSignatureElement(Material.VsInputSignature insg, string d3dName, int d3dIndex)

Parameters

insg Material.VsInputSignature

The input signature to search.

d3dName string

The Direct3D semantic name.

d3dIndex int

The Direct3D semantic index.

Returns

Material.InputSignatureElement

The matching element, or default if not found.

GetShaderArguments()

Gets the shader arguments from integer parameters starting with "F_".

public Dictionary<string, byte> GetShaderArguments()

Returns

Dictionary<string, byte>

Dictionary of shader argument names and values.

Read(BinaryReader)

Reads the block data from a binary reader.

public override void Read(BinaryReader reader)

Parameters

reader BinaryReader

The binary reader to read from.