Fix rlsw persistent alpha blending state (#5964)
This commit is contained in:
parent
39706cccbe
commit
d224912bd5
1 changed files with 3 additions and 1 deletions
4
src/external/rlsw.h
vendored
4
src/external/rlsw.h
vendored
|
|
@ -3909,7 +3909,6 @@ static void sw_immediate_set_color(const float color[4])
|
||||||
RLSW.primitive.color[2] = color[2];
|
RLSW.primitive.color[2] = color[2];
|
||||||
RLSW.primitive.color[3] = color[3];
|
RLSW.primitive.color[3] = color[3];
|
||||||
|
|
||||||
RLSW.primitive.hasColorAlpha |= (color[3] < 1.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sw_immediate_set_texcoord(const float texcoord[2])
|
static void sw_immediate_set_texcoord(const float texcoord[2])
|
||||||
|
|
@ -3948,6 +3947,9 @@ static void sw_immediate_push_vertex(const float position[4])
|
||||||
for (int i = 0; i < 4; i++) vertex->color[i] = RLSW.primitive.color[i];
|
for (int i = 0; i < 4; i++) vertex->color[i] = RLSW.primitive.color[i];
|
||||||
for (int i = 0; i < 2; i++) vertex->texcoord[i] = RLSW.primitive.texcoord[i];
|
for (int i = 0; i < 2; i++) vertex->texcoord[i] = RLSW.primitive.texcoord[i];
|
||||||
|
|
||||||
|
// Track whether any vertex in this primitive has alpha < 1.0
|
||||||
|
RLSW.primitive.hasColorAlpha |= (vertex->color[3] < 1.0f);
|
||||||
|
|
||||||
// Immediate rendering of the primitive if the required number is reached
|
// Immediate rendering of the primitive if the required number is reached
|
||||||
if (RLSW.primitive.vertexCount == SW_PRIMITIVE_VERTEX_COUNT[RLSW.drawMode])
|
if (RLSW.primitive.vertexCount == SW_PRIMITIVE_VERTEX_COUNT[RLSW.drawMode])
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue