-
Notifications
You must be signed in to change notification settings - Fork 38
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
Maybe sharper egui soon #216
Conversation
investigation progress: #215 (comment) |
} | ||
|
||
@fragment | ||
fn fs_main_gamma_framebuffer(in: VertexOutput) -> @location(0) vec4<f32> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need a separate entry point? it's largely doing the same thing, we might as well just have an if/else at the end based on a runtime flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime flag can do it. Just replicated egui-wgpu for the quick draft.
It would be nice to find the underlying cause so the shader potentially can be simple again..
[mode; 3] | ||
}, | ||
mag_filter: match options.magnification { | ||
egui::TextureFilter::Nearest => blade_graphics::FilterMode::Nearest, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should have helper function to do this mapping, since we are doing it 3 times here
egui::TextureFilter::Nearest => blade_graphics::FilterMode::Nearest, | ||
egui::TextureFilter::Linear => blade_graphics::FilterMode::Linear, | ||
}, | ||
mipmap_filter: match options.mipmap_mode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would look like options.mipmap_mode.map_or(blade_graphics::FilterMode::Linear, my_mapping_function)
|
||
use blade_graphics as gpu; | ||
use winit::platform::x11::WindowAttributesExtX11; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a separate example for this? we already have particle
using egui, scene
using it, and move
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nop, will remove, didn't intend to include it here, was just the one I used to debug
@@ -144,7 +204,11 @@ impl GuiPainter { | |||
..Default::default() | |||
}, | |||
depth_stencil: None, //TODO? | |||
fragment: shader.at("fs_main"), | |||
fragment: if info.format.is_srgb() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks highly suspicious to me.
Generally speaking, I expect the rendering pipeline to assume linear space render targets all the way. I don't think there is value in expanding this assumption any further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what egui-wgpu did so I just replicated all of it to see if it would help.
Egui examples use a non-srg render target whereas blade always uses one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimizing changes is a good experiment for sure. Shipping it the way egui_wgpu did seems very concerning to me. I'll try to find some associated discussion there.
Just a note, my approach for the investigation was to minimize differences between blade and egui-wgpu, so I made sure to try and replicate their code. Once we find the issue we can go back and make only minimal changes in a own PR :) |
See notes in #215
Still not solved but colors are closer. Will keep looking into it