0032083: Visualization, TKOpenGl - PBR rendering is unavailable on Apple A12 Bionic...
authorkgv <kgv@opencascade.com>
Sun, 24 Jan 2021 15:31:54 +0000 (18:31 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 29 Jan 2021 16:51:18 +0000 (19:51 +0300)
commit8f8fe4a97ca9f223788fa474354253943ad13ae7
tree103830f09c1919815dd643505d99353f3a1dd9b2
parent776302d46bf1036875e115d78b54be9ebb8600d9
0032083: Visualization, TKOpenGl - PBR rendering is unavailable on Apple A12 Bionic (iPad)

Added "#define occLight_Index(theId) 0" workaround allowing to compile
a single light source PBR shading program on OpenGL ES 2.0,
as it disallows non-constant index expressions (even trivially deducable at compile-time).

PBR lookup table is now automatically resized to RGBA format
when RG texture format is unsupported (OpenGL ES 2.0).

OpenGl_ShaderManager now allows compiling PBR shaders
using WebGL 1.0 + GL_EXT_shader_texture_lod extension.

PBR IBL baking GLSL program has been redisigned to use
if/else to avoid non-constant index expressions.
Diffuse baking implements packing float values into a temporary RGBA8 texture
as a fallback solution on WebGL 1.0 implementations supporting float textures
but not as FBO render targets.

OpenGl_PBREnvironment now uses GL_FRAMEBUFFER instead of GL_DRAW_FRAMEBUFFER
for compatibility with OpenGL ES 2.0.
19 files changed:
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_Context.hxx
src/OpenGl/OpenGl_PBREnvironment.cxx
src/OpenGl/OpenGl_PBREnvironment.hxx
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_ShaderManager.hxx
src/OpenGl/OpenGl_Texture.cxx
src/OpenGl/OpenGl_Texture.hxx
src/OpenGl/OpenGl_TextureFormat.cxx
src/OpenGl/OpenGl_TextureFormat.hxx
src/OpenGl/OpenGl_View.cxx
src/Shaders/Declarations.glsl
src/Shaders/DirectionalLightShadow.glsl
src/Shaders/PBREnvBaking.fs
src/Shaders/PBREnvBaking.vs
src/Shaders/Shaders_Declarations_glsl.pxx
src/Shaders/Shaders_DirectionalLightShadow_glsl.pxx
src/Shaders/Shaders_PBREnvBaking_fs.pxx
src/Shaders/Shaders_PBREnvBaking_vs.pxx