Help needed with Cg Vertex Shaders
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: http://www.shaderx.com/direct3d.net/tutorials/shader/shader2.html, 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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement