UberShaderVertex: Fix Tony Hawk Pro Skater 4
Fixes https://bugs.dolphin-emu.org/issues/12620 The changed code did not match the corresponding code in VertexShaderGen. Some parts of the sky have 2 color channels in each vertex, while others only have 1, despite only color channel 0 being used and XFMEM_SETNUMCHAN being set to 1 for both of them. The old code (from #4601) caused channel 0 to be set to channel 1 if the vertex contained both color channels but the number of channels was set to 1, which is wrong.
This commit is contained in:
parent
33154de614
commit
2519d14e36
|
@ -218,14 +218,14 @@ ShaderCode GenVertexShader(APIType api_type, const ShaderHostConfig& host_config
|
|||
" if ((components & {}u) != 0u)\n"
|
||||
" o.colors_0 = rawcolor0;\n"
|
||||
" else\n"
|
||||
" o.colors_1 = float4(1.0, 1.0, 1.0, 1.0);\n"
|
||||
" o.colors_0 = float4(1.0, 1.0, 1.0, 1.0);\n"
|
||||
"}}\n",
|
||||
VB_HAS_COL0);
|
||||
out.Write("if (xfmem_numColorChans < 2u) {{\n"
|
||||
" if ((components & {}u) != 0u)\n"
|
||||
" o.colors_0 = rawcolor1;\n"
|
||||
" o.colors_1 = rawcolor1;\n"
|
||||
" else\n"
|
||||
" o.colors_1 = float4(1.0, 1.0, 1.0, 1.0);\n"
|
||||
" o.colors_1 = o.colors_0;\n"
|
||||
"}}\n",
|
||||
VB_HAS_COL1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue