I'm a hobbyist learning DirectX. I'm using C# with SharpDX. I'm a strong developer, pretty good with the graphics and math but still wrapping my brain around how to use the shaders and the order of things.
I'm not clear on when you are supposed to load a new shader.
lets say I have two boxes, each with different texture (from a bitmap for example)
I see that I can load the texture into the card and I see how its referenced in the shader.
I also see how you can load multiple textures into the card and refer to them in the shaders.
However, what's the flow for having the shader pick one texture vs. another?
A related question is that I see how rich the shader coding world is. Does a typical design use different shader code for different objects? If I have one shiny object, one thing that is water, and something else that has a matte finish these would seem to be different shaders. Is the rendering flow to 'load shader for object/draw object'?
thanks,
john