LuxCoreRender / LuxCore

LuxCore source repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About VarianceClamping

JackKaiXing opened this issue · comments

commented

if some value are below low when MaxValue > high then the low boundary is not clamped. Is that OK, why?

static void ScaledClamp3(float value[3], const float low, const float high) {

commented

Besides, how to understand the variance concept used here, does it same as usually referred to in Statistics

if some value are below low when MaxValue > high then the low boundary is not clamped. Is that OK, why?

Not 100% sure to understand the question but yes, otherwise you loose the "color" of the the sample.

For instance, it the sample value is RGB(100, 0, 0) and low is 25 and high is 75, you want the clamped result to be RGB(75, 0, 0), not RGB(75, 25, 25). You want the sample to be still red (but not too bright).

I'm clamping the luminance of the sample (to avoid fireflies: too bright samples).

Besides, how to understand the variance concept used here, does it same as usually referred to in Statistics

Yes, this method effectively place an upper bound on the (statistical) variance of samples.