Skip to content

IShaderLoader Interface

Definition

Namespace: Brine2D.Rendering

Service for loading and compiling shaders using ShaderCross. ShaderCross supports HLSL source or SPIRV bytecode as input.

C#
public interface IShaderLoader

Derived
SDL3ShaderLoader

Methods
CreateDefaultShaders() Creates the default shader pipeline for basic rendering.
LoadFromBytecode\(string, ShaderStage, byte\[\], string\) Loads a shader from pre-compiled bytecode.
LoadFromFileAsync\(string, ShaderStage, CancellationToken\) Loads a shader from a file \(\.hlsl or \.spv\).
LoadFromSource\(ShaderSource\) Loads a shader from source code \(HLSL\) or bytecode \(SPIRV\). ShaderCross will automatically transpile to the correct format for the current GPU backend.