Threadpool visibility checking and icon drawing checking for units, features, and projectiles. Use that cached vector in rendering them, and also pass that cached vector to the appropriate Lua callins.
The vast majority of units do not have any 1-bit alpha transparency. Drawing their shadows could use a separate vbo and shader that only takes vertex position data.
Build a uniform buffer object for each piece, draw the above mentioned unit shadows for each unit type breadth-first (all pelvises, all torsos, etc) to avoid vbo rebinds.
Bad ideas?
Moderator: Moderators
Re: Bad ideas?
1) imo probably not worth the added complexity, vistest code is trivial to process
2) how do you plan to check if a model wants alpha-masked shadows?
3) thought about sharing uniforms with custom shaders?
2) how do you plan to check if a model wants alpha-masked shadows?
3) thought about sharing uniforms with custom shaders?
Re: Bad ideas?
2, the unitdef would specify it (this is trivially flawed, since multiple unitdefs can share the same model). Even the tex1 and tex2 could change through a custom unit shader, so that would be axed as collateral.
3. custom unit shaders would lose shadow access (kill me).
3. custom unit shaders would lose shadow access (kill me).
Re: Bad ideas?
badBeherith wrote:2, the unitdef would specify it (this is trivially flawed, since multiple unitdefs can share the same model). Even the tex1 and tex2 could change through a custom unit shader, so that would be axed as collateral.
You would better have to check the texture if it uses transparency or not (with a GL Query)