Voxel Cone Tracing Problem

Started by
1 comment, last by den_wan 9 years, 4 months ago

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

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. :)

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

This topic is closed to new replies.

Advertisement