a-day-old-bagel / DualityEngine

3D game stuff
0 stars 0 forks source link

Shader organization #22

Open a-day-old-bagel opened 8 years ago

a-day-old-bagel commented 8 years ago

So model rendering will correctly draw models in batches (meaning that all of one kind of model will be drawn in a sequence, then all of the next kind of model will be drawn) to avoid unnecessary state changes on the GPU. Now the question is how to allow a similar batching of shaders, since two instances of the same model may not use the same shader. Similar question here