Jump to content

  • Log In with Google      Sign In   
  • Create Account

shader choice with flags?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 the dodger uk   Members   -  Reputation: 148

Like
0Likes
Like

Posted 18 January 2013 - 03:57 PM

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 );
}
}


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS