armory3d / armory

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

patch voxels / screen space refraction 1.1 #3058

Closed e2002e closed 1 month ago

e2002e commented 1 month ago

Hello @luboslenco, This pull request fixes inconsistencies with voxels and bugs in screen space refraction. There is an issue with GI and spot lights, the maximum number of texture units gets reached. This makes the program return with sigsev 11 when using clustered spots (without atlas) and GI. When voxels are set to off or AO there is no problems.

I have a branch for transparent shadows ready to be merged, but the issue of texture units limitation is confirmed here, with twice as much textures, it crashes with spot lights even when voxels are off.

The reason why only spots crash is that shadow maps for point lights are bound even when only spots are used, while when using point lights, shadow maps for spots aren't bound.