Semitransparent rendering bug in SRGB blending method #469
Labels
No labels
area/accessibility
area/dependency
Confirmed
Crash Report
Delayed
Design Issue
Duplicate
Feedback required
Good first issue
kind/bug
kind/cleanup
kind/enhancement
platform/linux
platform/macos
platform/windows
priority/high
Question
Request for Comments
Seeking Other Contributors
Seeking Testers
Won't Fix / By Design
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-obsproject/obs-browser#469
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Operating System Info
Other
Other OS
macOS 15, Windows 10
OBS Studio Version
Other
OBS Studio Version (Other)
31.0.0, 30.2.3
OBS Studio Log URL
https://obsproject.com/logs/ZJw0Cy9mkJNEyV3i
OBS Studio Crash Log URL
No response
Expected Behavior
The OBS Browser Source should correctly render half transparent colors without darkening colors or introducing artifacts around edges.
Current Behavior
Half transparent pixels render darkened than actual should, and black artifacts are present around text (due anti aliasing, which produce half transparency)

Steps to Reproduce
Browsersource with defaultCSSpreset (transparent body background)Blending MethodbetweenDefaultandSRBG Offand see differencesAnything else we should know?
This artifacts looks like
premultiplied RGBArendering likenon premultipliedI am check rendering mechanism, and it correctly set blending mode for premultiplied renderer
github.com/obsproject/obs-browser@082a0a2d1c/obs-browser-source.cpp (L646)I try to play with srgb texture binding, and if set
gs_enable_framebuffer_srgb(false);andgs_effect_set_texture(image, draw_texture)here:github.com/obsproject/obs-browser@082a0a2d1c/obs-browser-source.cpp (L652)All works correctly, but i think, that this code and
linear_sampleneeded for somethingI am interested in fixing this bug and can create a PR, but I need advice on which direction to take next.
May be
srgbrendering mode overrides blend functions somewhere in rendering pipeline outside CEFstill reproduced