Skip to content

Commit

Permalink
renderer: line dithering regression (values were not shifted right by 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaCzekanski committed Apr 20, 2020
1 parent da7e9fb commit aa068bb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/device/gpu/render/render_line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ void Render::drawLine(gpu::GPU* gpu, const primitive::Line& line) {

PSXColor c(fullColor.r, fullColor.g, fullColor.b);
if (dithering) {
c.r = ditherLUT[y & 3u][x & 3u][fullColor.r];
c.g = ditherLUT[y & 3u][x & 3u][fullColor.g];
c.b = ditherLUT[y & 3u][x & 3u][fullColor.b];
c = PSXColor( //
ditherLUT[y & 3u][x & 3u][fullColor.r], //
ditherLUT[y & 3u][x & 3u][fullColor.g], //
ditherLUT[y & 3u][x & 3u][fullColor.b] //
);
}

if (line.isSemiTransparent) {
Expand Down

0 comments on commit aa068bb

Please sign in to comment.