Just so you know, the render targets are valid, as when I clear them with, e.g. a red or a green color, it appears in the output, even in pix.
But it still appears as if the second and third render targets aren't being written to...
Just so you know, the render targets are valid, as when I clear them with, e.g. a red or a green color, it appears in the output, even in pix.
But it still appears as if the second and third render targets aren't being written to...
Look at the render targets while having selected the draw call that should render to them. what shows up there? Right-click any pixel, and press "debug pixel". Also, try to output explicitely float4(1.0f, 1.0f, 1.0f, 1.0f) to the second and third render target - there might be some issue with your calculations here.
When debuggin the first RT, the pixel is written to correctly:
Pixel History
Pixel (427, 298) of Render Target 0x069F85B8, Frame 616
But then in the 2nd render target, nothing is there!
Same pixel location as in the 1st RT:
Pixel History
Pixel (427, 298) of Render Target 0x069F8658, Frame 616
Thats odd. On that same draw-call, look at the device, and inspect its states till you have found the render-target section (don't know which category its under, you should easily find it). Are all render targets still bound at this point in time?
I dont know if this is too much to ask for, but maybe one of you guys can write a small mini tutorial with all the steps to create a directx 11 app with multiple render targets, like a small step based tutorial, e.g.:
To see if I've done everything right...
I do believe that all my render targets are valid, as if I change the order of the render targets, it's still the first render target that works.
Btw, how can you check the maximum render targets your graphics card supports?
The output signature of the pixel shader:
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------ ------
// SV_Target 0 xyzw 0 TARGET float xyzw
// SV_Target 1 xyzw 1 TARGET float xyzw
// SV_Target 2 xyzw 2 TARGET float xyzw
After hours in PIX, all the render targets seems to be connected correctly, but when rendering the mesh (PIX has the quite amazing feature where you can see the resources change over time!), still only the first render target gets written to!