Archived issue #0032754
Visualization, TKOpenGl - Phong shading model ignores environment cubemap
Description
Currently `Graphic3d_TypeOfShadingModel_Phong` implementation ignores environment cubemap set by `V3d_View::SetBackgroundCubeMap()`.
Although Phong shading wouldn't be able to implement a realistic environment as PBR renderer does, it could be still useful in some cases to map environment map as Ambient light source.
Note that Shader Manager already supports `Graphic3d_ShaderFlags_TextureEnv` but it's implementation relies on obsolete spherical panorama images, which are supposed to be removed by #0032753, and doesn't support color modulation - e.g. environment texture is just drawn solid on the object.
Although Phong shading wouldn't be able to implement a realistic environment as PBR renderer does, it could be still useful in some cases to map environment map as Ambient light source.
vec4 computeLighting (in vec3 theNormal,
in vec3 theView,
in vec4 thePoint)
{
//Ambient = occLightAmbient.rgb;
Ambient = occTextureCube (uTextureEnv, theNormal+ vec3 (1e-3, 2e-3, 3e-3)).rgb;
}
Note that Shader Manager already supports `Graphic3d_ShaderFlags_TextureEnv` but it's implementation relies on obsolete spherical panorama images, which are supposed to be removed by #0032753, and doesn't support color modulation - e.g. environment texture is just drawn solid on the object.
Public activity
No public notes
Participants are labeled by their role within this record.
Related records