I have to use several shaders.
In this situation, which way is often prefered?
- Making several effects
- Only one effect and several technicque
- or another way
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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. . .