Skip to content

Conversation

@Wumpf
Copy link
Member

@Wumpf Wumpf commented Oct 7, 2022

First stab at a wgpu based re_renderer crate and integration into re_viewer

Renders test triangle successfully on native and browser.
image

can be tested locally using cargo run -p rerun --features=wgpu --no-default-features -- ../car.rrd
(for web, it's easiest to hack the default feature on re_viewer, no point in streamlining this right now)

There's glitch in the browser right now:
The moment we stop rendering continously, the viewport resizes. Likely an eframe issue, need to investigate. (suspecting that something in the order of callbacks vs primitives causes issue with a viewport not being reset)
image

Comment on lines 5 to 8
output_format_color: wgpu::TextureFormat,
/// The depth format used by the eframe output buffer.
/// TODO(andreas): Should we maintain depth buffers per view and ask for no depth from eframe?
output_format_depth: Option<wgpu::TextureFormat>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
output_format_color: wgpu::TextureFormat,
/// The depth format used by the eframe output buffer.
/// TODO(andreas): Should we maintain depth buffers per view and ask for no depth from eframe?
output_format_depth: Option<wgpu::TextureFormat>,
color_output_format: wgpu::TextureFormat,
/// The depth format used by the eframe output buffer.
/// TODO(andreas): Should we maintain depth buffers per view and ask for no depth from eframe?
depth_output_format: Option<wgpu::TextureFormat>,

Copy link
Member Author

Choose a reason for hiding this comment

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

starting with output_format is more autocompletion friendly though ;)

@Wumpf Wumpf marked this pull request as ready for review October 11, 2022 10:10
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Looks good!

…but I left some nits :]

Wumpf and others added 3 commits October 11, 2022 15:28
Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
@Wumpf
Copy link
Member Author

Wumpf commented Oct 11, 2022

web glitch fixed in gfx-rs/wgpu#3093
actually doesn't happen for non-srgb targets (also enabled on wgpu master only so far)

@Wumpf Wumpf merged commit 65572c3 into main Oct 11, 2022
@Wumpf Wumpf deleted the andreas/introduce-re-renderer branch October 11, 2022 14:51
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.

5 participants