Jump to content

3D Texture Filled with Voxel Lighting


Josh

2,946 views

 Share

I have successfully transferred lit voxel data into a 3D texture. The texture is now being used to display the lighting at each voxel. Soft edges are appearing due to linear filtering in the texture. To achieve this, I used an OpenGL 4.2 feature which allows you to write values into any arbitrary position in a texture. This could also be used for motion blur or fluid simulations in the future. However, since Mac support for OpenGL only goes up to 4.1, it means we cannot use real-time GI on a Mac, unless a separate workaround is written to handle this, or unless a renderer is written using Vulkan / Metal. At the time I am going to stick with OpenGL, because it would be too hard to implement an experimental new architecture with an API I don't know much about.

1820970309_Engine2018-08-0612-28-19-60.thumb.jpg.da1ad33042b1cadc2b87875fed0a3a25.jpg

236559212_Engine2018-08-0612-29-20-78.thumb.jpg.6fb8db58ca70e5f2057cc53f405f50ce.jpg

Now that we have our lit voxel 3D texture it should be possible to generate mipmaps and begin cone tracing to simulate global illumination.

  • Like 3
 Share

2 Comments


Recommended Comments

Here you can see what happens when mipmaps are generated and some of the lower-res mipmaps are used in the texture lookup. This isn't GI yet, but it gives us a nice blurry lighting data that we use for the GI lookup.

Image1.thumb.jpg.bff76f0ef4dfaa2bb1a9a36b4d81156f.jpg

  • Like 3
Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...