mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-26 01:11:25 +01:00
[gpu/demo] Fix blend func for premultiplied paint output
hb_gpu_paint() returns premultiplied RGBA, as documented in hb-gpu.cc. The GL demo was using GL_SRC_ALPHA which double-applied alpha, darkening semi-transparent colors. Use GL_ONE as the API docs prescribe. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
af21e3c227
commit
178402d7b4
1 file changed
+1
-1
@@ -47,7 +47,7 @@ demo_glstate_setup (demo_glstate_t *st)
|
||||
demo_glstate_set_foreground (st, 0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
glEnable (GL_BLEND);
|
||||
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
demo_atlas_t *
|
||||
|
||||
Reference in new issue
Block a user