23 :
SLScene(
"Image Based Lighting Test Scene")
25 info(
"Image-based lighting from skybox using high dynamic range images. "
26 "It uses the Cook-Torrance reflection model also to calculate the "
27 "ambient light part from the surrounding HDR skybox.");
39 "Desert-Z1024_C.jpg");
48 "FBX/Teapot/Teapot.fbx");
51 "FBX/Suzanne/Suzanne.fbx");
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
SLVec4< SLfloat > SLCol4f
static SLstring modelPath
Path to 3D models.
static SLstring shaderPath
Path to GLSL shader programs.
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
AppDemoSceneShaderSkybox()
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
void addProgramToLoad(SLGLProgram *&program, const SLstring &vertShaderFile, const SLstring &fragShaderFile)
Add generic GLSL program with shader files to load.
void addSkyboxToLoad(SLSkybox *&skybox, const SLstring &path, SLVec2i resolution, SLstring name)
Add skybox with HDR texture to load.
void addNodeToLoad(SLNode *&node, const SLstring &modelPath, SLSkybox *skybox=nullptr, SLbool deleteTexImgAfterBuild=false, SLbool loadMeshesOnly=true, SLMaterial *overrideMat=nullptr, float ambientFactor=0.5f, SLbool forceCookTorranceRM=false, SLuint flags=SLProcess_Triangulate|SLProcess_JoinIdenticalVertices|SLProcess_RemoveRedundantMaterials|SLProcess_FindDegenerates|SLProcess_FindInvalidData|SLProcess_SplitLargeMeshes)
Add mesh from file to load via assimp loader.
Toplevel holder of the assets meshes, materials, textures and shaders.
Active or visible camera node class.
SLLightDirect class for a directional light source.
void ambientColor(const SLCol4f &ambi)
void attenuation(const SLfloat kConstant, const SLfloat kLinear, const SLfloat kQuadratic)
Defines a standard CG material with textures and a shader program.
void translucency(SLfloat transl)
void addTexture(SLGLTexture *texture)
Adds the passed texture to the equivalent texture type vector.
void transmissive(const SLCol4f &transm)
void program(SLGLProgram *sp)
SLNode represents a node in a hierarchical scene graph.
void addChild(SLNode *child)
void translation(const SLVec3f &pos, SLTransformSpace relativeTo=TS_parent)
T * findChild(const SLstring &name="", SLbool findRecursive=true)
void setMeshMat(SLMaterial *mat, bool recursive)
Set the mesh material recursively.
void lookAt(SLfloat targetX, SLfloat targetY, SLfloat targetZ, SLfloat upX=0, SLfloat upY=1, SLfloat upZ=0, SLTransformSpace relativeTo=TS_world)
void translate(const SLVec3f &vec, SLTransformSpace relativeTo=TS_object)
The SLScene class represents the top level instance holding the scene structure.
SceneView class represents a dynamic real time 3D view onto the scene.
void camera(SLCamera *camera)
void doWaitOnIdle(SLbool doWI)
SLGLTexture * environmentCubemap()
SLSphere creates a sphere mesh based on SLSpheric w. 180 deg polar angle.