cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

lucky7456969
Journeyman III

AMD fixedFuncShader with a hierarchy in place.

I understood that fixfuncshader is directly transforming vectors from world to clip.

But I now got a hierarchy. How do I define the following variables?

- matView

- matWorldView

- matWorldViewIT

- matViewIT

- matWorldViewProj

virtual void Render()
{
 
CObjects::Render();
  g_pEffect
->SetTechnique(g_pEffect->GetTechniqueByName("basic_with_shader"));
  D3DXMATRIXA16 compMat
, invMat;
  g_pEffect
->SetMatrixTranspose("matView", &g_Cam[iCurCam].GetViewMatrix());
  D3DXMatrixMultiply
(&compMat, &m_matWorld, &g_Cam[iCurCam].GetViewMatrix());
  g_pEffect
->SetMatrixTranspose("matWorldView", &compMat);
  D3DXMatrixInverse
(&invMat, NULL, &compMat);
  D3DXMatrixTranspose
(&invMat, &invMat);
  g_pEffect
->SetMatrixTranspose("matWorldViewIT", &invMat);
  D3DXMatrixInverse
(&invMat, NULL, &g_Cam[iCurCam].GetViewMatrix());
  D3DXMatrixTranspose
(&invMat, &invMat);
  g_pEffect
->SetMatrixTranspose("matViewIT", &invMat);
  D3DXMatrixMultiply
(&compMat, &compMat, &g_Cam[iCurCam].GetProjMatrix());
  g_pEffect
->SetMatrixTranspose("matWorldViewProj", &compMat);
  g_pEffect
->SetMatrixTranspose("matProj", &g_Cam[iCurCam].GetProjMatrix());
  m_Mesh
->UpdateFrame(NULL, &m_matWorld);
  m_Mesh
->RenderTransparent();
}


0 Likes
1 Reply
kcarney
Staff

I need a little more information so I can find the right person to reply to your question. Are you using a specific AMD software tool?

0 Likes