Original Post
i've got now two ways how i can deal with per-pixel-lighting and i'm not sure yet which version is better. 1) use a pixel shader for each individual light type: directional, point, spot. this needs switching shader program for each scene element i render and for each light affecting it. 2) use one pixel shader which has some if-else statements inside but covers all three light types. needs no changing of shader program for each scene element and light but has if-else statements.
