armory3d / armory

3D Engine with Blender Integration
https://armory3d.org/engine
zlib License
3.08k stars 319 forks source link

Gi clipmaps #3012

Closed e2002e closed 6 months ago

e2002e commented 7 months ago

Hello ! This pull request implements voxels global illumination with clipmaps (level of details). The AO module also benefits from the clipmaps. Forum's thread: https://forums.armory3d.org/t/voxel-gi-with-clipmaps/5242

NOTE: All compute shaders (excepted voxels_light) come from WickedEngine, the licence is included on top of these files, even though they are converted from hlsl to glsl, and use armory's functions. I have worked a long time with legacy conetracer before implementing WickedEngine's. From here, to have everything work together, it was better to implement (let's not say copy) the whole procedure.

e2002e commented 7 months ago

This produces correct renders, sampling is consistent and seams are not abrupt, in the worst case the blending handles the transition. Capture du 2024-04-25 16-42-34 BUGS:

Here the voxel resolution is set to lowest, with 5 clipmaps, and a voxel size of 0.25. Capture du 2024-04-27 11-28-40

e2002e commented 6 months ago

Hi @luboslenco, this is finished ! I spent the week testing it and there aren't any other bugs than those listed. It's actually seamless now. I'll still be trying to get voxels shadows to work. But I think you can merge.

e2002e commented 6 months ago

@luboslenco don't forget to ship the updated Krom with this. It needs the commits you merged a few months ago (rgba8 3d images and compute shaders support). I'll be looking for a way to implement transparent shadows now.