Do multiple pass materiasl end up on the render queue as totally independent draw calls-stategroups pairs ? I mean, will they be sorted in a way that a pass will be executed, than lots of object passes can be executed, than the second pass can be executed later, is that right?
On crister ericsons theres a material/pass key, so I assume all objects with the same material have their pass 1 executed in a row, than all pass 2 are executed later, but then,
how things like shadow map creation works? Shadow map is a global thing right(not a material thing, objects with different materials will need a shadow too)? So I dont see how it can work with that crister ericson "per material pass sorting", as objects of a material will be drawn before object with different materials, that also cast shadows, so material 1 objects will not be affected by shadows from material 2...get what I mean? I believe all objects that cast shadows, material independent, must be sorted so that all shadow mapping creation pass is executed first. Is my logic correct?