Questions Concerning Draw Calls
Did some searching but didn't find anything so I'm not sure how relevant these questions are to Doomsday Engine and/or to .MD2 meshes.
1) Is there currently a way to view draw calls during gameplay?
2) If an .md2 model is set to use one texture but then the ded tells it to use a different texture, will that add an additional call?
3) What is the current maximum texture pixel dimensions if there is one? I'm creating large texture atlases to reduce the number of calls but I don't want to create something that is too large.
4) What effects (i.e, fullbright) would increase draw calls if added to sub-models?
1) Is there currently a way to view draw calls during gameplay?
2) If an .md2 model is set to use one texture but then the ded tells it to use a different texture, will that add an additional call?
3) What is the current maximum texture pixel dimensions if there is one? I'm creating large texture atlases to reduce the number of calls but I don't want to create something that is too large.
4) What effects (i.e, fullbright) would increase draw calls if added to sub-models?
Comments
2/3) Presently yes that will result in an additional fetch/context switch if the submodels use different skin textures. However, I wouldn't bother creating your own atlases for model textures as the new 2.0 model renderer (scheduled for 1.15) loads them into atlases automatically.
4) The main reasons for an additional model rendering pass are the use of special blending modes and shiny textures. Fullbright, being a uniformly-applied lighting adjustment has no effect on the number of passes needed to draw a model.
As mentioned though, the new model renderer is quite a game changer from a technological perspective. Optimizing for the soon to be replaced model renderer is probably a waste of time to be honest.
I'm sure skyjake can give you some pointers/additional info when he sees this
1) Didn't think so. Sort of a newer-ish thing for developers to track.
2/3) Woah... You guys really are going modern with this. This one is going to save me a lot of time.
4) So, fullbright is free. Good to know.
I would love some pointers/additional info on the new model renderer. Is there somewhere I can go to read up on that?
Some important points that are already certain:
I haven't yet decided how exactly to handle the old model renderer. It is not compatible with the GL2 graphics, so it will have to be dropped at some point. Possibly the best approach is to make an importer for old model definitions that reproduce the appearance using the new renderer, although that might not result in the best performance.
I've got all of my source models waiting for this day.
The sooner that MD2 is consigned to the great 5 1/4 floppy drive in the sky, the better. It's a format that really needs to be put out of it's (read as: 'our') misery.
1) Does the alpha channel of a .TGA image add an additional draw call?
2) When a .TGA is added to the image atlas, are the alpha channels atlased as well? And are there any special considerations that should be taken when creating alpha channels?