Add ParticleRenderer that draws every live particle from the shared ParticleSystem as a billboarded quad. Unit quad VBO + per-instance (pos, size, color) VBO with glVertexAttribDivisor for one draw call per emitter. Billboards using the camera's basis vectors so quads always face the viewer. Fragment shader does a procedural radial falloff (no texture pipeline needed — raindrops / snowflakes read as soft dots). AttachLocal emitters get re-centred on the camera each frame so the rain volume follows the player per r12 §7. Two-pass render splits additive from alpha-blend emitters so blend state flips once per kind rather than per-emitter. Wired into GameWindow.OnRender after static-mesh draw with depth write off (particles occluded by walls but don't self-occlude). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| debug_line.frag | ||
| debug_line.vert | ||
| mesh.frag | ||
| mesh.vert | ||
| mesh_instanced.frag | ||
| mesh_instanced.vert | ||
| particle.frag | ||
| particle.vert | ||
| sky.frag | ||
| sky.vert | ||
| terrain.frag | ||
| terrain.vert | ||
| ui_text.frag | ||
| ui_text.vert | ||