How can I specify which render target I'm binding to with a RWTexture2D? I'm very new to D3D programming, and previously I always bind explicitly my texture to a render target. This time since I need to write values to a texture and then use that texture as an input, I want to try RWTexture2D. However, since I'm also using my previous method to specify other render target (I have a output color texture and other outputs), I have no idea how the order of the render targets will be.. pDstFbo->attachColorTarget(pDstTex, 0); pDstFbo->attachColorTarget(pMomentsTex, 1); (I'm using some frameworks but the code should be straightforward.) What if I want to bind my RWTexture2D texture to render target at slot 2? Can I specify this in the shader code? RWTexture2D gPrevMoments; // current code, which do not specify which slot in the render target it is bound to Can I do RWTexture2D gPrevMoments : register(u2); // bind to render target SV_TARGET2? https://ift.tt/eA8V8J
I'm very new to D3D programming, and previously I always bind explicitly my texture to a render target. This time since I need to write values to a texture and then use that texture as an input, I want to try RWTexture2D. However, since I'm also using my previous method to specify other render target (I have a output color texture and other outputs), I have no idea how the order of the render targets will be.. pDstFbo->attachColorTarget(pDstTex, 0); pDstFbo->attachColorTarget(pMomentsTex, 1); (I'm using some frameworks but the code should be straightforward.) What if I want to bind my RWTexture2D texture to render target at slot 2? Can I specify this in the shader code? RWTexture2D gPrevMoments; // current code, which do not specify which slot in the render target it is bound to Can I do RWTexture2D gPrevMoments : register(u2); // bind to render target SV_TARGET2?
from GameDev.net https://ift.tt/2HUENWx
from GameDev.net https://ift.tt/2HUENWx
ليست هناك تعليقات