Hello,
I have problems compiling shaders for SM 1.x cards. I made some, but none of them work for it. Even the simplest possible shader that outputs solid color only doesn't work. Tested on 2 computers with GF4Ti 4200 and Radeon 9200.
I read somewhere that compiling SM1.x is unsupported on last shader compiler and the older one can be used by calling SetEffectCompileMode(false). But when I set it to false it also doesn't work and outputs this error in debug file:
01-27-2010 16:26:07 | SHADER MANAGER : Error : D:\AG\bin\Debug\simple.fx(17): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression
ID3DXEffectCompiler: Compilation failed
it points to the line that specifies pixel shader version and function.
SetEffectCompileMode(false) makes the shader not work even if the card supports higher shader models and if it's true works only on SM2.0 cards and up.
if calling SetEffectCompileMode(true) I get this:
01-27-2010 16:26:49 | SHADER MANAGER : Shader technique 'TSM1' couldn't be validated
01-27-2010 16:26:49 | SHADER MANAGER : Shader 'Shader1' successfully created.
and again it doesn't work.
I'm using this shader taken from the wiki:
// Global world-view-projection matrix
float4x4 matWorldViewProj : WORLDVIEWPROJECTION;
// Vertex Shader
float4 VS(float4 inPosition : POSITION) : POSITION {
return mul(inPosition, matWorldViewProj);
}
// Pixel Shader
float4 PS() : COLOR {
return float4(1, 1, 1, 1);
}
technique TSM1 {
pass P0 {
VertexShader = compile vs_1_1 VS();
PixelShader = compile ps_1_1 PS();
}
}
I'm making a lightweight game which will run well even on older than these cards so I'd like to enable some effects in these if it's possible.
Please help.