Thaumaturge said:
reRenderedSourceImagePixel = smoothstep(min(0.9989, 0.999 * dt), 0.999, inputPixel);
hmmm… is that basically an exponential moving average with constant alpha?
Not sure (also about the correct term), but if so, you can get this much simpler, and probably more robust as well:
const float alpha = 0.02f;
newValue = previousValue * (1-alpha) + curentValue * alpha;
If values fluctuate over time, you get some stable average (hopefully). I guess that's what you have in mind, but then your code would be overcomplicated.
Calin said:
sidenote: I don`t think that`s too much relevant if it does not relate to the reason/problem why you`ve created this post (like it`s not related to what you`re currently trying to achieve ). You should focus on explaining the problem you`re trying to solve. If it bears relevance to the issue for which you`re seeking help than you should copy past that code in this thread.
If it's true that mentioning the shader wasn't relevant, then your comment isn't either ;P