Original Post
Hello, I've been trying to use CgFX in my game but I get this message printed in my debugger each rendered frame The pixel shader works but not the vertex shader. This is how my cgfx file looks like It seems odd to me that the error message said there was trouble using "cgD3D8LoadProgram", when I'm using the cgD3D9 library. I have checked my code using CG API calls and it's identical to the code I find in the bumpmap example that comes bundled with the SDK.
cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))
cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))
cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))
cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))
cgD3D(EXT): "A D3D failure occured during shader creation." (hr=Invalid data (0x88760b59))
cgD3D(EXT): "Program has not been loaded using cgD3D8LoadProgram()" (hr=Program not loaded with expanded interface (0x88770001))
... And so on ...
float4x4 ModelViewProj : WorldViewProjection;
void main_vs(
in float3 position : POSITION,
in float2 texCoord : TEXCOORD0,
out float4 oPosition : POSITION,
uniform float4x4 worldViewProj)
{
oPosition = mul(worldViewProj, float4(position, 1));
}
float4 main_ps(
in float2 texCoord : TEXCOORD0
) : COLOR
{
return float4(1,0,1,1);
}
technique test
{
pass
{
VertexShader = compile vs_1_1 main_vs(ModelViewProj);
PixelShader = compile ps_1_3 main_ps();
}
}