From 297907688c898e61ac6ea63d268671d96406bc7a Mon Sep 17 00:00:00 2001 From: samcake Date: Mon, 10 Oct 2016 12:43:33 -0700 Subject: [PATCH] Fixing reveiw comments --- libraries/gpu/src/gpu/Query.h | 4 ++-- libraries/model/src/model/LightIrradiance.shared.slh | 3 +-- libraries/render-utils/src/LightClusters.h | 10 ++++------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/libraries/gpu/src/gpu/Query.h b/libraries/gpu/src/gpu/Query.h index 26553d67b3..e053fdd507 100644 --- a/libraries/gpu/src/gpu/Query.h +++ b/libraries/gpu/src/gpu/Query.h @@ -42,7 +42,7 @@ namespace gpu { protected: Handler _returnHandler; - std::string _name; + const std::string _name; uint64_t _queryResult { 0 }; uint64_t _usecBatchElapsedTime { 0 }; }; @@ -67,7 +67,7 @@ namespace gpu { static const int QUERY_QUEUE_SIZE { 4 }; - std::string _name; + const std::string _name; gpu::Queries _timerQueries; int _headIndex = -1; int _tailIndex = -1; diff --git a/libraries/model/src/model/LightIrradiance.shared.slh b/libraries/model/src/model/LightIrradiance.shared.slh index eaa1b33a88..4a2ee40c9d 100644 --- a/libraries/model/src/model/LightIrradiance.shared.slh +++ b/libraries/model/src/model/LightIrradiance.shared.slh @@ -32,10 +32,9 @@ float lightIrradiance_getFalloffSpot(LightIrradiance li) { return li.attenuation float lightIrradiance_evalLightAttenuation(LightIrradiance li, float d) { float radius = lightIrradiance_getFalloffRadius(li); float cutoff = lightIrradiance_getCutoffRadius(li); - float denom = d / radius + 1.0; + float denom = (d / radius) + 1.0; float attenuation = 1.0 / (denom * denom); - // "Fade" the edges of light sources to make things look a bit more attractive. // Note: this tends to look a bit odd at lower exponents. attenuation *= min(1, max(0, -(d - cutoff))); diff --git a/libraries/render-utils/src/LightClusters.h b/libraries/render-utils/src/LightClusters.h index 9514066561..955e780b23 100644 --- a/libraries/render-utils/src/LightClusters.h +++ b/libraries/render-utils/src/LightClusters.h @@ -11,11 +11,13 @@ #ifndef hifi_render_utils_LightClusters_h #define hifi_render_utils_LightClusters_h +#include #include #include #include "LightStage.h" - -#include +#include "DeferredFrameTransform.h" +#include "LightingModel.h" +#include "SurfaceGeometryPass.h" class FrustumGrid { public: @@ -160,10 +162,6 @@ signals: protected: }; -#include "DeferredFrameTransform.h" -#include "LightingModel.h" -#include "SurfaceGeometryPass.h" - class LightClusteringPass { public: using Inputs = render::VaryingSet3;