Remainder from hlsl PT and stuff moved out of bxdf unit test#980
Remainder from hlsl PT and stuff moved out of bxdf unit test#980keptsecret wants to merge 24 commits intomasterfrom
Conversation
…d change to compile time depth
| template<class F, typename float_t, uint32_t Depth=6> // F has function __call(x) | ||
| struct AdaptiveSimpson |
There was a problem hiding this comment.
Fshould be required to haveoperator()(x)not__call(this is one is meant for statics- make a concept for the above
float_tyou can default todecltype(declval<F>()(0))
There was a problem hiding this comment.
Also f should be NBL_ConST_REF_ARG and not NBL_REF_ARG (it doesn't make sense otherwise, you want there to be no inner mutable state because it can't be sensitive to order its getting called in)
There was a problem hiding this comment.
I agree but the function we pass into this calls bxdf.pdf() which is not const (and bxdf is a member we store instead of referencing in a lambda)
There was a problem hiding this comment.
the methods of a BxDF should most definitely be const
| template<class F, typename float_t, uint32_t Depth=6> // F has function __call(x) | ||
| struct AdaptiveSimpson | ||
| { | ||
| static float_t __call(NBL_REF_ARG(F) f, float_t x0, float_t x1, float_t eps = 1e-6) |
There was a problem hiding this comment.
documentation, what's eps used for ?
| static const float32_t3 RGB_LUT[256]; | ||
|
|
||
| static float32_t3 map(float x) | ||
| { | ||
| x = hlsl::clamp(x, 0.f, 1.f); | ||
| int i = int(x * 255.f); | ||
| int j = hlsl::min(255, i+1); | ||
| float s = x * 255.f - float(i); | ||
| return RGB_LUT[i] + (RGB_LUT[j] - RGB_LUT[i]) * s; | ||
| } | ||
| }; | ||
|
|
||
| inline const float32_t3 Turbo::RGB_LUT[256] = { |
There was a problem hiding this comment.
use the correct NBL_ macros for out of line constexpr array declarations and definitions
| { | ||
| static const float32_t3 RGB_LUT[256]; | ||
|
|
||
| static float32_t3 map(float x) |
…_path_tracing_stuff
|
|
No description provided.