Disable cone trace for zero intensity

This commit is contained in:
luboslenco 2019-02-07 21:33:04 +01:00
parent 0c01a9b726
commit dc08938884
2 changed files with 4 additions and 0 deletions

View file

@ -262,12 +262,14 @@ void main() {
vec3 voxpos = p / voxelgiHalfExtents;
#endif
#ifndef _VoxelAONoTrace
#ifdef _VoxelGITemporal
envl.rgb *= 1.0 - (traceAO(voxpos, n, voxels) * voxelBlend +
traceAO(voxpos, n, voxelsLast) * (1.0 - voxelBlend));
#else
envl.rgb *= 1.0 - traceAO(voxpos, n, voxels);
#endif
#endif
#endif

View file

@ -84,6 +84,8 @@ def add_world_defs():
wrd.world_defs += '_VoxelAOvar' # Write a shader variant
if rpdat.arm_voxelgi_shadows:
wrd.world_defs += '_VoxelShadow'
if rpdat.arm_voxelgi_occ == 0.0:
wrd.world_defs += '_VoxelAONoTrace'
if arm.utils.get_legacy_shaders() and not state.is_viewport:
wrd.world_defs += '_Legacy'