fixing warnings from the build

This commit is contained in:
sam gateau 2018-12-18 16:25:24 -08:00
parent 5b50b0332d
commit b8d96d98b8
5 changed files with 11 additions and 35 deletions

View file

@ -27,8 +27,6 @@
// Sphere entities should fit inside a cube entity of the same size, so a sphere that has dimensions 1x1x1
// is a half unit sphere. However, the geometry cache renders a UNIT sphere, so we need to scale down.
static const float SPHERE_ENTITY_SCALE = 0.5f;
static const unsigned int SUN_SHADOW_CASCADE_COUNT{ 4 };
static const float SUN_SHADOW_MAX_DISTANCE{ 40.0f };
using namespace render;
using namespace render::entities;

View file

@ -119,17 +119,11 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
// Extract opaques / transparents / lights / metas / overlays / background
const auto& opaques = items[RenderFetchCullSortTask::OPAQUE_SHAPE];
const auto& transparents = items[RenderFetchCullSortTask::TRANSPARENT_SHAPE];
const auto& lights = items[RenderFetchCullSortTask::LIGHT];
const auto& metas = items[RenderFetchCullSortTask::META];
const auto& overlayOpaques = items[RenderFetchCullSortTask::OVERLAY_OPAQUE_SHAPE];
const auto& overlayTransparents = items[RenderFetchCullSortTask::OVERLAY_TRANSPARENT_SHAPE];
const auto& overlaysInFrontOpaque = items[RenderFetchCullSortTask::LAYER_FRONT_OPAQUE_SHAPE];
const auto& overlaysInFrontTransparent = items[RenderFetchCullSortTask::LAYER_FRONT_TRANSPARENT_SHAPE];
const auto& overlaysHUDOpaque = items[RenderFetchCullSortTask::LAYER_HUD_OPAQUE_SHAPE];
const auto& overlaysHUDTransparent = items[RenderFetchCullSortTask::LAYER_HUD_TRANSPARENT_SHAPE];
const auto& spatialSelection = fetchedItems.get1();
// Lighting model comes next, the big configuration of the view
const auto& lightingModel = inputs[1];
@ -142,8 +136,6 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
const auto& hazeFrame = currentStageFrames[2];
const auto& bloomFrame = currentStageFrames[3];
const auto& zones = lightingStageInputs[1];
// Shadow Task Outputs
const auto& shadowTaskOutputs = inputs.get3();
@ -296,8 +288,6 @@ void RenderDeferredTaskDebug::build(JobModel& task, const render::Varying& input
const auto& transparents = items[RenderFetchCullSortTask::TRANSPARENT_SHAPE];
const auto& lights = items[RenderFetchCullSortTask::LIGHT];
const auto& metas = items[RenderFetchCullSortTask::META];
const auto& overlayOpaques = items[RenderFetchCullSortTask::OVERLAY_OPAQUE_SHAPE];
const auto& overlayTransparents = items[RenderFetchCullSortTask::OVERLAY_TRANSPARENT_SHAPE];
const auto& overlaysInFrontOpaque = items[RenderFetchCullSortTask::LAYER_FRONT_OPAQUE_SHAPE];
const auto& overlaysInFrontTransparent = items[RenderFetchCullSortTask::LAYER_FRONT_TRANSPARENT_SHAPE];
const auto& overlaysHUDOpaque = items[RenderFetchCullSortTask::LAYER_HUD_OPAQUE_SHAPE];
@ -308,7 +298,7 @@ void RenderDeferredTaskDebug::build(JobModel& task, const render::Varying& input
// RenderShadowTask out
const auto& shadowOut = inputs.get1();
const auto& renderShadowTaskOut = inputs[0];
const auto& renderShadowTaskOut = shadowOut[0];
// Extract the Lighting Stages Current frame ( and zones)
const auto lightingStageInputs = inputs.get2();

View file

@ -64,16 +64,12 @@ void RenderForwardTask::build(JobModel& task, const render::Varying& input, rend
// Extract opaques / transparents / lights / metas / overlays / background
const auto& opaques = items[RenderFetchCullSortTask::OPAQUE_SHAPE];
const auto& transparents = items[RenderFetchCullSortTask::TRANSPARENT_SHAPE];
const auto& lights = items[RenderFetchCullSortTask::LIGHT];
const auto& metas = items[RenderFetchCullSortTask::META];
const auto& overlayOpaques = items[RenderFetchCullSortTask::OVERLAY_OPAQUE_SHAPE];
const auto& overlayTransparents = items[RenderFetchCullSortTask::OVERLAY_TRANSPARENT_SHAPE];
const auto& overlaysInFrontOpaque = items[RenderFetchCullSortTask::LAYER_FRONT_OPAQUE_SHAPE];
const auto& overlaysInFrontTransparent = items[RenderFetchCullSortTask::LAYER_FRONT_TRANSPARENT_SHAPE];
const auto& overlaysHUDOpaque = items[RenderFetchCullSortTask::LAYER_HUD_OPAQUE_SHAPE];
const auto& overlaysHUDTransparent = items[RenderFetchCullSortTask::LAYER_HUD_TRANSPARENT_SHAPE];
const auto& spatialSelection = fetchedItems.get1();
// TODO: Re enable the rendering of the HUD overlayes
// const auto& overlaysHUDOpaque = items[RenderFetchCullSortTask::LAYER_HUD_OPAQUE_SHAPE];
// const auto& overlaysHUDTransparent = items[RenderFetchCullSortTask::LAYER_HUD_TRANSPARENT_SHAPE];
// Lighting model comes next, the big configuration of the view
const auto& lightingModel = inputs[1];
@ -84,9 +80,7 @@ void RenderForwardTask::build(JobModel& task, const render::Varying& input, rend
const auto currentStageFrames = lightingStageInputs.get0();
const auto lightFrame = currentStageFrames[0];
const auto backgroundFrame = currentStageFrames[1];
const auto& hazeFrame = currentStageFrames[2];
const auto& bloomFrame = currentStageFrames[3];
const auto& zones = lightingStageInputs[1];
// First job, alter faded

View file

@ -33,6 +33,8 @@
// but are readjusted afterwards
#define SHADOW_FRUSTUM_NEAR 1.0f
#define SHADOW_FRUSTUM_FAR 500.0f
static const unsigned int SHADOW_CASCADE_COUNT{ 4 };
static const float SHADOW_MAX_DISTANCE{ 40.0f };
using namespace render;
@ -62,8 +64,6 @@ void RenderShadowTask::build(JobModel& task, const render::Varying& input, rende
const auto& lightFrame = input.getN<Input>(0);
const auto& lightingModel = input.getN<Input>(1);
const auto setupOutput = task.addJob<RenderShadowSetup>("ShadowSetup", input);
const auto queryResolution = setupOutput.getN<RenderShadowSetup::Output>(1);
const auto shadowFrame = setupOutput.getN<RenderShadowSetup::Output>(3);
@ -371,7 +371,7 @@ void RenderShadowSetup::run(const render::RenderContextPointer& renderContext, c
output.edit2() = _cameraFrustum;
if (!_globalShadowObject) {
_globalShadowObject = std::make_shared<LightStage::Shadow>(graphics::LightPointer(), 100.f, 4);
_globalShadowObject = std::make_shared<LightStage::Shadow>(graphics::LightPointer(), SHADOW_MAX_DISTANCE, SHADOW_CASCADE_COUNT);
}
const auto theGlobalLight = lightStage->getCurrentKeyLight(lightFrame);
@ -446,19 +446,13 @@ void RenderShadowSetup::run(const render::RenderContextPointer& renderContext, c
void RenderShadowCascadeSetup::run(const render::RenderContextPointer& renderContext, const Inputs& input, Outputs& output) {
const auto shadowFrame = input;
/*
auto lightStage = renderContext->_scene->getStage<LightStage>();
const auto& lightFrame = *input;
assert(lightStage);
*/
// Cache old render args
RenderArgs* args = renderContext->args;
RenderShadowTask::CullFunctor cullFunctor;
if (shadowFrame && !shadowFrame->_objects.empty() && shadowFrame->_objects[0]) {
const auto globalShadow = shadowFrame->_objects[0]; //lightStage->getCurrentKeyShadow(lightFrame);
const auto globalShadow = shadowFrame->_objects[0];
if (globalShadow && _cascadeIndex < globalShadow->getCascadeCount()) {
// Second item filter is to filter items to keep in shadow frustum computation (here we need to keep shadow receivers)

View file

@ -35,7 +35,7 @@ public:
template <class T> const T& get() const { return std::static_pointer_cast<const Model<T>>(_concept)->_data; }
template <class T> T& edit() { return std::static_pointer_cast<Model<T>>(_concept)->_data; }
const std::string& name() const { return _concept->name(); }
const std::string name() const { return _concept->name(); }
// access potential sub varyings contained in this one.
Varying operator[] (uint8_t index) const { return (*_concept)[index]; }