문제

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
도움이 되었습니까?

해결책

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. . .

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top