diff options
| author | JMC47 <JMC4789@gmail.com> | 2021-06-10 03:38:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-10 03:38:24 -0400 |
| commit | a51d01bb809bddaa2c221b0e9a6d0b935a285bce (patch) | |
| tree | a8ebb37fd0c90eb6adc89b27fc3f82dc694ee26e /Source/Core/VideoCommon/UberShaderVertex.cpp | |
| parent | e62610e6bc4f33234d8d5a7759ed5911bd25b8cb (diff) | |
| parent | 1500a0119bbb9086b0482a94b154612a0684f194 (diff) | |
Merge pull request #9532 from Pokechu22/debug-cube-hack
Hackfix for debug cubes
Diffstat (limited to 'Source/Core/VideoCommon/UberShaderVertex.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/UberShaderVertex.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
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"); |
