Table of Contents

Class ShaderExtract

Namespace
ValveResourceFormat.IO
Assembly
ValveResourceFormat.dll

Extracts Source 2 compiled shaders to readable shader code.

public sealed class ShaderExtract

Inheritance

Inherited Members

Constructors

ShaderExtract(Resource)

Initializes a new instance of the ValveResourceFormat.IO.ShaderExtract class.

public ShaderExtract(Resource resource)

Parameters

resource Resource

ShaderExtract(SboxShader)

Initializes a new instance of the ValveResourceFormat.IO.ShaderExtract class.

public ShaderExtract(SboxShader sboxShaderCollection)

Parameters

sboxShaderCollection SboxShader

ShaderExtract(ShaderCollection)

Initializes a new instance of the ValveResourceFormat.IO.ShaderExtract class.

public ShaderExtract(ShaderCollection shaderCollection)

Parameters

shaderCollection ShaderCollection

Properties

Compute

Gets the compute shader program data.

public VfxProgramData? Compute { get; }

Property Value

VfxProgramData?

Domain

Gets the domain shader program data.

public VfxProgramData? Domain { get; }

Property Value

VfxProgramData?

Features

Gets the features program data.

public VfxProgramData? Features { get; }

Property Value

VfxProgramData?

Geometry

Gets the geometry shader program data.

public VfxProgramData? Geometry { get; }

Property Value

VfxProgramData?

Hull

Gets the hull shader program data.

public VfxProgramData? Hull { get; }

Property Value

VfxProgramData?

Mesh

Gets the mesh shader program data.

public VfxProgramData? Mesh { get; }

Property Value

VfxProgramData?

Pixel

Gets the pixel shader program data.

public VfxProgramData? Pixel { get; }

Property Value

VfxProgramData?

PixelShaderRenderState

Gets the pixel shader render state data.

public VfxProgramData? PixelShaderRenderState { get; }

Property Value

VfxProgramData?

Raytracing

Gets the raytracing shader program data.

public VfxProgramData? Raytracing { get; }

Property Value

VfxProgramData?

Shaders

Gets the shader collection.

public ShaderCollection Shaders { get; init; }

Property Value

ShaderCollection

Vertex

Gets the vertex shader program data.

public VfxProgramData? Vertex { get; }

Property Value

VfxProgramData?

Methods

GetVariantZFrameParameters(VfxStaticComboData)

Gets the variant Z-frame parameters from the static combo data.

public HashSet<int> GetVariantZFrameParameters(VfxStaticComboData zFrameFile)

Parameters

zFrameFile VfxStaticComboData

Returns

HashSet<int>

GetVfxFileName()

Gets the VFX file name for this shader.

public string GetVfxFileName()

Returns

string

ToContentFile()

Converts the shader to a content file with extracted shader code.

public ContentFile ToContentFile()

Returns

ContentFile

ToVFX()

Converts the shader to VFX format for inspection.

public string ToVFX()

Returns

string

ToVFX(in ShaderExtractParams)

Converts the shader to VFX format with includes using specified options.

public (string VfxContent, IDictionary<string, string> Includes) ToVFX(in ShaderExtract.ShaderExtractParams options)

Parameters

options ShaderExtract.ShaderExtractParams

Returns

(string VfxContent, IDictionary<string, string> Includes)