I'll mostly keep writing these addendum to give onlooker ideas and to documents them lol :D
I didn't thought of occlusion box because I forgot about doing particles the old way lol, as a list of object updated by a function lol. It make more sense there than reading a world align texture.
I now planned all my particles inside a single mesh using stateless function updated over time, don't work for all particle type though. Position of volume is passed through uniform and we mod against the range around the position.
In fact I'm trying to port that idea for terrain too (to avoid floating precision ranges at a distance), ie all terrain are just the same mesh updated in vertex shader and moved around, grass' billboard too, select the grass/object type based on reading a biome texture and swapping the uv in an atlas, jitter the grass based on a custom gpu noise... which allow me to plug this:
https://www.shadertoy.com/view/4djSRWHash without Sine
A Hash function that is the same on all systems and doesn't rely on trig functions. New hash on the left, sine hash function on the right. It appears to be the same efficiency, but I suppose that depends on the hardware.
other thing I want to explore using similar idea (passing data in the vertex color):
- procedural sincos animation on the gpu (character walking)
- noise base terrain height displacement
- two bone IK
-> accumulating them into character animation adjusting their feet with gpu ik on gpu noise height
I already have tested procedural sincos animation on the cpu, my plan is to pass pivot as vertex color, and sincos phase as uniform. It's bit like wind shader for tree extended to character. Great for ambient scene with lots of character.
Shader are indistinct from magic now.
I'll shared code later