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


Help needed with Cg Vertex Shaders

Recommended Posts

I''ve just started using Cg to write my own Vertex shaders but I have encountered a problem. When I run my app, the object in the scene that is rendered is plane white, although it is ment to be green and unshaded at this point. The object is loaded from a .X file and then cloned to achive the approte flexable vertex format, then rendered with the DrawSubset(i) function. The Cg vertex shader code I have writen is from an example so should be working fine. As was the code for loading the Vertex shader, but the example was not using a .X File to create the object. Could the rendering meathod of LPD3DXMESH(DrawSubSet) be causing the problem, as the example use the DrawIndexedPrimitive(blah) function to render its object? The example I was working from was:, RacorX2. Can any one segest what might be causing a problem such as this, or segest an other example that uses Cg shaders and .X files that I could look at? David

Share this post

Link to post
Share on other sites