32 enum class EnvMapType { ENVMAP_PFM, ENVMAP_CUBE, ENVMAP_LATLON };
91 void saveShProjection(
const std::string& filename );
104 const Ra::Core::Matrix4& getShMatrix(
int channel );
116 inline void setSkybox(
bool state ) { m_isSkyBox = state; }
122 void setStrength(
float s );
128 float getStrength()
const;
133 inline bool isSkybox()
const {
return m_isSkyBox; }
150 void initializeTexture();
153 void setupTexturesFromPfm();
155 void setupTexturesFromCube();
157 void setupTexturesFromSphericalEquiRectangular();
161 void computeSHMatrices();
169 void updateCoeffs(
float* hdr,
float x,
float y,
float z,
float domega );
170 float* getPixel(
float x,
float y,
float z );
179 size_t m_width { 0 };
180 size_t m_height { 0 };
181 float m_shcoefs[9][3];
182 Ra::Core::Matrix4 m_shMatrices[3];
185 bool m_isSkyBox {
false };
191 float m_environmentStrength { 1 };
194 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.