Showing the changes to libraries/render-utils/src/RenderDeferredTask.cpp (1 of 107 files). Show all
Unified · Split
| @@ -40,6 +40,7 @@ · 39 unmodified lines | ||
| 40 | 40 | #include "AntialiasingEffect.h" |
| 41 | 41 | #include "ToneMappingEffect.h" |
| 42 | 42 | #include "SubsurfaceScattering.h" |
| 43 | +#include "DrawHaze.h" | |
| 43 | 44 | #include "OutlineEffect.h" |
| 44 | 45 | |
| 45 | 46 | #include <gpu/StandardShaderLib.h> |
| @@ -149,11 +150,13 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren · 103 unmodified lines | ||
| 149 | 150 | // Create the cluster grid of lights, cpu job for now |
| 150 | 151 | const auto lightClusteringPassInputs = LightClusteringPass::Inputs(deferredFrameTransform, lightingModel, linearDepthTarget).asVarying(); |
| 151 | 152 | const auto lightClusters = task.addJob<LightClusteringPass>("LightClustering", lightClusteringPassInputs); |
| 152 | − | |
| 153 | − | |
| 153 | + | |
| 154 | + // Add haze model | |
| 155 | + const auto hazeModel = task.addJob<FetchHazeStage>("HazeModel"); | |
| 156 | + | |
| 154 | 157 | // DeferredBuffer is complete, now let's shade it into the LightingBuffer |
| 155 | 158 | const auto deferredLightingInputs = RenderDeferred::Inputs(deferredFrameTransform, deferredFramebuffer, lightingModel, |
| 156 | − surfaceGeometryFramebuffer, ambientOcclusionFramebuffer, scatteringResource, lightClusters).asVarying(); | |
| 159 | + surfaceGeometryFramebuffer, ambientOcclusionFramebuffer, scatteringResource, lightClusters, hazeModel).asVarying(); | |
| 157 | 160 | |
| 158 | 161 | task.addJob<RenderDeferred>("RenderDeferred", deferredLightingInputs); |
| 159 | 162 | |
| @@ -169,7 +172,10 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren · 9 unmodified lines | ||
| 169 | 172 | const auto debugLightClustersInputs = DebugLightClusters::Inputs(deferredFrameTransform, deferredFramebuffer, lightingModel, linearDepthTarget, lightClusters).asVarying(); |
| 170 | 173 | task.addJob<DebugLightClusters>("DebugLightClusters", debugLightClustersInputs); |
| 171 | 174 | } |
| 172 | − | |
| 175 | + | |
| 176 | + const auto drawHazeInputs = render::Varying(DrawHaze::Inputs(hazeModel, lightingFramebuffer, linearDepthTarget, deferredFrameTransform, lightingFramebuffer)); | |
| 177 | + task.addJob<DrawHaze>("DrawHaze", drawHazeInputs); | |
| 178 | + | |
| 173 | 179 | const auto toneAndPostRangeTimer = task.addJob<BeginGPURangeTimer>("BeginToneAndPostRangeTimer", "PostToneOverlaysAntialiasing"); |
| 174 | 180 | |
| 175 | 181 | // Lighting Buffer ready for tone mapping |