binkle on Nostr: at some point i should really clean up my use of shaders right now each system has ...
at some point i should really clean up my use of shaders
right now each system has its own shader that it owns and all rendering code is controlled by that system
but obviously that means for N systems we have N shaders which means N gpu state changes
which is bad and it sucks
but fixing it means I have to generalize the shaders I have and consolidate them together in a way that makes sense and is efficient and also still adheres to the systems-first procedural approach I've been doing
likely it'll just be moving the generalized shaders to be part of the graphics system, and maybe maybe some sort of a map of shader->queue<drawn_obj> which is then iterated through each frame in the graphics system to minimize swapping shaders
right now each system has its own shader that it owns and all rendering code is controlled by that system
but obviously that means for N systems we have N shaders which means N gpu state changes
which is bad and it sucks
but fixing it means I have to generalize the shaders I have and consolidate them together in a way that makes sense and is efficient and also still adheres to the systems-first procedural approach I've been doing
likely it'll just be moving the generalized shaders to be part of the graphics system, and maybe maybe some sort of a map of shader->queue<drawn_obj> which is then iterated through each frame in the graphics system to minimize swapping shaders