Table of Contents

Class ShaderCollection

Namespace
ValveResourceFormat.CompiledShader
Assembly
ValveResourceFormat.dll

Collection of related shader programs.

public class ShaderCollection : IEnumerable<VfxProgramData>, IEnumerable, IDisposable

Inheritance

Implements

Inherited Members

Properties

Compute

Gets the compute shader.

public VfxProgramData? Compute { get; }

Property Value

VfxProgramData?

Domain

Gets the domain shader.

public VfxProgramData? Domain { get; }

Property Value

VfxProgramData?

Features

Gets the features shader.

public VfxProgramData? Features { get; }

Property Value

VfxProgramData?

Geometry

Gets the geometry shader.

public VfxProgramData? Geometry { get; }

Property Value

VfxProgramData?

Hull

Gets the hull shader.

public VfxProgramData? Hull { get; }

Property Value

VfxProgramData?

Mesh

Gets the mesh shader.

public VfxProgramData? Mesh { get; }

Property Value

VfxProgramData?

Pixel

Gets the pixel shader.

public VfxProgramData? Pixel { get; }

Property Value

VfxProgramData?

PixelShaderRenderState

Gets the pixel shader render state.

public VfxProgramData? PixelShaderRenderState { get; }

Property Value

VfxProgramData?

Raytracing

Gets the raytracing shader.

public VfxProgramData? Raytracing { get; }

Property Value

VfxProgramData?

Vertex

Gets the vertex shader.

public VfxProgramData? Vertex { get; }

Property Value

VfxProgramData?

Methods

Add(VfxProgramData)

Adds a shader program to the collection.

public void Add(VfxProgramData program)

Parameters

program VfxProgramData

Dispose()

Disposes all shaders in the collection.

public void Dispose()

Dispose(bool)

Releases the unmanaged resources used by the ValveResourceFormat.CompiledShader.ShaderCollection and optionally releases the managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

True to release both managed and unmanaged resources; false to release only unmanaged resources.

FromEnumerable(IEnumerable<VfxProgramData>)

Creates a collection from an enumerable of shaders.

public static ShaderCollection FromEnumerable(IEnumerable<VfxProgramData> shaders)

Parameters

shaders IEnumerable<VfxProgramData>

Returns

ShaderCollection

Get(VcsProgramType)

Gets a shader program by type.

public VfxProgramData? Get(VcsProgramType type)

Parameters

type VcsProgramType

Returns

VfxProgramData?

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<VfxProgramData> GetEnumerator()

Returns

IEnumerator<VfxProgramData>

GetShaderCollection(string, Package?)

Loads all related shader files for a given shader.

public static ShaderCollection GetShaderCollection(string targetFilename, Package? vrfPackage)

Parameters

targetFilename string
vrfPackage Package?

Returns

ShaderCollection