Original Post
Hi, In relation to the architectural work in my journal, I've been contemplating how I might be able to take advantage of longer SM3 shaders to reduce the workload. A few important points: 1. This is to be used in conjunction with HDRI 2. Arbitrary number of lights - but point and directional only 3. Basic shadow mapping - it's not the focus of the work I'm doing, just adding it "because I can"... I've read a few articles about using SM3's longer shaders to allow for multiple lights to be rendered in a single pass. One of FarCry's patches (1.2?) implemented SM3 shaders simply as an optimization where it could reduce the number of drawing calls and general workload by combining multiple lights per pass. To get to the point... I was wondering if anyone here had any experience of combining MRT (Multiple Render Targets) in Direct3D9 with shadow mapping. From the caps database, it seem that SM3 hardware supports 4 MRT's - so I'm thinking it'd be possible to do 4 directional lights in one pass... BUT, I'm wondering if the only advantage is offloading it to the GPU and having 1 DIP() instead of 4 DIP() calls. The shader would still have to transform the geometry for each light source, and I've not found an answer to MRT's and multiple DST's. Anybody able to comment? Obviously, it makes my source code easier if I only use a lowest-common-denominator codepath [wink] Cheers, Jack