Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webgl backend supports now non-srgb framebuffer #3070

Merged
merged 4 commits into from
Oct 9, 2022

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Oct 6, 2022

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
fixes #3059

Description
enable non-srgb surfaces for gles
Still can't get around the texture copy due to the opengl coordinate flipping issue. But at least it's a "simple blit" which egl.rs already does (special care needed to be taken in the webgl case)

Testing
tested against egui in the browser which prefers non-srgb targets
image
patching wgpu in egui with this version (and building with the right feature flags) is sufficient :)

Tried testing egl.rs as well, but I'm failing to build angle for my apple silicon machine. I think it should work as well but if not this introduces a new bug (tit for tat!)

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM outside of one comment. Would be good to get this resolved in the egl case too as a follow up.

wgpu-hal/src/gles/adapter.rs Show resolved Hide resolved
@Wumpf
Copy link
Member Author

Wumpf commented Oct 7, 2022

fairly sure it should "just work" with egl as we - as far as I've seen - resolve srgb there only via blit, never via shader. As writen in description, I failed to test it :/

@Wumpf
Copy link
Member Author

Wumpf commented Oct 8, 2022

fixed changelog conflict in rebase (also added missing General section there)

@cwfitzgerald cwfitzgerald merged commit acadd8d into gfx-rs:master Oct 9, 2022
@Wumpf Wumpf deleted the webgl-non-srgb-support branch May 29, 2023 22:07
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.

[gles] surface from canvas supports only srgb
2 participants