Skip to content

Phase 16.1-16.3/16.8: Extract duplicated magic numbers to Constants.h #44

Description

@Cle2ment

Extract 4 duplicated magic numbers to Constants.h:

  1. BT.709 luminance (0.2126f, 0.7152f, 0.0722f)kLuminanceR/kLuminanceG/kLuminanceB

    • CUDARenderer.cuh:348
    • CPUBackend.cpp:296
    • PathTracer.ispc:377
  2. ONB threshold 0.9999fkONBThreshold

    • PathTracerCore.h:102
    • CUDARenderer.cuh:97
    • PathTracer.ispc:103
  3. MB conversion 1024*1024kBytesPerMB

    • CUDARenderer.cu:162,216
    • OptiXDenoiser.cpp:144
  4. BVH stack depth 64kBVHMaxStackDepth

    • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions