23 for (
int y = 0; y < values.
size().y; ++y) {
24 for (
int x = 0; x < values.
size().x; ++x) {
37 inline float map(
const float x)
const {
38 return 1.f / factor * log(1.f + factor * x);
59 for (
int y = 0; y < values.
size().y; ++y) {
60 for (
int x = 0; x < values.
size().x; ++x) {
62 colormapped[
Pixel(x, y)] =
63 Rgba(filmic(color.
r()), filmic(color.
g()), filmic(color.
b()), color.
a());
82 for (
int y = 0; y < values.
size().y; ++y) {
83 for (
int x = 0; x < values.
size().x; ++x) {
85 const Rgba accumulatedColor = (pass[p] + values[p] * passCnt) / (passCnt + 1);
86 values[p] = accumulatedColor.
over(values[p]);
93 values = std::move(pass);
#define SPH_ASSERT(x,...)
Wrapper of wxBitmap, will be possibly replaced by custom implementation.
uint32_t Size
Integral type used to index arrays (by default).
#define NAMESPACE_SPH_END
void resize(const Pixel newResolution, const Type &value)
virtual Bitmap< Rgba > map(const Bitmap< Rgba > &values) const override
Using http://filmicworlds.com/blog/filmic-tonemapping-with-piecewise-power-curves/.
void create(const UserParams &userParams)
const Bitmap< Rgba > & getBitmap() const
void accumulate(const Bitmap< Rgba > &pass)
FrameBuffer(const Pixel resolution)
virtual Bitmap< Rgba > map(const Bitmap< Rgba > &values) const =0
void setFactor(const float newFactor)
virtual Bitmap< Rgba > map(const Bitmap< Rgba > &values) const override
LogarithmicColorMap(const float factor)
static Rgba transparent()
Rgba over(const Rgba &other) const
Blends two colors together using "over" operation.
Object with deleted copy constructor and copy operator.
Base class for all polymorphic objects.