• Advertisement
Sign in to follow this  

A weird problem with vertex shader

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement