Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
SamplingRenderer.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <memory>
8
9namespace ph
10{
11
13{
14public:
16 std::unique_ptr<IRayEnergyEstimator> estimator,
17 Viewport viewport,
18 SampleFilter filter,
19 uint32 numWorkers);
20
21 void doUpdate(const CoreCookedUnit& cooked, const VisualWorld& world) override = 0;
22 void doRender() override = 0;
23 void retrieveFrame(std::size_t layerIndex, HdrRgbFrame& out_frame) override = 0;
24
25 std::size_t asyncPollUpdatedRegions(TSpan<RenderRegionStatus> out_regions) override = 0;
28
30 std::size_t layerIndex,
31 const Region& region,
32 HdrRgbFrame& out_frame) override = 0;
33
35
36protected:
38 std::unique_ptr<IRayEnergyEstimator> m_estimator;
39};
40
41}// end namespace ph
Definition CoreCookedUnit.h:19
Meta information for data related to ongoing render operation.
Definition RenderObservationInfo.h:15
Definition RenderProgress.h:12
Definition RenderStats.h:12
Definition Renderer.h:39
uint32 numWorkers() const
Definition Renderer.h:155
An image reconstruction kernel.
Definition SampleFilter.h:17
Definition SamplingRenderer.h:13
std::unique_ptr< IRayEnergyEstimator > m_estimator
Definition SamplingRenderer.h:38
RenderStats asyncQueryRenderStats() override=0
Get general information of the ongoing rendering process. More information can be provided by the imp...
RenderObservationInfo getObservationInfo() const override=0
Get information about available transient outputs of an ongoing render operation. This information wi...
RenderProgress asyncQueryRenderProgress() override=0
Get progress of the ongoing rendering process. Implementation is advised to provide this information ...
std::size_t asyncPollUpdatedRegions(TSpan< RenderRegionStatus > out_regions) override=0
Get the rendering regions that have been updated. Status of a region will always transition to ERegio...
void retrieveFrame(std::size_t layerIndex, HdrRgbFrame &out_frame) override=0
Get the rendered result.
SampleFilter m_filter
Definition SamplingRenderer.h:37
void asyncPeekFrame(std::size_t layerIndex, const Region &region, HdrRgbFrame &out_frame) override=0
Get the intermediate render result. This method is similar to retrieveFrame(), except that correctnes...
SamplingRenderer(std::unique_ptr< IRayEnergyEstimator > estimator, Viewport viewport, SampleFilter filter, uint32 numWorkers)
Definition SamplingRenderer.cpp:13
void doUpdate(const CoreCookedUnit &cooked, const VisualWorld &world) override=0
Perform necessary updates for rendering. No asynchronous operation is allowed during update.
void doRender() override=0
Perform rendering.
Definition Viewport.h:16
A virtual world for image synthesis.
Definition VisualWorld.h:34
The root for all renderer implementations.
Definition EEngineProject.h:6
std::span< T, EXTENT > TSpan
A contiguous sequence of objects of type T. Effectively the same as std::span.
Definition TSpan.h:12