SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLSkybox Class Reference

Skybox node class with a SLBox mesh. More...

#include <SLSkybox.h>

Inheritance diagram for SLSkybox:
[legend]

Public Member Functions

 SLSkybox (SLAssetManager *assetMgr, SLstring shaderPath, SLstring cubeMapXPos, SLstring cubeMapXNeg, SLstring cubeMapYPos, SLstring cubeMapYNeg, SLstring cubeMapZPos, SLstring cubeMapZNeg, SLstring name="Default Skybox")
 Construct a new SLSkybox::SLSkybox object with 6 images for all sides. More...
 
 SLSkybox (SLAssetManager *am, SLstring shaderPath, SLstring hdrImage, SLVec2i resolution, SLstring name="HDR Skybox")
 Constructor for a cube map skybox from a HDR Image. More...
 
 ~SLSkybox ()
 
SLGLTextureenvironmentCubemap ()
 
SLGLTextureirradianceCubemap ()
 
SLGLTextureroughnessCubemap ()
 
SLGLTexturebrdfLutTexture ()
 
SLfloat exposure ()
 
SLbool isHDR ()
 
void exposure (float exp)
 
void drawAroundCamera (SLSceneView *sv)
 Draw the skybox with a cube map with the camera in its center. More...
 
SLCol4f colorAtDir (const SLVec3f &dir)
 Returns the color in the skybox at the the specified direction dir. More...
 
- Public Member Functions inherited from SLNode
 SLNode (const SLstring &name="Node")
 Construct a new SLNode::SLNode object. More...
 
 SLNode (SLMesh *mesh, const SLstring &name="Node")
 
 SLNode (SLMesh *mesh, const SLVec3f &translation, const SLstring &name)
 
 ~SLNode () override
 
virtual void cull3DRec (SLSceneView *sv)
 
virtual void cullChildren3D (SLSceneView *sv)
 Initializer function to call SLNode::cull3DRec recursively. More...
 
virtual void cull2DRec (SLSceneView *sv)
 
virtual bool hitRec (SLRay *ray)
 
virtual void statsRec (SLNodeStats &stats)
 
virtual SLNodecopyRec ()
 
virtual SLAABBoxupdateAABBRec (SLbool updateAlsoAABBinOS)
 
virtual void dumpRec ()
 
void setDrawBitsRec (SLuint bit, SLbool state)
 
void setPrimitiveTypeRec (SLGLPrimitiveType primitiveType)
 
virtual void addMesh (SLMesh *mesh)
 
virtual void drawMesh (SLSceneView *sv)
 Draws the single mesh. More...
 
bool removeMesh ()
 Returns true if a mesh was assigned and set it to nullptr. More...
 
bool removeMesh (SLMesh *mesh)
 Returns true if the passed mesh was assigned and sets it to nullptr. More...
 
SLint numChildren ()
 
void addChild (SLNode *child)
 
bool insertChild (SLNode *insertC, SLNode *afterC)
 
void deleteChildren ()
 
bool deleteChild ()
 
bool deleteChild (SLNode *child)
 
bool deleteChild (const SLstring &name)
 
bool removeChild (SLNode *child)
 remove child from vector of children. Removes false if not found, else true. More...
 
template<typename T >
T * find (const SLstring &name="", SLbool findRecursive=true)
 
template<typename T >
T * findChild (const SLstring &name="", SLbool findRecursive=true)
 
template<typename T >
deque< T * > findChildren (const SLstring &name="", SLbool findRecursive=true, SLbool canContain=false)
 
deque< SLNode * > findChildren (const SLMesh *mesh, SLbool findRecursive=true)
 
deque< SLNode * > findChildren (SLuint drawbit, SLbool findRecursive=true)
 
SLVec3f translationOS () const
 
SLVec3f forwardOS () const
 
SLVec3f rightOS () const
 
SLVec3f upOS () const
 
SLVec3f axisXOS () const
 
SLVec3f axisYOS () const
 
