Jump to content
  • Advertisement
Sign in to follow this  
the dodger uk

DX11 shader choice with flags?

This topic is 1982 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!