@@ -20,26 +20,49 @@ TF_INSTANTIATE_SINGLETON(HdEmbreeConfig);
20
20
// Each configuration variable has an associated environment variable.
21
21
// The environment variable macro takes the variable name, a default value,
22
22
// and a description...
23
- TF_DEFINE_ENV_SETTING (HDEMBREE_SAMPLES_TO_CONVERGENCE, 100 ,
24
- " Samples per pixel before we stop rendering (must be >= 1)" );
23
+ TF_DEFINE_ENV_SETTING (
24
+ HDEMBREE_SAMPLES_TO_CONVERGENCE,
25
+ HdEmbreeDefaultSamplesToConvergence,
26
+ " Samples per pixel before we stop rendering (must be >= 1)" );
25
27
26
- TF_DEFINE_ENV_SETTING (HDEMBREE_TILE_SIZE, 8 ,
27
- " Size (per axis) of threading work units (must be >= 1)" );
28
+ TF_DEFINE_ENV_SETTING (
29
+ HDEMBREE_TILE_SIZE,
30
+ HdEmbreeDefaultTileSize,
31
+ " Size (per axis) of threading work units (must be >= 1)" );
28
32
29
- TF_DEFINE_ENV_SETTING (HDEMBREE_AMBIENT_OCCLUSION_SAMPLES, 16 ,
30
- " Ambient occlusion samples per camera ray (must be >= 0; a value of 0 disables ambient occlusion)" );
33
+ TF_DEFINE_ENV_SETTING (
34
+ HDEMBREE_AMBIENT_OCCLUSION_SAMPLES,
35
+ HdEmbreeDefaultAmbientOcclusionSamples,
36
+ " Ambient occlusion samples per camera ray (must be >= 0;"
37
+ " a value of 0 disables ambient occlusion)" );
31
38
32
- TF_DEFINE_ENV_SETTING (HDEMBREE_JITTER_CAMERA, 1 ,
33
- " Should HdEmbree jitter camera rays while rendering? (values >0 are true)" );
39
+ TF_DEFINE_ENV_SETTING (
40
+ HDEMBREE_JITTER_CAMERA,
41
+ HdEmbreeDefaultJitterCamera,
42
+ " Should HdEmbree jitter camera rays while rendering?" );
34
43
35
- TF_DEFINE_ENV_SETTING (HDEMBREE_USE_FACE_COLORS, 1 ,
36
- " Should HdEmbree use face colors while rendering? (values > 0 are true)" );
44
+ TF_DEFINE_ENV_SETTING (
45
+ HDEMBREE_USE_FACE_COLORS,
46
+ HdEmbreeDefaultUseFaceColors,
47
+ " Should HdEmbree use face colors while rendering?" );
37
48
38
- TF_DEFINE_ENV_SETTING (HDEMBREE_CAMERA_LIGHT_INTENSITY, 300 ,
39
- " Intensity of the camera light, specified as a percentage of <1,1,1>." );
49
+ TF_DEFINE_ENV_SETTING (
50
+ HDEMBREE_CAMERA_LIGHT_INTENSITY,
51
+ HdEmbreeDefaultCameraLightIntensity,
52
+ " Intensity of the camera light, specified as a percentage of <1,1,1>." );
40
53
41
- TF_DEFINE_ENV_SETTING (HDEMBREE_PRINT_CONFIGURATION, 0 ,
42
- " Should HdEmbree print configuration on startup? (values > 0 are true)" );
54
+ TF_DEFINE_ENV_SETTING (
55
+ HDEMBREE_RANDOM_NUMBER_SEED,
56
+ HdEmbreeDefaultRandomNumberSeed,
57
+ " Seed to give to the random number generator. A value of anything other"
58
+ " than -1, combined with setting PXR_WORK_THREAD_LIMIT=1, should"
59
+ " give deterministic / repeatable results. A value of -1 (the"
60
+ " default) will allow the implementation to set a value that varies"
61
+ " from invocation to invocation and thread to thread." );
62
+
63
+ TF_DEFINE_ENV_SETTING (HDEMBREE_PRINT_CONFIGURATION,
64
+ false ,
65
+ " Should HdEmbree print configuration on startup?" );
43
66
44
67
HdEmbreeConfig::HdEmbreeConfig ()
45
68
{
@@ -50,12 +73,13 @@ HdEmbreeConfig::HdEmbreeConfig()
50
73
TfGetEnvSetting (HDEMBREE_TILE_SIZE));
51
74
ambientOcclusionSamples = std::max (0 ,
52
75
TfGetEnvSetting (HDEMBREE_AMBIENT_OCCLUSION_SAMPLES));
53
- jitterCamera = (TfGetEnvSetting (HDEMBREE_JITTER_CAMERA) > 0 );
54
- useFaceColors = (TfGetEnvSetting (HDEMBREE_USE_FACE_COLORS) > 0 );
76
+ jitterCamera = (TfGetEnvSetting (HDEMBREE_JITTER_CAMERA));
77
+ useFaceColors = (TfGetEnvSetting (HDEMBREE_USE_FACE_COLORS));
55
78
cameraLightIntensity = (std::max (100 ,
56
79
TfGetEnvSetting (HDEMBREE_CAMERA_LIGHT_INTENSITY)) / 100 .0f );
80
+ randomNumberSeed = TfGetEnvSetting (HDEMBREE_RANDOM_NUMBER_SEED);
57
81
58
- if (TfGetEnvSetting (HDEMBREE_PRINT_CONFIGURATION) > 0 ) {
82
+ if (TfGetEnvSetting (HDEMBREE_PRINT_CONFIGURATION)) {
59
83
std::cout
60
84
<< " HdEmbree Configuration: \n "
61
85
<< " samplesToConvergence = "
@@ -70,6 +94,8 @@ HdEmbreeConfig::HdEmbreeConfig()
70
94
<< useFaceColors << " \n "
71
95
<< " cameraLightIntensity = "
72
96
<< cameraLightIntensity << " \n "
97
+ << " randomNumberSeed = "
98
+ << randomNumberSeed << " \n "
73
99
;
74
100
}
75
101
}
0 commit comments