Skip to content

Commit aa5e02a

Browse files
committed
Fix rlsw persistent alpha blending state
1 parent 4640c84 commit aa5e02a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/external/rlsw.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3909,7 +3909,6 @@ static void sw_immediate_set_color(const float color[4])
39093909
RLSW.primitive.color[2] = color[2];
39103910
RLSW.primitive.color[3] = color[3];
39113911

3912-
RLSW.primitive.hasColorAlpha |= (color[3] < 1.0f);
39133912
}
39143913

39153914
static void sw_immediate_set_texcoord(const float texcoord[2])
@@ -3948,6 +3947,9 @@ static void sw_immediate_push_vertex(const float position[4])
39483947
for (int i = 0; i < 4; i++) vertex->color[i] = RLSW.primitive.color[i];
39493948
for (int i = 0; i < 2; i++) vertex->texcoord[i] = RLSW.primitive.texcoord[i];
39503949

3950+
// Track whether any vertex in this primitive has alpha < 1.0
3951+
RLSW.primitive.hasColorAlpha |= (vertex->color[3] < 1.0f);
3952+
39513953
// Immediate rendering of the primitive if the required number is reached
39523954
if (RLSW.primitive.vertexCount == SW_PRIMITIVE_VERTEX_COUNT[RLSW.drawMode])
39533955
{

0 commit comments

Comments
 (0)