MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032083Open CASCADE[OCCT] OCCT:Visualizationpublic2021-01-25 00:422021-02-03 03:59
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 7.5.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0032083: Visualization, TKOpenGl - PBR rendering is unavailable on Apple A12 Bionic (iPad)
DescriptionPBR rendering cannot be enabled on Apple A12 Bionic (iPad), although GPU is (almost) capable of it.

Failure happens rendering to DiffuseSH IBL texture map due to FBO incompleteness in OpenGl_PBREnvironment::checkFBOComplentess().
Apparently, this happens because this GPU doesn't support rendering into floating-point textures GL_RGBA32F (browser doesn't report WEBGL_color_buffer_float extension).

It is desired considering alternatives for compatibility:
- Initialize GL_RGBA32F 9x1 texture with a stub.
  This wouldn't allow baking proper IBL from cubemap textures, but still might be better that just disabling PBR altogether.
- Load GL_RGBA32F 9x1 texture with pre-baked data.
  Could be cumbersome - something that we have tried to avoid by optimizing IBL baking.
- Use another texture pixel format with affordable quality / apply hacks.

NbLogicalProcessors: 1
EGLVersion: 1.4 Emscripten EGL
EGLVendor: Emscripten
EGLClientAPIs: OpenGL_ES
GLvendor: WebKit
GLdevice: WebKit WebGL
GLunmaskedVendor: Apple Inc.
GLunmaskedDevice: Apple GPU
GLversion: OpenGL ES 2.0 (WebGL 1.0) [GLSL: OpenGL ES GLSL ES 1.00 (WebGL GLSL ES 1.0 (1.0))]
Max texture size: 16384
Max FBO dump size: 16384x16384
Max combined texture units: 32
Max MSAA samples: 0
Viewport: 1560x1080
GLextensions:
EXT_blend_minmax
EXT_sRGB
OES_texture_float
OES_texture_half_float
OES_texture_half_float_linear
OES_standard_derivatives
EXT_shader_texture_lod
EXT_texture_filter_anisotropic
OES_vertex_array_object
OES_element_index_uint
WEBGL_lose_context
WEBGL_compressed_texture_astc
WEBGL_compressed_texture_etc
WEBGL_compressed_texture_etc1
WEBKIT_WEBGL_compressed_texture_pvrtc
WEBGL_depth_texture
ANGLE_instanced_arrays
WEBGL_debug_shaders
WEBGL_debug_renderer_info
EXT_color_buffer_half_float

GL_EXT_blend_minmax
GL_EXT_sRGB
GL_OES_texture_float
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_standard_derivatives
GL_EXT_shader_texture_lod
GL_EXT_texture_filter_anisotropic
GL_OES_vertex_array_object
GL_OES_element_index_uint
GL_WEBGL_lose_context
GL_WEBGL_compressed_texture_astc
GL_WEBGL_compressed_texture_etc
GL_WEBGL_compressed_texture_etc1
GL_WEBKIT_WEBGL_compressed_texture_pvrtc
GL_WEBGL_depth_texture
GL_ANGLE_instanced_arrays
GL_WEBGL_debug_shaders
GL_WEBGL_debug_renderer_info
GL_EXT_color_buffer_half_float
ResolutionRatio: 2.66667
Display scale: 2
Steps To ReproduceN/A
Additional information
and documentation updates
PBR DiffuseSH values on different cubemap backgrounds:
// reset
[0]1 1 1
[1]0 0 0
[2]0 0 0
[3]0 0 0
[4]0 0 0
[5]0 0 0
[6]0 0 0
[7]0 0 0
[8]0 0 0

// circus [locate_data_file Circus_CubeMap_V.png]
[0]0.290436 0.099727 0.0592786
[1]-0.00473868 0.00210968 0.00524725
[2]0.026769 0.0241037 0.0157478
[3]-0.0602308 -0.0301462 -0.00700776
[4]0.0376035 0.0138195 0.00695015
[5]0.0496915 0.0259383 0.0184825
[6]0.0726759 0.0375336 0.0204313
[7]-0.013838 -0.00345622 -0.000793063
[8]-0.00452518 0.00111499 0.000712972

// white room
[0]0.507162 0.507162 0.507162
[1]-0.000123025 -0.000123025 -0.000123025
[2]0.116537 0.116537 0.116537
[3]0.123789 0.123789 0.123789
[4]0.000127576 0.000127576 0.000127576
[5]0.0423553 0.0423553 0.0423553
[6]-0.000324401 -0.000324401 -0.000324401
[7]0.0202829 0.0202829 0.0202829
[8]0.0311274 0.0311274 0.0311274
TagsNo tags attached.
Test case numberNot required
Attached Files