SLVec3f axisZOS () const
 
SLVec3f translationWS () const
 
SLVec3f forwardWS () const
 
SLVec3f rightWS () const
 
SLVec3f upWS () const
 
SLVec3f axisXWS () const
 
SLVec3f axisYWS () const
 
SLVec3f axisZWS () const
 
void translation (const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
 
void translation (SLfloat x, SLfloat y, SLfloat z, SLTransformSpace relativeTo=TS_parent)
 
void rotation (const SLQuat4f &rot, SLTransformSpace relativeTo=TS_parent)
 
void rotation (SLfloat angleDeg, const SLVec3f &axis, SLTransformSpace relativeTo=TS_parent)
 
void scaling (SLfloat s)
 
void scaling (SLfloat x, SLfloat y, SLfloat z)
 
void scaling (const SLVec3f &scaling)
 
void lookAt (SLfloat targetX, SLfloat targetY, SLfloat targetZ, SLfloat upX=0, SLfloat upY=1, SLfloat upZ=0, SLTransformSpace relativeTo=TS_world)
 
void lookAt (const SLVec3f &target, const SLVec3f &up=SLVec3f::AXISY, SLTransformSpace relativeTo=TS_world)
 
void translate (const SLVec3f &vec, SLTransformSpace relativeTo=TS_object)
 
void translate (SLfloat x, SLfloat y, SLfloat z, SLTransformSpace relativeTo=TS_object)
 
void rotate (const SLQuat4f &rot, SLTransformSpace relativeTo=TS_object)
 
void rotate (SLfloat angleDeg, const SLVec3f &axis, SLTransformSpace relativeTo=TS_object)
 
void rotate (SLfloat angleDeg, SLfloat x, SLfloat y, SLfloat z, SLTransformSpace relativeTo=TS_object)
 
void rotateAround (const SLVec3f &point, SLVec3f &axis, SLfloat angleDeg, SLTransformSpace relativeTo=TS_world)
 
void scale (SLfloat s)
 
void scale (SLfloat x, SLfloat y, SLfloat z)
 
void scale (const SLVec3f &scale)
 
void scaleToCenter (SLfloat maxDim)
 
void setInitialState ()
 
void resetToInitialState ()
 
void parent (SLNode *p)
 
void entityID (SLint entityID)
 
void om (const SLMat4f &mat)
 
void animation (SLAnimation *a)
 
void castsShadows (SLbool castsShadows)
 
virtual void needUpdate ()
 
void needWMUpdate ()
 
void needAABBUpdate ()
 
void isSelected (bool isSelected)
 
void minLodCoverage (SLfloat minLodCoverage)
 
void levelForSM (SLubyte lfsm)
 
void onUpdateCB (function< void()> callbackFunc)
 
SLNodeparent ()
 
SLint depth () const
 
SLint entityID () const
 
const SLMat4fom ()
 
const SLMat4finitialOM ()
 
const SLMat4fupdateAndGetWM () const
 
const SLMat4fupdateAndGetWMI () const
 
SLDrawBitsdrawBits ()
 
SLbool drawBit (SLuint bit)
 
SLAABBoxaabb ()
 
SLAnimationanimation ()
 
SLbool castsShadows ()
 
SLMeshmesh ()
 
SLVNodechildren ()
 
const SLAnimSkeletonskeleton ()
 Returns the first skeleton found in the meshes. More...
 
void updateRec ()
 
virtual void doUpdate ()
 
bool updateMeshSkins (bool forceCPUSkinning, const std::function< void(SLMesh *)> &cbInformNodes)
 Update all skinned meshes recursively. More...
 
void updateMeshAccelStructs ()
 
void updateMeshMat (std::function< void(SLMaterial *m)> setMat, bool recursive)
 Updates the mesh material recursively with a material lambda. More...
 
void setMeshMat (SLMaterial *mat, bool recursive)
 Set the mesh material recursively. More...
 
bool isSelected ()
 
SLfloat minLodCoverage ()
 
SLubyte levelForSM ()
 
- Public Member Functions inherited from SLObject
 SLObject (const SLstring &Name="", const SLstring &url="")
 
virtual ~SLObject ()
 
void name (const SLstring &Name)
 
void url (const SLstring &url)
 
const SLstringname () const
 
const SLstringurl () const
 
- Public Member Functions inherited from SLEventHandler
 SLEventHandler ()
 
virtual ~SLEventHandler ()
 
virtual SLbool onMouseDown (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod)
 
virtual SLbool onMouseUp (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod)
 
virtual SLbool onMouseMove (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod)
 
virtual SLbool onDoubleClick (const SLMouseButton button, const SLint x, const SLint y, const SLKey mod)
 
virtual SLbool onMouseWheel (const SLint delta, const SLKey mod)
 
virtual SLbool onTouch2Down (const SLint x1, const SLint y1, const SLint x2, const SLint y2)
 
virtual SLbool onTouch2Move (const SLint x1, const SLint y1, const SLint x2, const SLint y2)
 
virtual SLbool onTouch2Up (const SLint x1, const SLint y1, const SLint x2, const SLint y2)
 
virtual SLbool onTouch3Down (const SLint x1, const SLint y1)
 
virtual SLbool onTouch3Move (const SLint x1, const SLint y1)
 
virtual SLbool onTouch3Up (const SLint x1, const SLint y1)
 
virtual SLbool onKeyPress (const SLKey key, const SLKey mod)
 
virtual SLbool onKeyRelease (const SLKey key, const SLKey mod)
 
virtual SLbool onRotationPYR (const SLfloat pitchRAD, const SLfloat yawRAD, const SLfloat rollRAD)
 
void mouseRotationFactor (SLfloat rf)
 
SLfloat mouseRotationFactor ()
 

Private Member Functions

void build ()
 Builds all texture for HDR image based lighting. More...
 

Private Attributes

SLGLTexture_environmentCubemap
 
SLGLTexture_irradianceCubemap
 
SLGLTexture_roughnessCubemap
 
SLGLTexture_brdfLutTexture
 
SLGLTexture_hdrTexture
 
SLfloat _exposure
 
SLbool _isHDR
 flag for HDR skyboxes More...
 
SLbool _isBuilt
 flag for late HDR skybox building More...
 

Additional Inherited Members

- Static Public Attributes inherited from SLNode
static SLuint numWMUpdates = 0
 NO. of calls to updateWMRec per frame. More...
 
static unsigned int instanceIndex = 0
 ??? More...
 
- Protected Attributes inherited from SLNode
SLNode_parent
 pointer to the parent node More...
 
SLVNode _children
 vector of children nodes More...
 
SLMesh_mesh
 pointer to a single mesh More...
 
SLint _depth
 depth of the node in a scene tree More...
 
SLint _entityID
 ID in the SLVEntity graph for Data Oriented Design. More...
 
SLMat4f _om
 object matrix for local transforms More...
 
SLMat4f _initialOM
 the initial om state More...
 
SLMat4f _wm
 world matrix for world transform More...
 
SLMat4f _wmI
 inverse world matrix More...
 
SLbool _isWMUpToDate
 is the WM of this node still valid More...
 
SLbool _isWMIUpToDate
 is the inverse WM of this node still valid More...
 
SLbool _isAABBUpToDate
 is the saved aabb still valid More...
 
bool _castsShadows
 flag if meshes of node should cast shadows More...
 
bool _isSelected
 flag if node and one or more of its meshes are selected More...
 
SLDrawBits _drawBits
 node level drawing flags More...
 
SLAABBox _aabb
 axis aligned bounding box More...
 
SLAnimation_animation
 animation of the node More...
 
SLfloat _minLodCoverage
 Min. LOD coverage for visibility (0.0 < _minLodCoverage < 1.0) More...
 
SLubyte _levelForSM
 Level of LOD to use for shadow mapping (0 = the visible one will be drawn) More...
 
function< void()> _onUpdateCB
 Optional lambda callback once per update. More...
 
- Protected Attributes inherited from SLObject
SLstring _name
 name of an object More...
 
SLstring _url
 uniform resource locator More...
 
- Protected Attributes inherited from SLEventHandler
SLfloat _mouseRotationFactor
 Mouse rotation sensibility. More...
 
SLfloat _keyboardDeltaPos
 Delta dist. for keyboard translation. More...
 

Detailed Description

Skybox node class with a SLBox mesh.

The skybox instance is a node with a SLBox mesh with inwards pointing normals. It gets drawn in SLSceneView::draw3DGL with frozen depth buffer and a special cubemap shader. The box is always with the active camera in its center. It has to be created in SLScene::onLoad and assigned to the skybox pointer of SLSceneView. See the Skybox shader example.

Definition at line 28 of file SLSkybox.h.

Constructor & Destructor Documentation

◆ SLSkybox() [1/2]

SLSkybox::SLSkybox ( SLAssetManager assetMgr,
SLstring  shaderPath,
SLstring  cubeMapXPos,
SLstring  cubeMapXNeg,
SLstring  cubeMapYPos,
SLstring  cubeMapYNeg,
SLstring  cubeMapZPos,
SLstring  cubeMapZNeg,
SLstring  name = "Default Skybox" 
)

Construct a new SLSkybox::SLSkybox object with 6 images for all sides.

It is important that during instantiation NO OpenGL functions (gl*) get called because this constructor will be most probably called in a parallel thread from within a SLScene::assemble function. All objects that get rendered have to do their OpenGL initialization when they are used the first time during rendering in the main thread.

Parameters
assetMgrAsset manager that will own the skybox mesh
shaderPathPath to the shader files
cubeMapXPosTexture image file for the positive X side
cubeMapXNegTexture image file for the negative X side
cubeMapYPosTexture image file for the positive Y side
cubeMapYNegTexture image file for the negative Y side
cubeMapZPosTexture image file for the positive Z side
cubeMapZNegTexture image file for the negative Z side
nameName of the skybox

Definition at line 37 of file SLSkybox.cpp.

45  : SLNode(name)
46 {
47  assert(assetMgr &&
48  "SLSkybox: asset manager is currently mandatory for sky-boxes! "
49  "Alternatively the live-time of the box has to be managed in the sky-box!");
50 
51  // Set HDR flag to false, this is a normal SkyBox
52  _isHDR = false;
53  _isBuilt = true;
54  _environmentCubemap = nullptr;
55  _irradianceCubemap = nullptr;
56  _roughnessCubemap = nullptr;
57  _brdfLutTexture = nullptr;
58  _hdrTexture = nullptr;
59  _exposure = 1.0f;
60 
61  // Create texture, material and program
62  _environmentCubemap = new SLGLTexture(assetMgr,
63  cubeMapXPos,
64  cubeMapXNeg,
65  cubeMapYPos,
66  cubeMapYNeg,
67  cubeMapZPos,
68  cubeMapZNeg);
69 
70  SLMaterial* matCubeMap = new SLMaterial(assetMgr, "matCubeMap");
71  matCubeMap->addTexture(_environmentCubemap);
72 
73  SLGLProgram* sp = new SLGLProgramGeneric(assetMgr,
74  shaderPath + "SkyBox.vert",
75  shaderPath + "SkyBox.frag");
76  matCubeMap->program(sp);
77 
78  // Create a box with max. point at min. parameter and vice versa.
79  // Like this the boxes normals will point to the inside.
80  addMesh(new SLBox(assetMgr,
81  10,
82  10,
83  10,
84  -10,
85  -10,
86  -10,
87  "box",
88  matCubeMap));
89 }
Axis aligned box mesh.
Definition: SLBox.h:31
Generic Shader Program class inherited from SLGLProgram.
Encapsulation of an OpenGL shader program object.
Definition: SLGLProgram.h:56
Texture object for OpenGL texturing.
Definition: SLGLTexture.h:110
Defines a standard CG material with textures and a shader program.
Definition: SLMaterial.h:56
void addTexture(SLGLTexture *texture)
Adds the passed texture to the equivalent texture type vector.
Definition: SLMaterial.cpp:348
void program(SLGLProgram *sp)
Definition: SLMaterial.h:205
virtual void addMesh(SLMesh *mesh)
Definition: SLNode.cpp:157
SLNode(const SLstring &name="Node")
Construct a new SLNode::SLNode object.
Definition: SLNode.cpp:40
const SLstring & name() const
Definition: SLObject.h:38
SLGLTexture * _environmentCubemap
Definition: SLSkybox.h:65
SLGLTexture * _hdrTexture
Definition: SLSkybox.h:69
SLGLTexture * _irradianceCubemap
Definition: SLSkybox.h:66
SLbool _isHDR
flag for HDR skyboxes
Definition: SLSkybox.h:71
SLGLTexture * _roughnessCubemap
Definition: SLSkybox.h:67
SLGLTexture * _brdfLutTexture
Definition: SLSkybox.h:68
SLbool _isBuilt
flag for late HDR skybox building
Definition: SLSkybox.h:72
SLfloat _exposure
Definition: SLSkybox.h:70

◆ SLSkybox() [2/2]

SLSkybox::SLSkybox ( SLAssetManager am,
SLstring  shaderPath,
SLstring  hdrImage,
SLVec2i  resolution,
SLstring  name = "HDR Skybox" 
)

Constructor for a cube map skybox from a HDR Image.

This constructor generates a cube map skybox from a HDR Image and also all the textures needed for image based lighting and store them in the textures of the material of this sky box.

Construct a new SLSkybox::SLSkybox object with an HDR image

This constructor generates a cube map skybox from a HDR Image and also all the textures needed for image based lighting and store them in the textures of the material of this sky box.

Remarks
It is important that during instantiation NO OpenGL functions (gl*) get called because this constructor will be most probably called in a parallel thread from within an SLScene::registerAssetsToLoad or SLScene::assemble function. All objects that get rendered have to do their OpenGL initialization when they are used the first time during rendering in the main thread.
Parameters
assetMgrAsset manager that will own the skybox mesh
shaderPathPath to the shader files
hdrImageHDR texture image file
resolutionResolution of the texture objects for image based lighting
nameName of the skybox

Definition at line 113 of file SLSkybox.cpp.

117  : SLNode(name)
118 {
119  // Set HDR flag to true, this is a HDR SkyBox
120  _isHDR = true;
121  _isBuilt = false;
122  _exposure = 1.0f;
123 
124  // Create shader program for the background
125  SLGLProgram* backgroundShader = new SLGLProgramGeneric(am,
126  shaderPath + "PBR_SkyboxHDR.vert",
127  shaderPath + "PBR_SkyboxHDR.frag");
128 
129  // The HDR texture is only used to create the environment,
130  // the irradiance and the roughness cubemaps
131  _hdrTexture = new SLGLTexture(am,
132  hdrImage,
133  GL_LINEAR,
134  GL_LINEAR,
135  TT_hdr,
136  GL_CLAMP_TO_EDGE,
137  GL_CLAMP_TO_EDGE);
138 
139  // The environment cubemap is used for the rendering of the skybox
141  shaderPath,
142  _hdrTexture,
143  resolution,
145  GL_TEXTURE_CUBE_MAP,
146  true, // read back environment for ray tracing
147  GL_LINEAR_MIPMAP_LINEAR);
148 
149  // The irradiance cubemap is used for the ambient indirect light of PBR materials
151  shaderPath,
153  SLVec2i(32, 32),
155  GL_TEXTURE_CUBE_MAP);
156 
157  // The roughness cubemap is used for the blurred reflections on PBR materials
159  shaderPath,
161  SLVec2i(128, 128),
163  GL_TEXTURE_CUBE_MAP);
164 
165  // The BRDF lookup texture is used for the specular gloss reflection calculation
167  shaderPath,
168  nullptr,
169  SLVec2i(512, 512),
170  TT_brdfLUT,
171  GL_TEXTURE_2D);
172 
173  // Create the material of the sky box and store there the other texture to be used for other materials
174  SLMaterial* envMaterial = new SLMaterial(am, "matCubeMap");
175  envMaterial->addTexture(_environmentCubemap);
176  envMaterial->program(backgroundShader);
177  envMaterial->skybox(this);
178 
179  // Create the box for the sky box
180  addMesh(new SLBox(am,
181  10,
182  10,
183  10,
184  -10,
185  -10,
186  -10,
187  "box",
188  envMaterial));
189 }
@ TT_brdfLUT
Definition: SLGLTexture.h:93
@ TT_irradianceCubemap
Definition: SLGLTexture.h:91
@ TT_environmentCubemap
Definition: SLGLTexture.h:90
@ TT_roughnessCubemap
Definition: SLGLTexture.h:92
@ TT_hdr
Definition: SLGLTexture.h:89
SLVec2< SLint > SLVec2i
Definition: SLVec2.h:140
Texture object generated in run time from another texture.
void skybox(SLSkybox *sb)
Definition: SLMaterial.h:207

◆ ~SLSkybox()

SLSkybox::~SLSkybox ( )
inline

Definition at line 47 of file SLSkybox.h.

47 { ; }

Member Function Documentation

◆ brdfLutTexture()

SLGLTexture* SLSkybox::brdfLutTexture ( )
inline

Definition at line 53 of file SLSkybox.h.

53 { return _brdfLutTexture; }

◆ build()

void SLSkybox::build ( )
private

Builds all texture for HDR image based lighting.

Definition at line 193 of file SLSkybox.cpp.

194 {
195  _hdrTexture->build(0);
200  _isBuilt = true;
201 }
virtual void build(SLint texUnit)

◆ colorAtDir()

SLCol4f SLSkybox::colorAtDir ( const SLVec3f dir)

Returns the color in the skybox at the the specified direction dir.

Definition at line 237 of file SLSkybox.cpp.

238 {
239  if (_mesh && _mesh->mat())
240  {
241  SLMaterial* mat = _mesh->mat();
242 
243  if (!mat->textures(TT_diffuse).empty())
244  {
245  if (mat->textures(TT_diffuse)[0]->images().size() == 6)
246  {
247  SLGLTexture* tex = mat->textures(TT_diffuse)[0];
248  return tex->getTexelf(dir);
249  }
250  }
251 
252  if (!mat->textures(TT_environmentCubemap).empty())
253  {
254  if (mat->textures(TT_environmentCubemap)[0]->images().size() == 6)
255  {
257  return tex->getTexelf(dir);
258  }
259  }
260  }
261 
262  return SLCol4f::BLACK;
263 }
@ TT_diffuse
Definition: SLGLTexture.h:78
SLCol4f getTexelf(SLfloat u, SLfloat v, SLuint imgIndex=0)
SLGLTexture::getTexelf returns a pixel color from u & v texture coordinates.
SLVGLTexture & textures(SLTextureType type)
Definition: SLMaterial.h:233
SLMaterial * mat() const
Definition: SLMesh.h:177
SLMesh * _mesh
pointer to a single mesh
Definition: SLNode.h:346
static SLVec4 BLACK
Definition: SLVec4.h:213

