Question

I have to use several shaders. In this situation, which way is often prefered?

  1. Making several effects
  2. Only one effect and several technicque
  3. or another way
Was it helpful?

Solution

Write effects that address a particular purpose, that use similar resources, and expect similar inputs. Don't try to address all of your rendering needs by stuffing everything into one effect. Write an effect for general rendering, another to address a desired style like normal mapping, or cube mapping, etc. If it's a question of applying different shading algorithms, I would say write separate effects. Tailor your effect to its application and create techniques within it to address a variety of hardware concerns, or runtime conditions. If you have a simple project that doesn't require industrial strength code, and effect management is a concern, stuff away. Honestly though do what suits the project best, what is most efficient for your case. . .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top