Sign in to follow this  


Recommended Posts

hi take a look at my reflection code: Dim Mat As D3DMATRIX, mat2 As D3DMATRIX D3DDevice.GetTransform D3DTS_VIEW, Mat D3DDevice.GetTransform D3DTS_WORLD, mat2 D3DXMatrixInverse Mat, 0, Mat Mat.m41 = 0# Mat.m42 = 0# Mat.m43 = 0# Mat.m44 = 0# D3DDevice.SetTextureStageState 1, D3DTSS_COLOROP, D3DTOP_ADD D3DDevice.SetTextureStageState 1, D3DTSS_COLORARG1, D3DTA_TEXTURE D3DDevice.SetTextureStageState 1, D3DTSS_COLORARG2, D3DTA_CURRENT D3DDevice.SetTextureStageState 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT3 D3DDevice.SetTransform D3DTS_TEXTURE1, Mat D3DDevice.SetTexture 1, MeshCubeTex(FoundMeshCubeTexID) D3DDevice.SetTextureStageState 2, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE If TheMesh.AdvanceTex(PassNo).TexEffect = 4 Then D3DDevice.SetTextureStageState 1, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR Or 1 this Reflection works just fine when i do no scale or rotate on my mesh (D3DTS_WORLD is Identity) but when i transform my mesh it show a bad Reflection I also try . . . . D3DDevice.GetTransform D3DTS_WORLD, mat2 D3DXMatrixMultiply Mat, Mat, mat2 D3DXMatrixInverse Mat, 0, Mat Mat.m41 = 0# . . . . . it's not working too what i have to do!?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this