Original Post
I can't find anything that answers this directly, but you can only have ONE shader on a game object, correct?
i.e. I cannot make two completely separate shaders and run both on the same object without it just rendering twice.
Assuming the above is true, how do most programmers create objects with multiple shader effects?
For example:
A Wall
- Bumpmap shader
- Rain shader (streaming water)
- Lighting shader (for any nearby lights (p.s. how does it pick the dynamic lights?))
- Projectile shader (bullets hitting the wall, etc)
Also, speaking of shaders. One effect that I can't quite see how to do is a targeting effect that covers multiple objects, similar to those found on AoE abilities in WoW or LoL. I can only guess it has to use the mouse position combined with the camera position and view along with the position and normal of the surface to draw a section of the defined "target" texture?
i.e. I cannot make two completely separate shaders and run both on the same object without it just rendering twice.
Assuming the above is true, how do most programmers create objects with multiple shader effects?
For example:
A Wall
- Bumpmap shader
- Rain shader (streaming water)
- Lighting shader (for any nearby lights (p.s. how does it pick the dynamic lights?))
- Projectile shader (bullets hitting the wall, etc)
Also, speaking of shaders. One effect that I can't quite see how to do is a targeting effect that covers multiple objects, similar to those found on AoE abilities in WoW or LoL. I can only guess it has to use the mouse position combined with the camera position and view along with the position and normal of the surface to draw a section of the defined "target" texture?