Jump to content
  • Advertisement
Sign in to follow this  
den_wan

OpenGL Voxel Cone Tracing Problem

This topic is 1321 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

currently i'm using the voxelization method from gpu pro 3 and the cone tracing from http://www.geeks3d.com/20121214/voxel-cone-tracing-global-illumination-in-opengl-4-3/ with a R32UI 256^3 3d texture.

 

my render loop looks like this:

 

clear voxels

voxelize scene

create mipmaps http://pastebin.com/ubKVuzBW

render scene http://pastebin.com/xmBp8n2u

 

the result looks like this (indirect diffuse only):

G46P5icl.png

 

my main issue is the blockiness.

i tried a 3x3x filter during mipmap generation, but that didn't help really.

also tried more texture fetches during cone tracing.

 

atm i'm out of ideas. sad.png

Share this post


Link to post
Share on other sites
Advertisement

Are you using point filtering? You should be using trilinear filtering (GL_LINEAR_MIPMAP_LINEAR).

 

Otherwise, are you rounding your coordinates to voxel? (floor(pos), etc.) - If so, you shouldn't be. :)

Share this post


Link to post
Share on other sites

Are you using point filtering? You should be using trilinear filtering (GL_LINEAR_MIPMAP_LINEAR).

 

Otherwise, are you rounding your coordinates to voxel? (floor(pos), etc.) - If so, you shouldn't be. smile.png

yes i'm using GL_LINEAR_MIPMAP_LINEAR filtering.

 

i convert my world space position to voxel space like this:

 

vec3 offset = round(input.wsPosition.xyz * u_invGridCellSize);

vec3 voxelPos = (offset + u_voxelHalfDim);

 

it is basically the same as:

 

vec3 voxelPos = round(wsPosition / gridHalfDim * voxelHalfDim) + voxelHalfDim

 

i removed the round() and it does improve some things, but everything is still blocky as hell.

 

so i had this idea that it does not properly filter the R32UI texture and switched to RGBA16F.

it looks much better now, but still some minor issues at the edges for example:

dmUvtbml.png

Edited by den_wan

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!