Skip to content

feat: add HQx pixel-art scaling display mode#667

Closed
Copilot wants to merge 5 commits into
mainfrom
copilot/add-hqx-scaling-option
Closed

feat: add HQx pixel-art scaling display mode#667
Copilot wants to merge 5 commits into
mainfrom
copilot/add-hqx-scaling-option

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

  • Diagnose root cause of squashing: GL viewport stays at [0,0,896,600] when canvas resized to 1792×1200; paint() never calls gl.viewport()
  • Fix GlCanvas.paint() to call gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight) before drawing — ensures viewport always matches drawing buffer regardless of when canvas was resized
  • Fix createCanvasForFilter() to use hardcoded 896×600 default (not current canvas attribute) for filters without canvasWidth/canvasHeight — ensures switching away from HQx resets drawing buffer correctly
  • Lint clean, 557 unit tests pass

Copilot AI linked an issue Apr 7, 2026 that may be closed by this pull request
Implements the hq2x pixel-art scaling algorithm as a new WebGL display
mode alongside the existing 'RGB Monitor' and 'PAL TV' options.

New files:
- src/video-filters/shaders/hqx.vert.glsl   (passthrough vertex shader)
- src/video-filters/shaders/hqx.frag.glsl   (hq2x fragment shader)
- src/video-filters/hqx-filter.js           (filter class)

Updated files:
- src/canvas.js   (register 'hqx' in DISPLAY_MODE_FILTERS)
- index.html      (add 'HQx' option to display-mode dropdown)

Agent-Logs-Url: https://github.com/mattgodbolt/jsbeeb/sessions/1680ed1d-493c-43cd-b904-82c002098d92
Copilot AI changed the title [WIP] Add option to render with Hqx scaling feat: add HQx pixel-art scaling display mode Apr 7, 2026
Copilot AI requested a review from mattgodbolt April 7, 2026 00:30
@mattgodbolt
Copy link
Copy Markdown
Owner

@copilot Having a static image and toggling between RGB and hqx shows no difference at all

@mattgodbolt
Copy link
Copy Markdown
Owner

Still does not work. closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to render with Hqx scaling

2 participants