pcbjam/tests/gal-regression/wasm
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Viktor Vaczi 74faa7e249 fix(webgl): Fix alpha-blending with proper blend functions
Alpha-blended shapes were rendering nearly invisible due to incorrect
blend function configuration in two places:

1. FBO rendering (webgl_gal.cpp): Changed to glBlendFuncSeparate to handle
   RGB and alpha channels independently. Alpha channel now accumulates
   coverage correctly (prevents it from staying near 0.0 when rendering
   with alpha=0.5).

2. Compositor (webgl_compositor.cpp): Changed from premultiplied alpha
   blend (GL_ONE, GL_ONE_MINUS_SRC_ALPHA) to straight alpha blend
   (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) since our FBOs use straight alpha.

Also marked Transform() as dead code with explanation - never called in
KiCad and has no effect even in native OPENGL_GAL.

Result: Alpha-blending scenario now renders correctly with proper color
mixing for overlapping shapes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 14:47:20 +01:00
..
generated feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
webgl fix(webgl): Fix alpha-blending with proper blend functions 2026-01-09 14:47:20 +01:00
gal_webgl_test.cpp docs(webgl): Explain why white background is required for comparison 2026-01-08 12:35:49 +01:00
gal_webgl_test.html feat(webgl): Enable all 28 scenarios for WebGL test harness 2026-01-08 11:11:03 +01:00
generate_shaders.py feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00
legacy_gl_stubs.js feat(webgl): Fix WebGL GAL rendering with proper coordinate setup 2026-01-08 10:13:11 +01:00
Makefile feat(webgl): Enable all 28 scenarios for WebGL test harness 2026-01-08 11:11:03 +01:00
wasm_stubs.cpp feat(webgl): Replace legacy GL with modern OpenGL ES 3.0 2026-01-07 23:33:49 +01:00