mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
D3D11: Implement flat shading in shader.
This commit is contained in:
parent
07e178a2da
commit
b845278d7d
2 changed files with 4 additions and 2 deletions
|
@ -135,7 +135,8 @@ bool GenerateFragmentShaderHLSL(const FShaderID &id, char *buffer, ShaderLanguag
|
|||
if (doTexture) {
|
||||
WRITE(p, " float3 v_texcoord: TEXCOORD0;\n");
|
||||
}
|
||||
WRITE(p, " float4 v_color0: COLOR0;\n");
|
||||
const char *colorInterpolation = doFlatShading && lang == HLSL_D3D11 ? "nointerpolation " : "";
|
||||
WRITE(p, " %sfloat4 v_color0: COLOR0;\n", colorInterpolation);
|
||||
if (lmode) {
|
||||
WRITE(p, " float3 v_color1: COLOR1;\n");
|
||||
}
|
||||
|
|
|
@ -231,7 +231,8 @@ void GenerateVertexShaderHLSL(const VShaderID &id, char *buffer, ShaderLanguage
|
|||
if (doTexture) {
|
||||
WRITE(p, " float3 v_texcoord : TEXCOORD0;\n");
|
||||
}
|
||||
WRITE(p, " float4 v_color0 : COLOR0;\n");
|
||||
const char *colorInterpolation = doFlatShading && lang == HLSL_D3D11 ? "nointerpolation " : "";
|
||||
WRITE(p, " %sfloat4 v_color0 : COLOR0;\n", colorInterpolation);
|
||||
if (lmode)
|
||||
WRITE(p, " float3 v_color1 : COLOR1;\n");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue