mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 07:43:57 +02:00
It works
This commit is contained in:
parent
75cddec647
commit
5698be5435
4 changed files with 26 additions and 9 deletions
|
@ -11,13 +11,20 @@
|
|||
|
||||
#include <render/DrawTask.h>
|
||||
|
||||
class HitEffectConfig : public render::Job::Config {
|
||||
Q_OBJECT
|
||||
public:
|
||||
HitEffectConfig() : render::Job::Config(false) {}
|
||||
};
|
||||
|
||||
class HitEffect {
|
||||
public:
|
||||
using Config = HitEffectConfig;
|
||||
using JobModel = render::Job::Model<HitEffect, Config>;
|
||||
|
||||
HitEffect();
|
||||
|
||||
void configure(const Config&) {}
|
||||
void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext);
|
||||
using JobModel = render::Job::Model<HitEffect>;
|
||||
|
||||
const gpu::PipelinePointer& getHitEffectPipeline();
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ void RenderDeferred::run(const SceneContextPointer& sceneContext, const RenderCo
|
|||
|
||||
void ToneMappingDeferred::configure(const Config& configuration) {
|
||||
if (configuration.exposure >= 0) {
|
||||
_toneMappingEffect.setExposure(configuration.curve);
|
||||
_toneMappingEffect.setExposure(configuration.exposure);
|
||||
}
|
||||
if (configuration.curve >= 0) {
|
||||
_toneMappingEffect.setToneCurve((ToneMappingEffect::ToneCurve)configuration.curve);
|
||||
|
@ -197,8 +197,6 @@ void RenderDeferredTask::run(const SceneContextPointer& sceneContext, const Rend
|
|||
}
|
||||
|
||||
setAntialiasingStatus(renderContext->getFxaaStatus());
|
||||
setToneMappingExposure(renderContext->getTone().exposure);
|
||||
setToneMappingToneCurve(renderContext->getTone().toneCurve);
|
||||
// TODO: Allow runtime manipulation of culling ShouldRenderFunctor
|
||||
|
||||
// TODO: For now, lighting is controlled through a singleton, so it is distinct
|
||||
|
|
|
@ -19,13 +19,22 @@
|
|||
|
||||
class ViewFrustum;
|
||||
|
||||
class RenderShadowMapConfig : public render::Job::Config {
|
||||
Q_OBJECT
|
||||
public:
|
||||
RenderShadowMapConfig() : render::Job::Config(false) {}
|
||||
};
|
||||
|
||||
class RenderShadowMap {
|
||||
public:
|
||||
using Config = RenderShadowMapConfig;
|
||||
using JobModel = render::Job::ModelI<RenderShadowMap, render::ShapesIDsBounds, Config>;
|
||||
|
||||
RenderShadowMap(render::ShapePlumberPointer shapePlumber) : _shapePlumber{ shapePlumber } {}
|
||||
void configure(const Config&) {}
|
||||
void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext,
|
||||
const render::ShapesIDsBounds& inShapes);
|
||||
|
||||
using JobModel = render::Job::ModelI<RenderShadowMap, render::ShapesIDsBounds>;
|
||||
protected:
|
||||
render::ShapePlumberPointer _shapePlumber;
|
||||
};
|
||||
|
|
|
@ -154,7 +154,8 @@ public:
|
|||
}
|
||||
|
||||
void run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext) {
|
||||
if (isEnabled()) {
|
||||
std::shared_ptr<Job::Config>& config = std::static_pointer_cast<Job::Config>(_config);
|
||||
if (config->alwaysEnabled || config->enabled) {
|
||||
jobRunI(_data, sceneContext, renderContext, _input.get<I>());
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +180,8 @@ public:
|
|||
}
|
||||
|
||||
void run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext) {
|
||||
if (isEnabled()) {
|
||||
std::shared_ptr<Job::Config>& config = std::static_pointer_cast<Job::Config>(_config);
|
||||
if (config->alwaysEnabled || config->enabled) {
|
||||
jobRunO(_data, sceneContext, renderContext, _output.edit<O>());
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +209,8 @@ public:
|
|||
}
|
||||
|
||||
void run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext) {
|
||||
if (isEnabled()) {
|
||||
std::shared_ptr<Job::Config>& config = std::static_pointer_cast<Job::Config>(_config);
|
||||
if (config->alwaysEnabled || config->enabled) {
|
||||
jobRunIO(_data, sceneContext, renderContext, _input.get<I>(), _output.edit<O>());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue