4#include "Core/Quantity/ColorSpace.h"
7#include <Common/assertion.h>
8#include <Common/primitive_type.h>
26 bool m_useSrgbStandard;
32 m_reciGamma(1.0_r / gamma), m_useSrgbStandard(true)
37 PH_ASSERT(out_dstFrame);
47 const math::Vector3R linearSrgb(srcPixel[0], srcPixel[1], srcPixel[2]);
48 const math::Vector3R srgb = ColorSpace::linear_sRGB_to_sRGB(linearSrgb);
60 std::pow(pixel[0], m_reciGamma),
61 std::pow(pixel[1], m_reciGamma),
62 std::pow(pixel[2], m_reciGamma));
71 m_useSrgbStandard = value;
Definition FrameOperator.h:9
Definition GammaCorrection.h:16
GammaCorrection(real gamma)
Definition GammaCorrection.h:31
void operate(const HdrRgbFrame &srcFrame, HdrRgbFrame *out_dstFrame) override
Definition GammaCorrection.h:35
void useSrgbStandard(bool value)
Definition GammaCorrection.h:69
void forEachPixel(PerPixelOperation op)
Iterate over all pixels in the frame in row-major order.
Definition TFrame.ipp:252
void setPixel(const math::TVector2< uint32 > &coordPx, const PixelType &pixel)
Definition TFrame.ipp:370
math::TVector2< uint32 > getSizePx() const
Definition TFrame.ipp:428
void setSize(uint32 wPx, uint32 hPx)
Definition TFrame.ipp:237
Definition TArithmeticArray.h:13
T & y()
Definition TVector3.ipp:189
T & z()
Definition TVector3.ipp:195
T & x()
Definition TVector3.ipp:183
The root for all renderer implementations.
Definition EEngineProject.h:6