A weird problem with vertex shader

Started by
2 comments, last by DadleFish 16 years, 10 months ago
I'm trying to use a simple VS in my application. This had worked some time ago but now it seems to just stop all of a sudden. The symptom is that the vertices are just not being transformed. My VS looks like that:

vs.2.0
dcl_position v0
dcl_normal v3
dcl_texcoord v6
m4x4 oPos, v0, c0
mov oD0, c4
mov oT0, v6
And as a preparation (part of it) I do the following:

    Matrix4 transposed;
    Matrix4 combo = m_worldTransformationMatrix * m_viewTransformationMatrix * m_projectionTransformationMatrix;
    combo.Identity();
    combo.Transpose(transposed);
    m_pDevice->SetVertexShaderConstantF(SCR_WORLD2VIEWMAT, transposed.Get(), 4);
Now, this code used to work but it doesn't right now, and if I'm not activating the shader for the object I'm trying to draw - then everything is fine (using the same matrices shown above). Any idea about this? P.S. I have another technical problem, I can't debug my shaders in VS2005 - more accurately, I can't seem to find the DX menu in VS2005 after installing the SDK... Thanks!
Dubito, Cogito ergo sum.
Advertisement
combo.Identity() is erasing your transform. Get rid of it.
Quote:Original post by DadleFish
P.S. I have another technical problem, I can't debug my shaders in VS2005 - more accurately, I can't seem to find the DX menu in VS2005 after installing the SDK...

It's gone. DirectX debugging in the IDE was only available in VS 2003. Use PIX for Windows.
Sirob Yes.» - status: Work-O-Rama.
Ok, that was dumb of me. I removed the Identity() call, and now I can't see my box at all. Just gone, disappeared into thin air.

I'll try working with pix indeed to find my bug.

Meanwhile I'd appreciate any idea.

Thanks to you two!
Dubito, Cogito ergo sum.

This topic is closed to new replies.

Advertisement