Improve Order Independent Transparency example#22781
Draft
goodartistscopy wants to merge 33 commits intobevyengine:mainfrom
Draft
Improve Order Independent Transparency example#22781goodartistscopy wants to merge 33 commits intobevyengine:mainfrom
goodartistscopy wants to merge 33 commits intobevyengine:mainfrom
Conversation
<= 256mb
It's head
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`
IceSentry
reviewed
Feb 2, 2026
Contributor
IceSentry
left a comment
There was a problem hiding this comment.
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.
2633bc6 to
6b98c11
Compare
IceSentry
reviewed
Feb 5, 2026
| .add_plugins(DefaultPlugins) | ||
| .add_plugins(DefaultPlugins.set(WindowPlugin { | ||
| primary_window: Some(Window { | ||
| present_mode: if AppState::default().enable_vsync { |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objectives
/!\ This is written on top of an update to the core OIT technique (using linked-list) from #21831, thus the Draft status
Todos
contact_shadows)OrderIndependentTransparencySettingsliveTesting
Running the example
Showcase