Skip to content

Commit

Permalink
HLSL depal simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jul 9, 2021
1 parent 4c9b5ad commit 90460df
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions GPU/Common/DepalettizeShaderCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@ void GenerateDepalShader300(char *buffer, GEBufferFormat pixelFormat, ShaderLang

if (language == HLSL_D3D11) {
WRITE(p, "float4 main(in float2 v_texcoord0 : TEXCOORD0) : SV_Target {\n");
if (pixelFormat == GE_FORMAT_DEPTH16) {
WRITE(p, " float color = tex.Sample(texSamp, v_texcoord0).x;\n");
} else {
WRITE(p, " float4 color = tex.Sample(texSamp, v_texcoord0);\n");
}
WRITE(p, " float4 color = tex.Sample(texSamp, v_texcoord0);\n");
} else {
WRITE(p, "void main() {\n");
WRITE(p, " vec4 color = texture(tex, v_texcoord0);\n");
Expand Down

0 comments on commit 90460df

Please sign in to comment.