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

Update to wgpu 0.10 #32

Merged
merged 2 commits into from
Aug 19, 2021
Merged

Update to wgpu 0.10 #32

merged 2 commits into from
Aug 19, 2021

Conversation

niklaskorz
Copy link
Contributor

Updates wgpu dependency to 0.10 and fixes breaking changes in the code.

@hasenbanck hasenbanck marked this pull request as ready for review August 19, 2021 12:10
@hasenbanck
Copy link
Owner

The PR was still in draft status. Do you want to add something? Or should I merge it?

@niklaskorz
Copy link
Contributor Author

I'm experiencing some issues with the rendered frames, they are way too dark (see https://github.com/niklaskorz/linon/). Not entirely sure if it's an issue in my project or in the egui wgpu backend. Still investigating, so I put it in draft mode for now.

@hasenbanck
Copy link
Owner

I'm not using egui anymore, so I can't assist you with debugging. I'm just maintaining the PRs and the release process.

@niklaskorz
Copy link
Contributor Author

So it's looks like an issue in the egui wgpu backend code, might be related to the sRGB conversion...

wgpu 0.10:

egui with wgpu 0.10

wgpu 0.9:

egui with wgpu 0.9

@hasenbanck
Copy link
Owner

What does it do when you change:

    let mut sc_desc = wgpu::SwapChainDescriptor {
        usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
        format: OUTPUT_FORMAT,
        width: size.width as u32,
        height: size.height as u32,
        present_mode: wgpu::PresentMode::Mailbox,
    };
    let mut sc_desc = wgpu::SwapChainDescriptor {
        usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
        format: adapter.get_swap_chain_preferred_format(&surface).unwrap(),
        width: size.width as u32,
        height: size.height as u32,
        present_mode: wgpu::PresentMode::Mailbox,
    };

In the example?

@niklaskorz
Copy link
Contributor Author

The outcome is the same, unfortunately.

@niklaskorz
Copy link
Contributor Author

Disabling the sRGB conversion in the shader doesn't look right either:

grafik

@Gordon-F
Copy link

@niklaskorz select() order of true/false was swapped in naga 0.6. This should fix "dark" output.

https://github.com/hasenbanck/egui_wgpu_backend/blob/master/src/shader/egui.wgsl#L18

@niklaskorz
Copy link
Contributor Author

That's it! Thanks a lot @Gordon-F

Ready to merge :) @hasenbanck

@hasenbanck
Copy link
Owner

LGTM

@hasenbanck hasenbanck merged commit b0eb726 into hasenbanck:master Aug 19, 2021
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.

3 participants