float4 emissive;
struct VS_IN
{
float4 pos : POSITION;
float4 col : COLOR;
};
struct PS_IN
float4 pos : SV_POSITION;
PS_IN VS( VS_IN input )
PS_IN output = (PS_IN)0;
output.pos = input.pos;
output.col = input.col + emissive;
return output;
}
float4 PS( PS_IN input ) : SV_Target
return input.col;
technique10 Render
pass P0
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
cbuffer cbGlobals
bool vertexColor;
bool emissiveColor;
if (vertexColor)
output.col += input.col;
if (emissiveColor)
output.col += emissive;
effect.GetVariableByName("vertexColor").AsScalar().Set(true);
effect.GetVariableByName("emissiveColor").AsScalar().Set(true);