i have code in my shader and i want to be able for when it compile the shader it pics the correct "technique"
at the moement it says there is a redefinition of shader name , i would like to keep the names the same and want to put a block around each one like
#if(DX11)
#endif
but i not sure on what to put , can this be done ?
technique11 Sprite
{
pass P0
{
SetVertexShader( CompileShader( vs_5_0, TextureVertexShader() ) );
SetHullShader( NULL );
SetDomainShader( NULL );
SetGeometryShader( NULL );
SetGeometryShader( NULL );
SetPixelShader( CompileShader( ps_5_0, TexturePixelShader() ) );
// Switch off blending states
// SetBlendState( NoBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );
SetRasterizerState( CullBack );
SetDepthStencilState( DepthWritesOff, 0 );
}
}
technique10 Sprite
{
pass P0
{
SetVertexShader( CompileShader( vs_4_0, TextureVertexShader() ) );
//SetHullShader( NULL );
// SetDomainShader( NULL );
// SetGeometryShader( NULL );
// SetGeometryShader( NULL );
SetPixelShader( CompileShader( ps_4_0, TexturePixelShader() ) );
// Switch off blending states
// SetBlendState( NoBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );
SetRasterizerState( CullBack );
SetDepthStencilState( DepthWritesOff, 0 );
}
}