Table of Contents

Class RenderMaterial

Namespace
ValveResourceFormat.Renderer
Assembly
Renderer.dll

Material with shader, textures, and render state for GPU rendering.

public class RenderMaterial

Inheritance

Inherited Members

Constructors

RenderMaterial(Material, RendererContext, Dictionary<string, byte>?)

[SetsRequiredMembers]
public RenderMaterial(Material material, RendererContext rendererContext, Dictionary<string, byte>? shaderArguments)

Parameters

material Material
rendererContext RendererContext
shaderArguments Dictionary<string, byte>?

RenderMaterial(Shader)

[SetsRequiredMembers]
public RenderMaterial(Shader shader)

Parameters

shader Shader

Fields

PerShaderSortIdRange

public const int PerShaderSortIdRange = 10000

Field Value

int

Properties

DoNotCastShadows

public bool DoNotCastShadows { get; }

Property Value

bool

IsAlphaTest

public bool IsAlphaTest { get; }

Property Value

bool

IsCs2Water

public bool IsCs2Water { get; }

Property Value

bool

IsOverlay

public bool IsOverlay { get; set; }

Property Value

bool

IsToolsMaterial

public bool IsToolsMaterial { get; }

Property Value

bool

IsTranslucent

public bool IsTranslucent { get; }

Property Value

bool

Material

public Material Material { get; }

Property Value

Material

Matrices

public Dictionary<string, Matrix4x4> Matrices { get; }

Property Value

Dictionary<string, Matrix4x4>

Shader

public required Shader Shader { get; init; }

Property Value

Shader

SortId

public int SortId { get; }

Property Value

int

Textures

public Dictionary<string, RenderTexture> Textures { get; }

Property Value

Dictionary<string, RenderTexture>

VertexAnimation

public bool VertexAnimation { get; }

Property Value

bool

Methods

LoadRenderState()

Load or reload render state from material data.

public void LoadRenderState()

PostRender()

public void PostRender()

Render(Shader?)

public void Render(Shader? shader = null)

Parameters

shader Shader?