Skip to content

Improve Order Independent Transparency example#22781

Draft
goodartistscopy wants to merge 33 commits intobevyengine:mainfrom
goodartistscopy:update_oit_example_ui
Draft

Improve Order Independent Transparency example#22781
goodartistscopy wants to merge 33 commits intobevyengine:mainfrom
goodartistscopy:update_oit_example_ui

Conversation

@goodartistscopy
Copy link
Contributor

@goodartistscopy goodartistscopy commented Feb 2, 2026

Objectives

  • Use a better UI inspired by other examples
  • Add more scenes
  • Be more useful in assessing the technique (performance / artifacts)

/!\ This is written on top of an update to the core OIT technique (using linked-list) from #21831, thus the Draft status

Todos

Testing

Running the example

Showcase

Screenshot From 2026-02-02 21-05-11

beicause and others added 29 commits November 14, 2025 10:25
Add `reserve_internal` to `BufferVec`
Add `capacity` `set_label` `get_label` to `UninitBufferVec`
Use `Vec::reserve` to reduce some allocation
Since gfx-rs/wgpu#4394 is now fixed for WGSL,
remove the short-circuit work-around
The `alpha_threshold` setting now limits the accumulated result, which
seem more useful. A limiter on input fragments (in addition to those
fully transparent) could be re-introduced if it still makes sense.
The old behavior is now called `alpha_culling`
`alpha_threshold` (new behavior) is now `max_composited_opacity`
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples X-Contentious There are nontrivial implications that should be thought through S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 2, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Rendering (2026 Proposal) Feb 2, 2026
@alice-i-cecile alice-i-cecile added S-Blocked This cannot move forward until something else changes and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 2, 2026
Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

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

I really like these new examples. Thanks for making them! I'll wait on the other PR to be merged before doing a full review though.

.add_plugins(DefaultPlugins)
.add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
present_mode: if AppState::default().enable_vsync {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this relevant to OIT or is this just for performance testing?

If the reason is performance testing I'd prefer seeing a new stress_tests for OIT instead of using the example for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples S-Blocked This cannot move forward until something else changes X-Contentious There are nontrivial implications that should be thought through

Projects

Status: No status
Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

OrderIndependentTransparency doesn't work with custom materials

4 participants