Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

shader choice with flags?

4: Adsense

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   

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





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.