• Advertisement

Archived

This topic is now archived and is closed to further replies.

"Vertex Shader" can't render "vertex normal"?

This topic is 5999 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

Hi everyone, I try to render a 3D model by "Vertex Shaders", but all my 3D models from 3D Studio MAX R3 with vertex normal couldn''t be rendered out for smooth surfaces; those 3D models can be rendered correctly for true normal by regular direct3D commands such as "DrawSubset()" with default "Gouraud" setting. I checked the successful sample for this case by DirectX 8.0 SDK. I found the sample "Dolphin". Inside the dolphin.x, there are 284 vertexes with 564 faces for vertex index and 284 vertex normals with 564 faces for normal index; both vertex index and normal index have the same order. Then, I checked other x file created by 3D Studio MAX R3 with vertex normal; I found there were not the same amount of vertex and normal and the same order between vertex index and normal index, but they did have the same amount of index. Is this the difference to cause the failure to render true normal by vertex shader? because I didn''t change any code to run. It could be rendered, but only came out a flat shading surface. Those failure of converted x files have "xof 0302txt 0064". The only right file I has is the Dolphin.x with "xof 0303txt 0032". Is this the problem? Any suggestion? Thanks!! Roy

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement