font: set blend state
This commit is contained in:
parent
e3f8197dc1
commit
efdcf9a92f
12
font.fx
12
font.fx
@ -70,6 +70,17 @@ float4 PS(PS_INPUT input) : SV_Target
|
|||||||
return float4(c.xxx, 1);
|
return float4(c.xxx, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlendState Blending
|
||||||
|
{
|
||||||
|
BlendEnable[0] = TRUE;
|
||||||
|
SrcBlend = ONE;
|
||||||
|
DestBlend = ONE;
|
||||||
|
BlendOp = ADD;
|
||||||
|
SrcBlendAlpha = ZERO;
|
||||||
|
DestBlendAlpha = ZERO;
|
||||||
|
BlendOpAlpha = ADD;
|
||||||
|
};
|
||||||
|
|
||||||
technique10 Font
|
technique10 Font
|
||||||
{
|
{
|
||||||
pass P0
|
pass P0
|
||||||
@ -77,5 +88,6 @@ technique10 Font
|
|||||||
SetVertexShader(CompileShader(vs_4_0, VS()));
|
SetVertexShader(CompileShader(vs_4_0, VS()));
|
||||||
SetGeometryShader(CompileShader(gs_4_0, GS()));
|
SetGeometryShader(CompileShader(gs_4_0, GS()));
|
||||||
SetPixelShader(CompileShader(ps_4_0, PS()));
|
SetPixelShader(CompileShader(ps_4_0, PS()));
|
||||||
|
SetBlendState(Blending, float4(0.0, 0.0, 0.0, 0.0), 0xffffffff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6
main.fx
6
main.fx
@ -78,6 +78,11 @@ float4 PSSolid(PS_INPUT input) : SV_Target
|
|||||||
return float4(input.Weight.xyz, 1);
|
return float4(input.Weight.xyz, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlendState Blending
|
||||||
|
{
|
||||||
|
BlendEnable[0] = FALSE;
|
||||||
|
};
|
||||||
|
|
||||||
technique10 Render
|
technique10 Render
|
||||||
{
|
{
|
||||||
pass P0
|
pass P0
|
||||||
@ -85,6 +90,7 @@ technique10 Render
|
|||||||
SetVertexShader(CompileShader(vs_4_0, VS()));
|
SetVertexShader(CompileShader(vs_4_0, VS()));
|
||||||
SetGeometryShader(NULL);
|
SetGeometryShader(NULL);
|
||||||
SetPixelShader(CompileShader(ps_4_0, PS()));
|
SetPixelShader(CompileShader(ps_4_0, PS()));
|
||||||
|
SetBlendState(Blending, float4(0.0, 0.0, 0.0, 0.0), 0xffffffff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user