24 #ifndef PXR_IMAGING_PLUGIN_HD_EMBREE_RENDERER_H
25 #define PXR_IMAGING_PLUGIN_HD_EMBREE_RENDERER_H
29 #include "pxr/imaging/hd/renderThread.h"
30 #include "pxr/imaging/hd/renderPassState.h"
35 #include <embree3/rtcore.h>
36 #include <embree3/rtcore_ray.h>
41 PXR_NAMESPACE_OPEN_SCOPE
77 void SetAovBindings(HdRenderPassAovBindingVector
const &aovBindings);
125 bool _ValidateAovBindings();
135 size_t tileStart,
size_t tileEnd);
139 void _TraceRay(
unsigned int x,
unsigned int y,
141 std::default_random_engine &random);
144 GfVec4f _ComputeColor(RTCRayHit
const& rayHit,
145 std::default_random_engine &random,
148 bool _ComputeDepth(RTCRayHit
const& rayHit,
float *depth,
bool clip);
150 bool _ComputeId(RTCRayHit
const& rayHit,
TfToken const& idType, int32_t *
id);
152 bool _ComputeNormal(RTCRayHit
const& rayHit,
GfVec3f *normal,
bool eye);
154 bool _ComputePrimvar(RTCRayHit
const& rayHit,
TfToken const& primvar,
163 float _ComputeAmbientOcclusion(
GfVec3f const& position,
165 std::default_random_engine &random);
168 HdRenderPassAovBindingVector _aovBindings;
170 HdParsedAovTokenVector _aovNames;
173 bool _aovBindingsNeedValidation;
175 bool _aovBindingsValid;
183 unsigned int _height;
198 int _samplesToConvergence;
200 int _ambientOcclusionSamples;
202 bool _enableSceneColors;
205 std::atomic<int> _completedSamples;
208 PXR_NAMESPACE_CLOSE_SCOPE
210 #endif // PXR_IMAGING_PLUGIN_HD_EMBREE_RENDERER_H
void MarkAovBuffersUnconverged()
Mark the aov buffers as unconverged.
A 2D rectangle with integer coordinates.
Basic type for a vector of 3 float components.
~HdEmbreeRenderer()
Renderer destructor.
void SetEnableSceneColors(bool enableSceneColors)
Sets whether to use scene colors while rendering.
HdEmbreeRenderer()
Renderer constructor.
Token for efficient comparison, assignment, and hashing of known strings.
void SetCamera(const GfMatrix4d &viewMatrix, const GfMatrix4d &projMatrix)
Set the camera to use for rendering.
Stores a 4x4 matrix of double elements.
void SetSamplesToConvergence(int samplesToConvergence)
Set how many samples to render before considering an image converged.
void SetScene(RTCScene scene)
Set the embree scene that this renderer should raycast into.
void SetAmbientOcclusionSamples(int ambientOcclusionSamples)
Set how many samples to use for ambient occlusion.
Basic type for a vector of 4 float components.
void Clear()
Clear the bound aov buffers (typically before rendering).
int GetCompletedSamples() const
Get the number of samples completed so far.
HdEmbreeRenderer implements a renderer on top of Embree's raycasting abilities.
void SetAovBindings(HdRenderPassAovBindingVector const &aovBindings)
Set the aov bindings to use for rendering.
void SetDataWindow(const GfRect2i &dataWindow)
Set the data window to fill (same meaning as in CameraUtilFraming with coordinate system also being y...
HdRenderThread is a utility that specific render delegates can choose to use depending on their needs...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
void Render(HdRenderThread *renderThread)
Rendering entrypoint: add one sample per pixel to the whole sample buffer, and then loop until the im...
HdRenderPassAovBindingVector const & GetAovBindings() const
Get the aov bindings being used for rendering.