From c583cac5681409222c4557e48cbad8caedc17c4d Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Mon, 22 Feb 2021 19:03:06 -0800 Subject: Hack to hide debug cubes in Super Mario Sunshine ... while not breaking other games. --- Source/Core/VideoCommon/UberShaderVertex.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Source/Core/VideoCommon/UberShaderVertex.cpp') diff --git a/Source/Core/VideoCommon/UberShaderVertex.cpp b/Source/Core/VideoCommon/UberShaderVertex.cpp index 0f33168e88..11bdecd70a 100644 --- a/Source/Core/VideoCommon/UberShaderVertex.cpp +++ b/Source/Core/VideoCommon/UberShaderVertex.cpp @@ -189,8 +189,7 @@ ShaderCode GenVertexShader(APIType api_type, const ShaderHostConfig& host_config out.Write("for (uint color = 0u; color < {}u; color++) {{\n", NUM_XF_COLOR_CHANNELS); out.Write(" if ((color == 0u || use_color_1) && (components & ({}u << color)) != 0u) {{\n", VB_HAS_COL0); - out.Write(" float4 color_value;\n" - " // Use color0 for channel 0, and color1 for channel 1 if both colors 0 and 1 are " + out.Write(" // Use color0 for channel 0, and color1 for channel 1 if both colors 0 and 1 are " "present.\n" " if (color == 0u)\n" " vertex_color_0 = rawcolor0;\n" @@ -201,12 +200,10 @@ ShaderCode GenVertexShader(APIType api_type, const ShaderHostConfig& host_config out.Write(" // Use color1 for channel 0 if color0 is not present.\n" " vertex_color_0 = rawcolor1;\n" " }} else {{\n" - " // The default alpha channel depends on the number of components in the vertex.\n" - " float alpha = float((color_chan_alpha >> color) & 1u);\n" " if (color == 0u)\n" - " vertex_color_0 = float4(1.0, 1.0, 1.0, alpha);\n" + " vertex_color_0 = missing_color_value;\n" " else\n" - " vertex_color_1 = float4(1.0, 1.0, 1.0, alpha);\n" + " vertex_color_1 = missing_color_value;\n" " }}\n" "}}\n" "\n"); -- cgit v1.2.3