mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-08 14:48:42 +02:00
some clean up:
This commit is contained in:
parent
769655b354
commit
c256893575
4 changed files with 80 additions and 66 deletions
|
@ -373,12 +373,6 @@ void RenderableZoneEntityItem::updateKeyZoneItemFromEntity(RenderableZoneEntityI
|
|||
if (!success) {
|
||||
keyZonePayload.editBound() = render::Item::Bound();
|
||||
}
|
||||
|
||||
updateKeySunFromEntity(keyZonePayload);
|
||||
|
||||
updateKeyAmbientFromEntity(keyZonePayload);
|
||||
|
||||
updateKeyBackgroundFromEntity(keyZonePayload);
|
||||
}
|
||||
|
||||
|
||||
|
@ -387,8 +381,25 @@ void RenderableZoneEntityItem::sceneUpdateRenderItemFromEntity(render::Transacti
|
|||
return;
|
||||
}
|
||||
|
||||
transaction.updateItem<RenderableZoneEntityItemMeta>(_myMetaItem, [&](RenderableZoneEntityItemMeta& data) {
|
||||
bool sunChanged = _keyLightPropertiesChanged;
|
||||
bool backgroundChanged = _backgroundPropertiesChanged;
|
||||
bool stageChanged = _stagePropertiesChanged;
|
||||
bool skyboxChanged = _skyboxPropertiesChanged;
|
||||
|
||||
transaction.updateItem<RenderableZoneEntityItemMeta>(_myMetaItem, [=](RenderableZoneEntityItemMeta& data) {
|
||||
|
||||
updateKeyZoneItemFromEntity(data);
|
||||
|
||||
if (sunChanged) {
|
||||
updateKeySunFromEntity(data);
|
||||
}
|
||||
|
||||
if (sunChanged || skyboxChanged) {
|
||||
updateKeyAmbientFromEntity(data);
|
||||
}
|
||||
if (backgroundChanged || skyboxChanged) {
|
||||
updateKeyBackgroundFromEntity(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
|
|||
// Draw Lights just add the lights to the current list of lights to deal with. NOt really gpu job for now.
|
||||
task.addJob<DrawLight>("DrawLight", lights);
|
||||
|
||||
// Filter zones
|
||||
// Filter zones from the general metas bucket
|
||||
const auto zones = task.addJob<ZoneRendererTask>("ZoneRenderer", metas);
|
||||
|
||||
// Light Clustering
|
||||
|
@ -138,10 +138,7 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
|
|||
|
||||
task.addJob<RenderDeferred>("RenderDeferred", deferredLightingInputs);
|
||||
|
||||
// Use Stencil and draw background in Lighting buffer to complete filling in the opaque
|
||||
//const auto backgroundInputs = DrawBackgroundDeferred::Inputs(background, lightingModel).hasVarying();
|
||||
//task.addJob<DrawBackgroundDeferred>("DrawBackgroundDeferred", backgroundInputs);
|
||||
|
||||
// Similar to light stage, background stage has been filled by several potential render items and resolved for the frame in this job
|
||||
task.addJob<DrawBackgroundStage>("DrawBackgroundDeferred", lightingModel);
|
||||
|
||||
// Render transparent objects forward in LightingBuffer
|
||||
|
@ -207,7 +204,7 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
|
|||
task.addJob<DrawStatus>("DrawStatus", opaques, DrawStatus(statusIconMap));
|
||||
}
|
||||
|
||||
task.addJob<DebugZoneLighting>("DebugZoneLighting", deferredFrameTransform);
|
||||
task.addJob<DebugZoneLighting>("DrawZoneStack", deferredFrameTransform);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -54,11 +54,17 @@ protected:
|
|||
|
||||
class DebugZoneLighting {
|
||||
public:
|
||||
class Config : public render::JobConfig {
|
||||
public:
|
||||
Config(bool enabled = false) : JobConfig(enabled) {}
|
||||
};
|
||||
|
||||
using Inputs = DeferredFrameTransformPointer;
|
||||
using JobModel = render::Job::ModelI<DebugZoneLighting, Inputs>;
|
||||
using JobModel = render::Job::ModelI<DebugZoneLighting, Inputs, Config>;
|
||||
|
||||
DebugZoneLighting() {}
|
||||
|
||||
void configure(const Config& configuration) {}
|
||||
void run(const render::RenderContextPointer& context, const Inputs& inputs);
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue