# How to set .fx vars

This topic is 3530 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I need to set these setttings for a .fx file float4x4 World : WORLD; float4x4 WorldI : WORLDI; float4x4 View : VIEW; float4x4 ViewI : VIEWI; float4x4 Projection : PROJECTION; float4x4 WorldViewProj : WORLDVIEWPROJ; float4x4 WorldView : WORLDVIEW; I know how to set these, effect2.Parameters["World"].SetValue(boneTransforms[mesh.ParentBone.Index]); effect2.Parameters["View"].SetValue(view); effect2.Parameters["Projection"].SetValue(projection); but am unsure how to set the others, Anyone done this before? and could help me with the commands? Thanks, MajSlayer

##### Share on other sites
you can set them the same way, nothing changes...

for example you could:

Matrix WV = boneTransforms[mesh.ParentBone.Index] * view;effect2.Parameters["WorldView"].SetValue(WV);effect2.Parameters["WorldViewProj"].SetValue( WV * projection);

##### Share on other sites
Roger but how do I set the inverse ones? (least I think thats what the "i" means

Thanks
MajSlayer

##### Share on other sites
this is independent from the effect.
You need to compute the inverse of the matrix and use it as a parameter as you would normally do.

Docs are always a good source.