diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-12-17 15:29:39 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-12-17 15:40:24 +0100 |
commit | 8f25a2dc11b73cd440adcd341e4180f6f93877aa (patch) | |
tree | f50b60a58cc6b022055e5c8be7280fcfd3e23473 /scene/3d/voxel_light_baker.cpp | |
parent | ad3393743c2e505f68a12b20113f9c2bda88fa89 (diff) | |
download | redot-engine-8f25a2dc11b73cd440adcd341e4180f6f93877aa.tar.gz |
Cleanup some #if 0'd code
Diffstat (limited to 'scene/3d/voxel_light_baker.cpp')
-rw-r--r-- | scene/3d/voxel_light_baker.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index 032bccf1d3..39ff6fa35e 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -897,17 +897,7 @@ void VoxelLightBaker::plot_light_omni(const Vector3 &p_pos, const Color &p_color float dt = CLAMP((d + distance_adv) / local_radius, 0, 1); att *= powf(1.0 - dt, p_attenutation); } -#if 0 - if (light_cache.type == VS::LIGHT_SPOT) { - - float angle = Math::rad2deg(acos(light_axis.dot(spot_axis))); - if (angle > light_cache.spot_angle) - continue; - float d = CLAMP(angle / light_cache.spot_angle, 1, 0); - att *= powf(1.0 - d, light_cache.spot_attenuation); - } -#endif clip_planes = 0; for (int c = 0; c < 3; c++) { @@ -1041,17 +1031,7 @@ void VoxelLightBaker::plot_light_spot(const Vector3 &p_pos, const Vector3 &p_axi float dt = CLAMP((d + distance_adv) / local_radius, 0, 1); att *= powf(1.0 - dt, p_attenutation); } -#if 0 - if (light_cache.type == VS::LIGHT_SPOT) { - - float angle = Math::rad2deg(acos(light_axis.dot(spot_axis))); - if (angle > light_cache.spot_angle) - continue; - float d = CLAMP(angle / light_cache.spot_angle, 1, 0); - att *= powf(1.0 - d, light_cache.spot_attenuation); - } -#endif clip_planes = 0; for (int c = 0; c < 3; c++) { @@ -2016,6 +1996,7 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh } } +// Enable for debugging #if 0 { PoolVector<uint8_t> img; |