Skip to content

Commit

Permalink
fix: properly scale 2-bit color to 8-bit color (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
SagarDevAchar authored Sep 3, 2024
1 parent f2e8dce commit e116207
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ function animationFrame(now: number) {
if (vsync) {
break frameLoop;
}
data[offset] = r << 6;
data[offset + 1] = g << 6;
data[offset + 2] = b << 6;
data[offset] = r * 85;
data[offset + 1] = g * 85;
data[offset + 2] = b * 85;
data[offset + 3] = 0xff;
}
waitFor(() => getVGASignals().hsync);
Expand Down

0 comments on commit e116207

Please sign in to comment.