Trouble assembling vertex shader with DX 9
Hi,
I have recentley decided to move from directx 8 to directx 9. The only trouble is, I seem now to be having trouble assembling my old vertex shader source file. Here is the code:
vs.1.1
dp4 oPos.x, v0, c0
dp4 oPos.y, v0, c1
dp4 oPos.z, v0, c2
dp4 oPos.w, v0, c3
mov oT0, v7
When I try and compile thsi with D3DXAssembleShaderFromFile() it fails and reports back to me with error x5326, saying "read of unitialized components". How do I fix this? Thanks.
Direct3D 9 requires that you declare your input register before you can use them. Lock for the “dcl_usage input register“ instruction the documentation.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement