/// <summary> /// Cargar todas la matrices generales que necesita el shader. /// </summary> public void SetShaderMatrix(Effect effect, TGCMatrix world) { var matWorldView = world.ToMatrix() * D3DDevice.Device.Transform.View; var matWorldViewProj = matWorldView * D3DDevice.Device.Transform.Projection; effect.SetValue("matWorld", world.ToMatrix()); effect.SetValue("matWorldView", matWorldView); effect.SetValue("matWorldViewProj", matWorldViewProj); effect.SetValue("matInverseTransposeWorld", TGCMatrix.TransposeMatrix(TGCMatrix.Invert(world)).ToMatrix()); }