Skip to content

Commit

Permalink
VertexDecoderCommon: A few more cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jan 3, 2018
1 parent 3ac2350 commit e789300
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GPU/Common/VertexDecoderCommon.cpp
Expand Up @@ -559,7 +559,7 @@ void VertexDecoder::Step_Color5551Morph() const
for (int i = 0; i < 4; i++) {
c[i] = clamp_u8((int)col[i]);
}
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && c[3] == 255;
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && (int)col[3] == 255;
}

void VertexDecoder::Step_Color4444Morph() const
Expand All @@ -575,7 +575,7 @@ void VertexDecoder::Step_Color4444Morph() const
for (int i = 0; i < 4; i++) {
c[i] = clamp_u8((int)col[i]);
}
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && c[3] == 255;
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && (int)col[3] == 255;
}

void VertexDecoder::Step_Color8888Morph() const
Expand All @@ -591,7 +591,7 @@ void VertexDecoder::Step_Color8888Morph() const
for (int i = 0; i < 4; i++) {
c[i] = clamp_u8((int)col[i]);
}
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && c[3] == 255;
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && (int)col[3] == 255;

This comment has been minimized.

Copy link
@unknownbrackets

unknownbrackets Jan 3, 2018

Collaborator

Should we do >= 255 for all of these, to be safe? Since they are floats and clamped.

-[Unknown]

This comment has been minimized.

Copy link
@hrydgard

hrydgard Jan 3, 2018

Author Owner

Ah, yeah. Though in practice I'm guessing it matters little.

}

void VertexDecoder::Step_NormalS8() const
Expand Down

0 comments on commit e789300

Please sign in to comment.