<p>I have been trying to implement a simple GPU based volumetric renderer, somewhat similar to described <a href="http://graphicsrunner.blogspot.com/2009/01/volume-rendering-101.html" rel="nofollow noreferrer">here</a>. I conceptually understand most of the stuff, and implemented some code, but my results are no where close to I would expect. Here is simple data I am trying to render. 
<a href="https://i.sstatic.net/9w0jz.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9w0jz.png" alt="enter image description here"></a></p>

<p>The 3D texture used was programmatically created by me; it’s a 256*256*256 arrays where each element contains 4 floats (RGBA). Most of the texture is just green color, with red and blue colored region in between. The final output I get is kind of “pixelated” and “blurry”; I was hoping that the boundary between green area and red/blue area would be crisp and sharp. Please note that each voxel in my array contains all the information about the RGBA component, and when I am firing rays onto the volume, I collect all the color information from the voxel and blend together. The 3D texture parameters GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER are set to GL_LINEAR and not to GL_NEAREST. Hence I am surprised why this pixelated appearance? Perhaps performing some kind of anti-aliasing might help, in which case I could fire multiple rays in slightly different direction for each fragment in my fragment shader and that would possibly smoothen the appearance? Moreover, do you think this could be because my volume is relatively small, only 256*256*256?</p>

CC BY-SA 4.0
2019-07-26T06:26:05.423Z
" I collect all the color information from the voxel and blend together"  Can we see code for this part ?
PaulHK
CC BY-SA 4.0
2019-07-26T14:52:53.467Z
Thanks, but I think I was able to find the issue. The texture being used for rendering and storing the entry/exit position of the ray had only limited precision. I am using the Tao framework for C# and the internal format being used was RGB instead of RGB32f, simply swithing to RGB32f improved my rendering considerably.
user3029710
<antialiasing><volume-rendering>
Pixelated /aliased /blurry edges in volumetric rendering
user3029710
# Pixelated /aliased /blurry edges in volumetric rendering

(Asked by: username_0 on 2019-07-25)

I have been trying to implement a simple GPU based volumetric renderer, somewhat similar to described [here](http://graphicsrunner.blogspot.com/2009/01/volume-rendering-101.html). I conceptually understand most of the stuff, and implemented some code, but my results are no where close to I would expect. Here is simple data I am trying to render.
[![enter image description here](https://i.sstatic.net/9w0jz.png)](https://i.sstatic.net/9w0jz.png)

The 3D texture used was programmatically created by me; it’s a 256\*256\*256 arrays where each element contains 4 floats (RGBA). Most of the texture is just green color, with red and blue colored region in between. The final output I get is kind of “pixelated” and “blurry”; I was hoping that the boundary between green area and red/blue area would be crisp and sharp. Please note that each voxel in my array contains all the information about the RGBA component, and when I am firing rays onto the volume, I collect all the color information from the voxel and blend together. The 3D texture parameters GL\_TEXTURE\_MAG\_FILTER and GL\_TEXTURE\_MIN\_FILTER are set to GL\_LINEAR and not to GL\_NEAREST. Hence I am surprised why this pixelated appearance? Perhaps performing some kind of anti-aliasing might help, in which case I could fire multiple rays in slightly different direction for each fragment in my fragment shader and that would possibly smoothen the appearance? Moreover, do you think this could be because my volume is relatively small, only 256\*256\*256?

**Tags:** antialiasing, volume-rendering

> **Comments:**
> **username_1**: " I collect all the color information from the voxel and blend together"  Can we see code for this part ?  
> **username_0**: Thanks, but I think I was able to find the issue. The texture being used for rendering and storing the entry/exit position of the ray had only limited precision. I am using the Tao framework for C# and the internal format being used was RGB instead of RGB32f, simply swithing to RGB32f improved my rendering considerably.  

---

## 0 answers

