feat: Volume rendering with OIT#583
Open
seankmartin wants to merge 37 commits into
Open
Conversation
Missing depth attachment Does not combine accum and revealage following OIT But should provide the skeleton for this
…artin-aranega/oit
…detik into seankmartin-aranega/oit-bind-depth-texture
also handles visibility of channels
seankmartin
added a commit
that referenced
this pull request
Feb 24, 2026
### Summary <!--- Please try to cover the following questions in your summary: 1. Describe the product (or technical) problem you are solving. 2. Explain the engineering solution you have chosen. 3. Discuss the implementation choices/tradeoffs you have made. --> One thing is common to both #564 and #583 - which is that there needs to be some way to define the properties of the channels for volume rendering. We've extracted that common piece here, as it is more self contained and would be helpful to get feedback on so then #564 and #583 can be adding on top of that. The `VolumeLayer` has copied some of the `channelProps` functionality from the other image layers with the callbacks on channel change, how to set channels etc. And how the `VolumeRenderable` sets those as a uniform is similar to the `ImageRenderable`. This also helps in moving towards #555 and removing uniforms from the volume layer. In this only the first channel would be supported for passing the uniforms, but it lays the framework for using channel props for multi-channel rendering. ### Tests & Checks <!--- How did you validate that your changes were implemented correctly? Please think about the following prompts: 1. I wrote automated tests. 2. I manually tested my changes, and here's what I did: --> I manually tested the volume rendering examples and checked other examples to see if still working. Visually this shouldn't really change much, outside of the transfer function bounds being a little different for the invlerp mapping. New: <img width="1852" height="889" alt="image" src="https://github.com/user-attachments/assets/e5220349-fb3d-4c03-8d03-5407bb820c1a" /> Old: <img width="1852" height="889" alt="image" src="https://github.com/user-attachments/assets/b8001b5a-cb46-47ea-b078-80fc1245f6c1" />
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.
Introduces a new FBO and changes the volume shader to use weighted blended OIT. Here is how this looks at the moment, which should be pretty comparable to without OIT (though the weighting function can make the volume start to taper off):
2026-02-06.18-04-52.mp4