I would like to set a system that automatically unbind textures from input when they are used as render target. What I need is the input slot number of this texture.
How can I get it please ?
(Apparently, it can be possible via a shader reflector, but I would prefer a more direct way, and at the moment I don't create the reflectors of my shaders)
Thanks in advance
2 replies to this topic
Moderators - Reputation: 7456
Posted 13 August 2012 - 12:34 AM
There is no direct way to achieve what you want. If you want you can make some external mapping system that keeps track of all currently bound slots for any particular texture, and use that. Or you can ask the device for all currently bound shader resources for a particular shader stage, and look for a particular texture.