- Relationships
parent of 0032105verifiedbugmaster Visualization, TKOpenGl - PBR flat shading GLSL program compilation error on OpenGL ES 2.0 
parent of 0032113verifiedbugmaster Visualization, TKOpenGl - broken PBR diffuse map within OpenGl_Caps::buffersOpaqueAlpha() on OpenGL ES 2.0 
parent of 0032114verifiedbugmaster Visualization, TKOpenGl - broken PBR LUT on OpenGL ES 2.0 
related to 0032084newkgv Visualization - WebGL sample errors when run in Safari browser with experimental WebGL 2.0 option 
related to 0032081verifiedbugmaster Visualization - WebGL sample errors when run in Safari browser with WebGL 1.0 
related to 0032094verifiedbugmaster Visualization, TKOpenGl - OpenGl_VertexBuffer::bindAttribute() silently does nothing without active GLSL program 
related to 0032110verifiedbugmaster Visualization, TKOpenGl - allow incomplete PBR on OpenGL ES 2.0 without GL_EXT_shader_texture_lod 
child of 0030700closedapn Visualization, TKOpenGl - support PBR Metallic-Roughness shading model 

-  Notes
(0098491)
git (administrator)
2021-01-29 05:00

Branch CR32083 has been created by kgv.

SHA-1: 6a2ccfe316ca898c671ed7307d659df5dc1cb715


No new revisions were added by this update.
(0098493)
kgv (developer)
2021-01-29 05:03

Please raise the patch in OCCT branch CR32083 (reviewed and tested in scope of 0032081).
(0098527)
bugmaster (administrator)
2021-01-30 16:31

Combination -
OCCT branch : IR-2021-01-29
master SHA - 4ad4054c9029106ee8d3dffe9155bacf3969829b
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2021-01-29 SHA - c3b72814422d9716b8d67e200cc31db4c554346e
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17780.76000000008 / 17796.17000000006 [-0.09%]
Products
Total CPU difference: 11509.04000000011 / 12430.450000000123 [-7.41%]
Windows-64-VC14:
OCCT
Total CPU difference: 19390.859375 / 19444.171875 [-0.27%]
Products
Total CPU difference: 12815.171875 / 13824.375 [-7.30%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0098540)
git (administrator)
2021-01-30 17:16

Branch CR32083 has been deleted by inv.

SHA-1: 6a2ccfe316ca898c671ed7307d659df5dc1cb715

- Related Changesets
occt: master 8f8fe4a9
Timestamp: 2021-01-24 15:31:54
Author: kgv
Committer: bugmaster
Details ] Diff ]
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.
mod - src/OpenGl/OpenGl_Context.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Context.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_PBREnvironment.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_PBREnvironment.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_ShaderManager.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Texture.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Texture.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_TextureFormat.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_TextureFormat.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_View.cxx Diff ] File ]
mod - src/Shaders/Declarations.glsl Diff ] File ]
mod - src/Shaders/DirectionalLightShadow.glsl Diff ] File ]
mod - src/Shaders/PBREnvBaking.fs Diff ] File ]
mod - src/Shaders/PBREnvBaking.vs Diff ] File ]
mod - src/Shaders/Shaders_Declarations_glsl.pxx Diff ] File ]
mod - src/Shaders/Shaders_DirectionalLightShadow_glsl.pxx Diff ] File ]
mod - src/Shaders/Shaders_PBREnvBaking_fs.pxx Diff ] File ]
mod - src/Shaders/Shaders_PBREnvBaking_vs.pxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2021-01-25 00:42 kgv New Issue
2021-01-25 00:42 kgv Assigned To => kgv
2021-01-25 00:42 kgv Relationship added child of 0030700
2021-01-25 00:53 kgv Relationship added related to 0032084
2021-01-29 05:00 git Note Added: 0098491
2021-01-29 05:03 kgv Relationship added related to 0032081
2021-01-29 05:03 kgv Note Added: 0098493
2021-01-29 05:03 kgv Assigned To kgv => bugmaster
2021-01-29 05:03 kgv Status new => resolved
2021-01-29 05:04 kgv Status resolved => reviewed
2021-01-29 05:27 kgv Relationship added related to 0032094
2021-01-30 16:31 bugmaster Note Added: 0098527
2021-01-30 16:31 bugmaster Status reviewed => tested
2021-01-30 16:33 bugmaster Test case number => Not required
2021-01-30 16:50 bugmaster Changeset attached => occt master 8f8fe4a9
2021-01-30 16:50 bugmaster Status tested => verified
2021-01-30 16:50 bugmaster Resolution open => fixed
2021-01-30 17:16 git Note Added: 0098540
2021-02-02 00:42 kgv Relationship added parent of 0032105
2021-02-02 14:55 kgv Relationship added related to 0032110
2021-02-02 22:13 kgv Description Updated View Revisions
2021-02-02 22:13 kgv Steps to Reproduce Updated View Revisions
2021-02-02 22:13 kgv Additional Information Updated View Revisions
2021-02-02 23:01 kgv Relationship added parent of 0032113
2021-02-03 03:59 kgv Relationship added parent of 0032114


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker