New answers tagged directx9
There are two main ways to do this. First way is to do exactly what you're trying to avoid doing, and use a render target. This is the way used by the Shadow Mapping sample for D3D9 in the old DirectX SDK, although it needn't be 32-bit (D3DFMT_R16F may well be sufficient). As a possible optimization you could use a NULL depth/stencil target, enable ...
You would have to render the results of the first to a texture, then read the texture in the second shader and output the results to the screen.
You can't rewrite that loop so that it can't be unrolled. GPUs do not in general support a varying number of attributes to be passed between stages. You can, however, eliminate the loop entirely. Just pass vPosWS to the fragment shader, and do the loop there. Then the unrolling will actually be helpful. Bonus: You don't waste an absurd amount of bandwidth ...
Unroll. The instruction cost is minimal - just a subtraction! You can try and put "[unroll]" (without quotes) just above the "for" line, or just unroll manually, but, really, unroll. You won't even have the comparison instruction for the for loop check.
I've run up to 7 off a single PC. First and foremost on multi-monitor on DX9: Use exclusive mode and run each head as an independent device or you risk the two display adapters trying to lock vsync with each other. Basically, neither will flip the back buffer until BOTH displays have finished rendering. This slows things down considerably. If you run them ...
Top 50 recent answers are included