History

Exposing the gpu RangeTimer counter for the AO effect

samcake committed 10 years ago

Commit 93c7c181 parent 10de1ac9 files · +42 −13Browse files

Showing the changes to libraries/render-utils/src/RenderDeferredTask.cpp (1 of 9 files). Show all

Unified · Split

libraries/render-utils/src/RenderDeferredTask.cpp+5−0
@@ -202,6 +202,11 @@ void RenderDeferredTask::run(const SceneContextPointer& sceneContext, const Rend · 201 unmodified lines
202202 job.run(sceneContext, renderContext);
203203 }
204204
205+ if (_occlusionJobIndex >= 0 && renderContext->getOcclusionStatus()) {
206+ renderContext->getAmbientOcclusion().gpuTime = _jobs[_occlusionJobIndex].edit<AmbientOcclusionEffect>().getGPUTime();
207+ } else {
208+ renderContext->getAmbientOcclusion().gpuTime = 0.0;
209+ }
205210 };
206211
207212 void DrawOpaqueDeferred::run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ItemIDsBounds& inItems) {