All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
config.h
1//
2// Copyright 2017 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_PLUGIN_HD_EMBREE_CONFIG_H
8#define PXR_IMAGING_PLUGIN_HD_EMBREE_CONFIG_H
9
10#include "pxr/pxr.h"
12
13PXR_NAMESPACE_OPEN_SCOPE
14
15// NOTE: types here restricted to bool/int/string, as also used for
16// TF_DEFINE_ENV_SETTING
17constexpr int HdEmbreeDefaultSamplesToConvergence = 100;
18constexpr int HdEmbreeDefaultTileSize = 8;
19constexpr int HdEmbreeDefaultAmbientOcclusionSamples = 16;
20constexpr bool HdEmbreeDefaultJitterCamera = true;
21constexpr bool HdEmbreeDefaultUseFaceColors = true;
22constexpr int HdEmbreeDefaultCameraLightIntensity = 300;
23constexpr int HdEmbreeDefaultRandomNumberSeed = -1;
24
39public:
40
42 static const HdEmbreeConfig &GetInstance();
43
48 unsigned int samplesToConvergence = HdEmbreeDefaultSamplesToConvergence;
49
54 unsigned int tileSize = HdEmbreeDefaultTileSize;
55
60 unsigned int ambientOcclusionSamples = HdEmbreeDefaultAmbientOcclusionSamples;
61
67 bool jitterCamera = HdEmbreeDefaultJitterCamera;
68
75 bool useFaceColors = HdEmbreeDefaultUseFaceColors;
76
81 float cameraLightIntensity = HdEmbreeDefaultCameraLightIntensity;
82
90 int randomNumberSeed = HdEmbreeDefaultRandomNumberSeed;
91
92private:
93 // The constructor initializes the config variables with their
94 // default or environment-provided override, and optionally prints
95 // them.
97 ~HdEmbreeConfig() = default;
98
99 HdEmbreeConfig(const HdEmbreeConfig&) = delete;
100 HdEmbreeConfig& operator=(const HdEmbreeConfig&) = delete;
101
102 friend class TfSingleton<HdEmbreeConfig>;
103};
104
105PXR_NAMESPACE_CLOSE_SCOPE
106
107#endif // PXR_IMAGING_PLUGIN_HD_EMBREE_CONFIG_H
This class is a singleton, holding configuration parameters for HdEmbree.
Definition: config.h:38
bool useFaceColors
Should the renderpass use the color primvar, or flat white colors? (Flat white shows off ambient occl...
Definition: config.h:75
unsigned int ambientOcclusionSamples
How many ambient occlusion rays should we generate per camera ray?
Definition: config.h:60
unsigned int tileSize
How many pixels are in an atomic unit of parallel work? A work item is a square of size [tileSize x t...
Definition: config.h:54
bool jitterCamera
Should the renderpass jitter camera rays for antialiasing?
Definition: config.h:67
unsigned int samplesToConvergence
How many samples do we need before a pixel is considered converged?
Definition: config.h:48
static const HdEmbreeConfig & GetInstance()
Return the configuration singleton.
int randomNumberSeed
Seed to give to the random number generator.
Definition: config.h:90
float cameraLightIntensity
What should the intensity of the camera light be, specified as a percent of <1, 1,...
Definition: config.h:81
Manage a single instance of an object (see.
Definition: singleton.h:105
Manage a single instance of an object.