0
$\begingroup$

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. enter image description here

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?

$\endgroup$
  • $\begingroup$ " I collect all the color information from the voxel and blend together" Can we see code for this part ? $\endgroup$ – PaulHK Jul 26 at 6:26
  • $\begingroup$ 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. $\endgroup$ – user3029710 Jul 26 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.