mirror of https://github.com/xemu-project/xemu.git
nv2a: Fix missing flat qualifier for inv_w param
`vtx_inv_w` should also be flat, since interpolating it causes incorrect values for the flat shaded colors. Fixes #1179 [Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/shade_model_tests.cpp) [HW results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Shade_model)
This commit is contained in:
parent
4fd15c00f3
commit
ae1a140ecb
|
@ -262,7 +262,7 @@ static MString* generate_geometry_shader(
|
||||||
"void emit_vertex(int index, int provoking_index) {\n"
|
"void emit_vertex(int index, int provoking_index) {\n"
|
||||||
" gl_Position = gl_in[index].gl_Position;\n"
|
" gl_Position = gl_in[index].gl_Position;\n"
|
||||||
" gl_PointSize = gl_in[index].gl_PointSize;\n"
|
" gl_PointSize = gl_in[index].gl_PointSize;\n"
|
||||||
" vtx_inv_w = v_vtx_inv_w[index];\n"
|
" vtx_inv_w = v_vtx_inv_w[provoking_index];\n"
|
||||||
" vtxD0 = v_vtxD0[provoking_index];\n"
|
" vtxD0 = v_vtxD0[provoking_index];\n"
|
||||||
" vtxD1 = v_vtxD1[provoking_index];\n"
|
" vtxD1 = v_vtxD1[provoking_index];\n"
|
||||||
" vtxB0 = v_vtxB0[provoking_index];\n"
|
" vtxB0 = v_vtxB0[provoking_index];\n"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#define DEF_VERTEX_DATA(qualifier, in_out, prefix, suffix) \
|
#define DEF_VERTEX_DATA(qualifier, in_out, prefix, suffix) \
|
||||||
"noperspective " in_out " float " prefix "vtx_inv_w" suffix ";\n" \
|
qualifier " " in_out " float " prefix "vtx_inv_w" suffix ";\n" \
|
||||||
qualifier " " in_out " vec4 " prefix "vtxD0" suffix ";\n" \
|
qualifier " " in_out " vec4 " prefix "vtxD0" suffix ";\n" \
|
||||||
qualifier " " in_out " vec4 " prefix "vtxD1" suffix ";\n" \
|
qualifier " " in_out " vec4 " prefix "vtxD1" suffix ";\n" \
|
||||||
qualifier " " in_out " vec4 " prefix "vtxB0" suffix ";\n" \
|
qualifier " " in_out " vec4 " prefix "vtxB0" suffix ";\n" \
|
||||||
|
|
Loading…
Reference in New Issue