Table of Contents

Class VfxShaderFile

Namespace
ValveResourceFormat.CompiledShader
Assembly
ValveResourceFormat.dll

Base class for platform-specific shader bytecode.

public abstract class VfxShaderFile : ShaderDataBlock

Inheritance

Derived

Inherited Members

Constructors

VfxShaderFile(BinaryReader, int, VfxStaticComboData)

Initializes a new instance from a binary reader.

protected VfxShaderFile(BinaryReader datareader, int sourceId, VfxStaticComboData parent)

Parameters

datareader BinaryReader
sourceId int
parent VfxStaticComboData

VfxShaderFile(int, VfxStaticComboData)

Initializes a new instance with default values.

protected VfxShaderFile(int sourceId, VfxStaticComboData parent)

Parameters

sourceId int
parent VfxStaticComboData

Properties

BlockName

Gets the shader platform name.

public abstract string BlockName { get; }

Property Value

string

Bytecode

Gets or sets the shader bytecode.

public byte[] Bytecode { get; protected set; }

Property Value

byte[]

HashMD5

Gets or sets the MD5 hash of the shader.

public Guid HashMD5 { get; protected set; }

Property Value

Guid

ParentCombo

Gets the parent static combo data.

public VfxStaticComboData ParentCombo { get; }

Property Value

VfxStaticComboData

ShaderFileId

Gets the shader file identifier.

public int ShaderFileId { get; }

Property Value

int

Size

Gets or sets the bytecode size.

public int Size { get; protected set; }

Property Value

int

Methods

GetDecompiledFile()

Decompiles the shader to source code.

public abstract string GetDecompiledFile()

Returns

string

IsEmpty()

Checks if the shader is empty.

public bool IsEmpty()

Returns

bool