Class VfxShaderFileVulkan
Namespace: ValveResourceFormat.CompiledShader
Assembly: ValveResourceFormat.dll
Vulkan SPIR-V shader bytecode.
public class VfxShaderFileVulkan : VfxShaderFileInheritance
object ← ShaderDataBlock ← VfxShaderFile ← VfxShaderFileVulkan
Inherited Members
VfxShaderFile.ParentCombo, VfxShaderFile.SourceType, VfxShaderFile.ShaderFileId, VfxShaderFile.Size, VfxShaderFile.Bytecode, VfxShaderFile.HashMD5, VfxShaderFile.GetDecompiledFile(), VfxShaderFile.IsEmpty(), ShaderDataBlock.Start, ShaderDataBlock.ReadStringWithMaxLength(BinaryReader, int)
Constructors
VfxShaderFileVulkan(BinaryReader, int, int, Guid, VfxStaticComboData)
Initializes a new instance with explicit size and hash.
public VfxShaderFileVulkan(BinaryReader datareader, int shaderFileId, int size, Guid hash, VfxStaticComboData parent)Parameters
datareader BinaryReader
shaderFileId int
size int
hash Guid
parent VfxStaticComboData
VfxShaderFileVulkan(byte[])
Initializes a new instance from pure SPIR-V, unassociated with any combo.
public VfxShaderFileVulkan(byte[] bytecode)Parameters
bytecode byte[]
VfxShaderFileVulkan(BinaryReader, int, VfxStaticComboData, bool)
Initializes a new instance from a binary reader.
public VfxShaderFileVulkan(BinaryReader datareader, int shaderFileId, VfxStaticComboData parent, bool isMobile)Parameters
datareader BinaryReader
shaderFileId int
parent VfxStaticComboData
isMobile bool
Properties
AttribMap
Vertex attribute slot for each vertex shader input location, packed as (usage << 4) | usageIndex. The usage is a , which together with the index identifies the
Slots the shader compiler optimized away are still listed, which is why locations are not always contiguous.
public byte[]? AttribMap { get; }Property Value
byte[]?
BytecodeSize
Gets the size of the bytecode.
public int BytecodeSize { get; }Property Value
DefaultDescriptorSetBindingInfo
public VfxShaderFileVulkan.PerDescriptorSetBindingInfo? DefaultDescriptorSetBindingInfo { get; }Property Value
VfxShaderFileVulkan.PerDescriptorSetBindingInfo?
DescriptorSetHashes
public uint[]? DescriptorSetHashes { get; }Property Value
uint[]?
EntryPoints
public uint[]? EntryPoints { get; }Property Value
uint[]?
HiddenUAVCounters
public VfxShaderFileVulkan.HiddenUAVCounter[]? HiddenUAVCounters { get; }Property Value
VfxShaderFileVulkan.HiddenUAVCounter[]?
PushConstantSize
public int PushConstantSize { get; }Property Value
RequiredSubgroupSize
public short RequiredSubgroupSize { get; }Property Value
ShaderStorageBufferBindings
public VfxShaderFileVulkan.ShaderStorageBufferBinding[]? ShaderStorageBufferBindings { get; }Property Value
VfxShaderFileVulkan.ShaderStorageBufferBinding[]?
SourceType
Gets the shader source format name.
public override string SourceType { get; }Property Value
StaticDescriptorSetBindingInfoData
public byte[]? StaticDescriptorSetBindingInfoData { get; }Property Value
byte[]?
ThreadGroupSize
public int[]? ThreadGroupSize { get; }Property Value
int[]?
UseShaderStageName
public bool UseShaderStageName { get; }Property Value
Version
Gets the shader file version.
public int Version { get; }Property Value
VertexInputScalarTypes
Base scalar type of every vertex shader input location, one byte per entry of . The known values are 4 for float and 2 for unsigned int. It is null for stages other than the vertex shader.
public byte[]? VertexInputScalarTypes { get; }Property Value
byte[]?
Methods
GetDecompiledFile()
Decompiles the shader to source code.
public override string GetDecompiledFile()Returns
Remarks
Decompiles SPIR-V bytecode to HLSL or GLSL using SPIRV-Cross reflection, attempting multiple backends until successful.
TryGetInputSemantic(uint, out string, out int)
Gets the Direct3D vertex semantic the vertex layout assigns to a shader input location. Returns false when this shader has no attribute map or does not use that location.
public bool TryGetInputSemantic(uint location, out string semanticName, out int semanticIndex)Parameters
location uint
The SPIR-V input location.
semanticName string
The Direct3D semantic name, e.g. TEXCOORD.
semanticIndex int
The Direct3D semantic index.

