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
Domain
Gets the domain shader program data.
public VfxProgramData Domain { get; }
Property Value
Features
Gets the features program data.
public VfxProgramData Features { get; }
Property Value
Geometry
Gets the geometry shader program data.
public VfxProgramData Geometry { get; }
Property Value
Hull
Gets the hull shader program data.
public VfxProgramData Hull { get; }
Property Value
Mesh
Gets the mesh shader program data.
public VfxProgramData Mesh { get; }
Property Value
Pixel
Gets the pixel shader program data.
public VfxProgramData Pixel { get; }
Property Value
PixelShaderRenderState
Gets the pixel shader render state data.
public VfxProgramData PixelShaderRenderState { get; }
Property Value
Raytracing
Gets the raytracing shader program data.
public VfxProgramData Raytracing { get; }
Property Value
Shaders
Gets the shader collection.
public ShaderCollection Shaders { get; init; }
Property Value
SpirvCompiler
A delegate that takes in SPIR-V bytecode and returns HLSL.
public Func<VfxShaderFileVulkan, string> SpirvCompiler { get; set; }
Property Value
Vertex
Gets the vertex shader program data.
public VfxProgramData Vertex { get; }
Property Value
Methods
GetVariantZFrameParameters(VfxStaticComboData)
Gets the variant Z-frame parameters from the static combo data.
public HashSet<int> GetVariantZFrameParameters(VfxStaticComboData zFrameFile)
Parameters
zFrameFile
VfxStaticComboData
Returns
GetVfxFileName()
Gets the VFX file name for this shader.
public string GetVfxFileName()
Returns
ToContentFile()
Converts the shader to a content file with extracted shader code.
public ContentFile ToContentFile()
Returns
ToVFX()
Converts the shader to VFX format for inspection.
public string ToVFX()
Returns
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