The experiment of shader programming with if-condition instruction
Today I make an experiment to talk about the if-else syntax in shader codes, how this way influences my application performance.
- The first one has three shaders are one point light, two point lights, and three point lights. We apply them to three different surface model.
- The second one, we use a shader code which writes three if condition instructions to show three types light which also be applied to three different surface model(same with upper experiment).
Comments
Post a Comment