ParticleShaders Class
Definition
Namespace: Brine2D.Rendering.SDL.Shaders
Built-in shaders for hardware-instanced particle rendering. Compiled at runtime via SDL_ShaderCross.
Inheritance System.Object → ParticleShaders
Remarks
The vertex shader uses two vertex buffer slots:
slot 0 — a static per-vertex unit quad (4 × float2 Corner, pitch = 8 bytes);
slot 1 — a per-instance buffer of ParticleInstance records (48 bytes each).
Instance layout (48 bytes, matches SDL3ParticleRenderer.ParticleInstance):
- float2 Position (offset 0)
- float Size (offset 8)
- float Rotation (offset 12)
- float4 Color (offset 16)
- float4 UVRect (offset 32) — set to (2,2,3,3) for SDF circle