Skip to content

feat: Volume rendering with OIT#583

Open
seankmartin wants to merge 37 commits into
mainfrom
seankmartin-aranega/oit
Open

feat: Volume rendering with OIT#583
seankmartin wants to merge 37 commits into
mainfrom
seankmartin-aranega/oit

Conversation

@seankmartin
Copy link
Copy Markdown
Collaborator

@seankmartin seankmartin commented Feb 6, 2026

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

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"
/>
@seankmartin seankmartin changed the title [WIP] Volume rendering with OIT PoC Volume rendering with OIT Mar 2, 2026
@seankmartin seankmartin marked this pull request as ready for review March 2, 2026 16:02
@seankmartin seankmartin changed the title Volume rendering with OIT Feat: Volume rendering with OIT Mar 2, 2026
@seankmartin seankmartin changed the title Feat: Volume rendering with OIT feat: Volume rendering with OIT Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants