31 enum class EnvMapType { ENVMAP_PFM, ENVMAP_CUBE, ENVMAP_LATLON };
90 void saveShProjection(
const std::string& filename );
103 const Ra::Core::Matrix4& getShMatrix(
int channel );
115 inline void setSkybox(
bool state ) { m_isSkyBox = state; }
121 void setStrength(
float s );
127 float getStrength()
const;
132 inline bool isSkybox()
const {
return m_isSkyBox; }
149 void initializeTexture();
152 void setupTexturesFromPfm();
154 void setupTexturesFromCube();
156 void setupTexturesFromSphericalEquiRectangular();
160 void computeSHMatrices();
168 void updateCoeffs(
float* hdr,
float x,
float y,
float z,
float domega );
169 float* getPixel(
float x,
float y,
float z );
178 size_t m_width { 0 };
179 size_t m_height { 0 };
180 float m_shcoefs[9][3];
181 Ra::Core::Matrix4 m_shMatrices[3];
184 bool m_isSkyBox {
false };
190 float m_environmentStrength { 1 };
193 bool m_glReady {
false };
Defines a spherical, infinite light sources and, optionally, sky boxes. An operator to convert an Env...
void setSkybox(bool state)
Set the state of the skybox.
const std::string & getImageName() const
Get the name used to construct the environment texture.
~EnvironmentTexture()=default
destructor
EnvMapType
Environment map type inferred from file names and format. Supported environment type.
EnvMapType getImageType() const
Get the type of the environment texture.
Represent a Texture of the engine.