b2dLoadImageShader

Loads custom pixel shader for 2D images (.hlsl runtime compile or .cso precompiled, ps_5_0, global shader state). Takes filename (shader file path, string, .hlsl or .cso extension). Returns shader handle (positive integer, use with b2dDrawImageEx), returns 0 on failure (file not found, compilation error, PSO creation failed).

Shaders

Parameters & Returns

Parameters

filename String

Returns

Int

Quick Summary

Loads custom pixel shader for 2D images (.hlsl runtime compile or .cso precompiled, ps_5_0, global shader state). Takes filename (shader file path, string, .hlsl or .cso extension). Returns shader handle (positive integer, use with b2dDrawImageEx), returns 0 on failure (file not found, compilation error, PSO creation failed).

Technical Exegesis...

Loads custom pixel shader for 2D images (.hlsl runtime compile or .cso precompiled, ps_5_0, global shader state). Takes filename (shader file path, string, .hlsl or .cso extension). Returns shader handle (positive integer, use with b2dDrawImageEx), returns 0 on failure (file not found, compilation error, PSO creation failed). Detects file type by extension (.hlsl = runtime compile with D3DCompile, .

Example

Example.bam
; No example implemented yet