@kosmonautgames wrote:
What is wrong with this implementation?
I can't seem to find a way to pass uniforms during compile time like i could in xna, did something change?
technique WithValueOne { pass Pass1 { VertexShader = compile vs_5_0 VertexShaderFunction(); PixelShader = compile ps_5_0 PixelShaderFunction(1); } } technique WithValueZero { pass Pass1 { VertexShader = compile vs_5_0 VertexShaderFunction(); PixelShader = compile ps_5_0 PixelShaderFunction(0); } }
and in my Pixelshader
PixelShaderFunction(VertexShaderOutput input, uniform float inputvalue) { ... if(inputvalue > 0) { do stuff } }
Posts: 1
Participants: 1