Fix cone shadows

This commit is contained in:
Lubos Lenco 2017-10-12 23:57:12 +02:00
parent 0d99afc54e
commit 814644f0b7

View file

@ -158,7 +158,12 @@ void main() {
#endif
#ifdef _VoxelGIShadow // #else
if (dotNL > 0.0) visibility = max(0, 1.0 - traceShadow(p / voxelgiDimensions, l, 0.1, length(lp)));
#ifdef _VoxelGICam
vec3 voxpos = (p - eyeSnap) / voxelgiHalfExtents;
#else
vec3 voxpos = p / voxelgiHalfExtents;
#endif
if (dotNL > 0.0) visibility = max(0, 1.0 - traceShadow(voxpos, l, 0.1, length(lp)));
#endif