I have been trying to implement a simple GPU based volumetric renderer, somewhat similar to described here. 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.
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?