◆ drawAroundCamera()

void SLSkybox::drawAroundCamera ( SLSceneView sv)

Draw the skybox with a cube map with the camera in its center.

Definition at line 204 of file SLSkybox.cpp.

205 {
206  assert(sv && "No SceneView passed to SLSkybox::drawAroundCamera");
207 
208  SLGLState* stateGL = SLGLState::instance();
209 
210  if (_isHDR && !_isBuilt)
211  build();
212 
213  // Put skybox at the cameras position
214  translation(sv->camera()->translationWS());
215 
216  // Apply world transform
217  stateGL->modelMatrix = updateAndGetWM();
218 
219  // Freeze depth buffer
220  stateGL->depthMask(false);
221 
222  // Change depth buffer comparisons for HDR SkyBoxes
223  if (_isHDR)
224  stateGL->depthFunc(GL_LEQUAL);
225 
226  // Draw the box
227  drawMesh(sv);
228 
229  // Change back the depth buffer comparisons
230  stateGL->depthFunc(GL_LESS);
231 
232  // Unlock depth buffer
233  stateGL->depthMask(true);
234 }
Singleton class holding all OpenGL states.
Definition: SLGLState.h:71
SLMat4f modelMatrix
Init all states.
Definition: SLGLState.h:89
void depthMask(SLbool state)
Definition: SLGLState.cpp:190
static SLGLState * instance()
Public static instance getter for singleton pattern.
Definition: SLGLState.h:74
void depthFunc(SLenum func)
Definition: SLGLState.cpp:205
virtual void drawMesh(SLSceneView *sv)
Draws the single mesh.
Definition: SLNode.cpp:176
void translation(const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
Definition: SLNode.cpp:828
const SLMat4f & updateAndGetWM() const
Definition: SLNode.cpp:703
SceneView class represents a dynamic real time 3D view onto the scene.
Definition: SLSceneView.h:69
void camera(SLCamera *camera)
Definition: SLSceneView.h:145
void build()
Builds all texture for HDR image based lighting.
Definition: SLSkybox.cpp:193

◆ environmentCubemap()

SLGLTexture* SLSkybox::environmentCubemap ( )
inline

Definition at line 50 of file SLSkybox.h.

50 { return _environmentCubemap; }

◆ exposure() [1/2]

SLfloat SLSkybox::exposure ( )
inline

Definition at line 54 of file SLSkybox.h.

54 { return _exposure; }

◆ exposure() [2/2]

void SLSkybox::exposure ( float  exp)
inline

Definition at line 58 of file SLSkybox.h.

58 { _exposure = exp; }

◆ irradianceCubemap()

SLGLTexture* SLSkybox::irradianceCubemap ( )
inline

Definition at line 51 of file SLSkybox.h.

51 { return _irradianceCubemap; }

◆ isHDR()

SLbool SLSkybox::isHDR ( )
inline

Definition at line 55 of file SLSkybox.h.

55 { return _isHDR; }

◆ roughnessCubemap()

SLGLTexture* SLSkybox::roughnessCubemap ( )
inline

Definition at line 52 of file SLSkybox.h.

52 { return _roughnessCubemap; }

Member Data Documentation

◆ _brdfLutTexture

SLGLTexture* SLSkybox::_brdfLutTexture
private

Definition at line 68 of file SLSkybox.h.

◆ _environmentCubemap

SLGLTexture* SLSkybox::_environmentCubemap
private

Definition at line 65 of file SLSkybox.h.

◆ _exposure

SLfloat SLSkybox::_exposure
private

Definition at line 70 of file SLSkybox.h.

◆ _hdrTexture

SLGLTexture* SLSkybox::_hdrTexture
private

Definition at line 69 of file SLSkybox.h.

◆ _irradianceCubemap

SLGLTexture* SLSkybox::_irradianceCubemap
private

Definition at line 66 of file SLSkybox.h.

◆ _isBuilt

SLbool SLSkybox::_isBuilt
private

flag for late HDR skybox building

Definition at line 72 of file SLSkybox.h.

◆ _isHDR

SLbool SLSkybox::_isHDR
private

flag for HDR skyboxes

Definition at line 71 of file SLSkybox.h.

◆ _roughnessCubemap

SLGLTexture* SLSkybox::_roughnessCubemap
private

Definition at line 67 of file SLSkybox.h.


The documentation for this class was generated from the following files: