TINYGL: Fix vertice color when clipped and lighting is disabled
longcurrent_color is assigned per vertex, but it is not saved on each vertex on creation (unlike their "color" attribute, used when lighting is enabled). As a consequence, and because rendering happens asynchronously (rather, following the draw call queue managed by zdirtyrect.cpp when requested to flip current buffer), longcurrent_color at clipping time can be different to the one at vertex declaration time, causing color artifacts. The effect is most noticeable in EMI set shi, in the grog dispenser + shipyard manager closeup angle, when Guybrush exits the screen by crossing its right border: dark triangles become visible on his face. Instead, always use the color attribute, which is already properly initialised on vertex creation.
This commit is contained in:
parent
92130c138e
commit
a6af3a38a3
7 changed files with 4 additions and 33 deletions
|
@ -54,10 +54,6 @@ void glopColor(GLContext *c, GLParam *p) {
|
|||
c->current_color.Y = p[2].f;
|
||||
c->current_color.Z = p[3].f;
|
||||
c->current_color.W = p[4].f;
|
||||
c->longcurrent_color[0] = p[5].ui;
|
||||
c->longcurrent_color[1] = p[6].ui;
|
||||
c->longcurrent_color[2] = p[7].ui;
|
||||
c->longcurrent_color[3] = p[8].ui;
|
||||
|
||||
if (c->color_material_enabled) {
|
||||
GLParam q[7];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue