Original Post
Hi, I'm in the process of converting my old shaders to HLSL, simultaneously trying to add more flexibility. Amongst my old shaders, I had specific one-pass shaders that supported, for example, 1 directional and 2 spotlights simultaneously. As I pondered the conversion philosophically (considering the possible combination of light types, number of lights, bump mapping, shadows, etc) I realized that my one-shader-to-one-combination may not be the best way to go. What's the conventional wisdom these days, i.e. what do most folks use, to accommodate the variety of lighting conditions while protecting engine performance? Is multi-pass (layering one light at a time) preferred over my approach, or are other techniques better? My scenes are generally outdoors aircraft/space flight simulations, requiring one directional light (the sun) and 3 or less point/spot lights. Thanks for any thoughts! Brad