sample a texture as a rendertarget

ID3D11DeviceContext::PSSetShaderResources: Resource being set to PS shader resource slot 0 is still bound on output! Forcing to NULL. [ STATE_SETTING WARNING #7: DEVICE_PSSETSHADERRESOURCES_HAZARD]

 似乎psv ps3 ps4支持直接采样texture作为rendertarget但是 dx系列。。。。

dx11开了uav似乎可以我正在研究

phyreeinge 怎么create 本来我很想在一个texture上即做input又做output的但是看了这个帖子

http://www.gamedev.net/topic/653443-making-a-texture-render-to-itself/

感觉应该避免这种未定义的行为,即便硬件能支持,blur采样的同时改变了原来的texture。。。我需要更了解Gaussian blur。。

现在倾向于再开一个texture了

ps4支持同一个tex 同时input output 是因为它定义了

RW_Texture2D 这个的resource type 是UAV

还是不对。。。我做blur的那个shader里面肯定是普通的texture2d。。。接着看。。。接着猜。。

solution:
phyreengine dx11 不支持texture as input output 

我新开了rt ,要记得rt的dimetion设置对就可以了

原文地址:https://www.cnblogs.com/minggoddess/p/4222667.html