Extract 4 duplicated magic numbers to Constants.h:
-
BT.709 luminance (0.2126f, 0.7152f, 0.0722f) → kLuminanceR/kLuminanceG/kLuminanceB
CUDARenderer.cuh:348
CPUBackend.cpp:296
PathTracer.ispc:377
-
ONB threshold 0.9999f → kONBThreshold
PathTracerCore.h:102
CUDARenderer.cuh:97
PathTracer.ispc:103
-
MB conversion 1024*1024 → kBytesPerMB
CUDARenderer.cu:162,216
OptiXDenoiser.cpp:144
-
BVH stack depth 64 → kBVHMaxStackDepth
BVH.h:107
CUDARenderer.cuh:208
PathTracer.ispc:166
Note
ISPC cannot include C++ headers, so PathTracer.ispc keeps its own static const float equivalents — but should use the same recognizable names.
Extract 4 duplicated magic numbers to
Constants.h:BT.709 luminance
(0.2126f, 0.7152f, 0.0722f)→kLuminanceR/kLuminanceG/kLuminanceBCUDARenderer.cuh:348CPUBackend.cpp:296PathTracer.ispc:377ONB threshold
0.9999f→kONBThresholdPathTracerCore.h:102CUDARenderer.cuh:97PathTracer.ispc:103MB conversion
1024*1024→kBytesPerMBCUDARenderer.cu:162,216OptiXDenoiser.cpp:144BVH stack depth
64→kBVHMaxStackDepthBVH.h:107CUDARenderer.cuh:208PathTracer.ispc:166Note
ISPC cannot include C++ headers, so
PathTracer.ispckeeps its ownstatic const floatequivalents — but should use the same recognizable names.