Original Post
I'm trying to compile a rather simple shader and i'm encountering a strange problem with the DX10 effects framework. This simple code do work on FXC (target ps_4_0) and do not work on the effect framework. (If I add a variable with SV_POSITION as semantic, it start to work again.) Please note that this same code works fine on either FXC AND the effect framework for DX9. Any clue?
float4 PS( float4 Colore : COLOR ) : SV_Target
{
return Colore;
}
#ifdef DX9
technique Render
{
pass P0
{
SetVertexShader( CompileShader( vs_3_0, VS() ) );
SetPixelShader( CompileShader( ps_3_0, PS() ) );
ZEnable = FALSE;
AlphaBlendEnable = true;
SrcBlend = 5;
DestBlend = 6;
BlendOp = ADD;
SrcBlendAlpha = 5;
DestBlendAlpha = 6;
BlendOpAlpha = ADD;
}
}
#else
technique10 Render
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
SetDepthStencilState( DisableDepth, 0 );
SetBlendState( PaintBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );
}
}
#endif