alkahest icon indicating copy to clipboard operation
alkahest copied to clipboard

Improved Volume Rendering

Open cohaereo opened this issue 11 months ago • 0 comments

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

cohaereo avatar Jan 19 '25 16:01 cohaereo