mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Added Haze model as input to transparency shader.
This commit is contained in:
parent
83ff20b599
commit
3d2c8186e7
3 changed files with 6 additions and 3 deletions
|
@ -163,7 +163,7 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
|
|||
task.addJob<DrawHaze>("DrawHazeDeferred", drawHazeInputs);
|
||||
|
||||
// Render transparent objects forward in LightingBuffer
|
||||
const auto transparentsInputs = DrawDeferred::Inputs(transparents, lightingModel).asVarying();
|
||||
const auto transparentsInputs = DrawDeferred::Inputs(transparents, lightingModel, hazeModel).asVarying();
|
||||
task.addJob<DrawDeferred>("DrawTransparentDeferred", transparentsInputs, shapePlumber);
|
||||
|
||||
// LIght Cluster Grid Debuging job
|
||||
|
@ -291,6 +291,7 @@ void DrawDeferred::run(const RenderContextPointer& renderContext, const Inputs&
|
|||
|
||||
const auto& inItems = inputs.get0();
|
||||
const auto& lightingModel = inputs.get1();
|
||||
const auto& hazeModel = inputs.get2();
|
||||
|
||||
RenderArgs* args = renderContext->args;
|
||||
|
||||
|
@ -311,6 +312,7 @@ void DrawDeferred::run(const RenderContextPointer& renderContext, const Inputs&
|
|||
|
||||
// Setup lighting model for all items;
|
||||
batch.setUniformBuffer(render::ShapePipeline::Slot::LIGHTING_MODEL, lightingModel->getParametersBuffer());
|
||||
batch.setUniformBuffer(render::ShapePipeline::Slot::HAZE_MODEL, hazeModel->getParametersBuffer());
|
||||
|
||||
// From the lighting model define a global shapKey ORED with individiual keys
|
||||
ShapeKey::Builder keyBuilder;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <gpu/Pipeline.h>
|
||||
#include <render/RenderFetchCullSortTask.h>
|
||||
#include "LightingModel.h"
|
||||
|
||||
#include "model/Haze.h"
|
||||
|
||||
class BeginGPURangeTimer {
|
||||
public:
|
||||
|
@ -66,7 +66,7 @@ protected:
|
|||
|
||||
class DrawDeferred {
|
||||
public:
|
||||
using Inputs = render::VaryingSet2 <render::ItemBounds, LightingModelPointer>;
|
||||
using Inputs = render::VaryingSet3 <render::ItemBounds, LightingModelPointer, model::HazePointer>;
|
||||
using Config = DrawConfig;
|
||||
using JobModel = render::Job::ModelI<DrawDeferred, Inputs, Config>;
|
||||
|
||||
|
|
|
@ -238,6 +238,7 @@ public:
|
|||
LIGHT,
|
||||
LIGHT_AMBIENT_BUFFER,
|
||||
FADE_PARAMETERS,
|
||||
HAZE_MODEL
|
||||
};
|
||||
|
||||
enum MAP {
|
||||
|
|
Loading…
Reference in a new issue