Monopoli

Hi!
Is there a way to get all the semantics in a .FX file
I'm using DX9 this has to be possible also on X360 :)
Thank you!
Alex



Re: Game Technologies: Graphics Get Semantics from a .fx file

BLANC Guillaume

Of course it is: create a ID3DXEffect using D3DXCreateEffectFromFile. Then call ID3DXBaseEffect::GetParameter to iteratively get a handle to all parameters. Finaly, call ID3DXBaseEffect::GetParameterDesc with the previous parameters handles to get a full description of the parameter including its semantic.





Re: Game Technologies: Graphics Get Semantics from a .fx file

Monopoli

BLANC Guillaume wrote:
Of course it is: create a ID3DXEffect using D3DXCreateEffectFromFile. Then call ID3DXBaseEffect::GetParameter to iteratively get a handle to all parameters. Finaly, call ID3DXBaseEffect::GetParameterDesc with the previous parameters handles to get a full description of the parameter including its semantic.
I know this works for the parameters, but I'm trying to get the semantics of the streams, like the vertex buffer input.
Is there a way to get at least the name of the parts of stream that has a certain semantic
thanks! :-)





Re: Game Technologies: Graphics Get Semantics from a .fx file

BLANC Guillaume

Then you're probably looking for D3DXGetShaderInputSemantics that will give the input stream usage and index: enough to build a vertex declaration...