CompiledShader

class CompiledShader(val stage: ShaderStage, msl: String, spirvBase64: String, dxilBase64: String, val samplers: Int, val storageTextures: Int, val storageBuffers: Int, val uniformBuffers: Int)(source)

One shader compiled for every backend: MSL source for Metal, SPIR-V for Vulkan and DXIL for Direct3D 12, with the resource counts SDL needs. Produced by the compileShaders build task from HLSL; create the backend's shader with GpuDevice.createShader.

Constructors

Link copied to clipboard
constructor(stage: ShaderStage, msl: String, spirvBase64: String, dxilBase64: String, samplers: Int, storageTextures: Int, storageBuffers: Int, uniformBuffers: Int)

Properties

Link copied to clipboard

Number of texture samplers the shader reads.

Link copied to clipboard

The pipeline stage the shader runs in.

Link copied to clipboard

Number of read-only storage buffers the shader reads.

Link copied to clipboard

Number of read-only storage textures the shader reads.

Link copied to clipboard

Number of uniform buffers the shader reads.

Functions

Link copied to clipboard
open override fun toString(): String