alkahest
alkahest copied to clipboard
Improved Volume Rendering
In 0.5, volume rendering was changed from additive to alpha blend, making volumes more visible, but also clipping other volumes. Additionally, volumes are rendered as solid geometry with a wireframe overlayed on top. We can make this look a bit better by using depth/normal edge detection
- Prepare a screen-space depth buffer.
- Prepare a screen-space color buffer. This will be composited over the main image
- For each displayed volume:
- Clear the depth buffer
- Render the volume to the depth buffer
- Run a screenspace shader that takes the depth buffer, using edge detection for the 'wireframe', that additively draws the volume onto the color buffer
- Alpha blend the color buffer onto the main image