does anyone happen to know how to work with ID3D10ShaderReflection and
I have checked the documentation, but it’s not really clear to me.
Here’s the documentation’s example:
ID3D11ShaderReflection* pReflector = NULL;
IID_ID3D11ShaderReflection, (void**) &pReflector);
But I’m not working with creating my own pixel shaders inside DirectX at
all. I’m just working with effects and techniques.
(ID3D10Effect* m_pEffect) etc.
Can I retrieve the information I need from those or how is it supposed
Please log in or register to post a reply.
Hmm, I know you can do this in D3D11, but I can’t find the equivalent
way in D3D10. In D3D11, you can get the shader bytecode out of the
effect; you just have to dig for it a bit. For each pass in each
technique in the effect you can call GetPixelShaderDesc (or
corresponding functions for the other kinds of shaders). The struct
returned contains a pointer to an ID3DX11EffectShaderVariable object, on
which you can call GetShaderDesc, which finally contains the pointer and
size of the bytecode for the shader.
In D3D10, corresponding functions and objects exist, but the bytecode
pointer is not present in the last struct. So I don’t know if you can
get to the bytecode with the D3D10 effects library. It may be possible
to do it with ID3D10EffectShaderVariable::GetData() but I don’t know
whether that will work.
it should be possible to do it, else why would they have an
I’ll try what you said and let you know.
According to my intellisense there is no such member function
EDIT: I think it might be possible via via this:
I’m going to test it now.
2nd EDIT: Not working… I’ll just hardcode the inputlayouts then. :(