I'm beginning to add shader based capabilities to my wrapper API for dx9.0c.
at first, i can get away with shaders for special effects (instancing, swaying grass, etc), and fixed function for the things its capable of (gourard and phong, alphatest and alpha blend, 2 stage texture blending, etc).
but if i eventually go to 100% shader based, this would likely call for a re-design of the render queue.
in fixed function, textures have the highest binding cost. so my render queue sorts on texture. to date that has been fast enough that i don't even bother with sorting on mesh, distance, etc. but that's just with placeholder graphics.
so looking forward to a time when i'm 100% shader based, what are the binding costs i'm looking at? where does setting vertex and pixel shaders and constants fall in the list of binding texture, input streams, shader constants, input formats, pixel shader, vertex shader, etc ? materials will be replaced by pixel shaders (right?) - so no binding costs there.
i'll want single purpose pre-compiled shaders, and i'll want to treat them as a shared graphics resource, in a memory pool, with state management, right? perhaps with shared memory pools of constants and formats as well?