Hi everyone,
I think my question boils down to "How do i feed shaders?"
I was wondering what are the good strategies to store mesh transformation data [World matrices] to then be used in the shader for transforming vertices (performance being the priority ).
And i'm talking about a game scenario where there are quite a lot of both moving entities, and static ones, that aren't repeated enough to be worth instanced drawing.
So far i've only tried these naive methods :
DX11 :
- Store transforms of ALL entities in a constant buffer ( and give the entity an index to the buffer for later modification )
- Or store ONE transform in a constant buffer, and change it to the entity's transform before each drawcall.
Vulkan :
- Use Push Constants to send entity's transform to the shader before each drawcall, and maybe use a separate Device_local uniform buffer for static entities?
Same question applies to lights.
Any suggestions?