Environment Map: GL_OUT_OF_MEMORY

02 November 2015 14:53
Hi @ll,

There is an issue on several Desktop PCs (and a Tablet) regarding to render an 1024x1024 (each tile) environment-map. Giving GL_OUT_OF_MEMORY-messages on some machines with standard/generic graphic-cards, we tried to isolate the problem in the attached demo-file. We reduced the env-map tile size in the example to 1024, 512 and 256x256 env-map versions, applying each on a different sphere.

On the affected machines some envmaps on spheres do not get rendered.
With Blend4Web 15.09 a PC (see, *specs) renders only the 256x256 env map,

same machine with Blend4Web 15.10 renders no one of the three env-map sizes:

Blend4Web HTML: EnvMapResourceTest_15_10.html
Zipped project files:

(current Chrome version) Chrome Console:
5EnvMapResourceTest_15_10.html:1 [GroupMarkerNotSet(!:5C30AD20]GL ERROR :GL_OUT_OF_MEMORY : glFramebufferTexture2D: <- error from previous GL command
EnvMapResourceTest_15_10.html:1 [GroupMarkerNotSet(!:5C30AD20]GL ERROR :GL_OUT_OF_MEMORY : glGenerateMipmap: <- error from previous GL command
5EnvMapResourceTest_15_10.html:1 [GroupMarkerNotSet(!:5C30AD20]GL ERROR :GL_OUT_OF_MEMORY : glFramebufferTexture2D: <- error from previous GL command …

Opera console log on that machine:
6(index):1 [.WebGLRenderingContext-04638058]GL ERROR :GL_OUT_OF_MEMORY : glCopyTexImage2D:

Firefox on that machine is rendering fine.

Latest graphic-card drivers are installed.

(* specs):
Windows 10
Platform: Win32
Browser User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Context Name: webgl
GL Version: WebGL 1.0 (OpenGL ES 2.0 Chromium)
Shading Language Version: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit
Renderer: WebKit WebGL
Unmasked Vendor: Google Inc.
Unmasked Renderer: ANGLE (NVIDIA GeForce 9800 GTX/9800 GTX+ Direct3D11 vs_4_0 ps_4_0)
Antialiasing: Available
ANGLE: Yes, D3D11
Major Performance Caveat: No
Vertex Shader
Max Vertex Attributes: 16
Max Vertex Uniform Vectors: 1024
Max Vertex Texture Image Units: 16
Max Varying Vectors: 14
Best float precision: [-2127, 2127] (23)
Transform Feedback
Coming in WebGL 2
Aliased Line Width Range: [1, 1]
Aliased Point Size Range: [1, 1024]
Fragment Shader
Max Fragment Uniform Vectors: 1024
Max Texture Image Units: 16
float/int precision: highp/highp
Best float precision: [-2127, 2127] (23)
Max Color Buffers: 8
RGBA Bits: [8, 8, 8, 8]
Depth / Stencil Bits: [24, 8]
Max Render Buffer Size: 8192
Max Viewport Dimensions: [8192, 8192]
Max Texture Size: 8192
Max Cube Map Texture Size: 8192
Max Combined Texture Image Units: 32
Max Anisotropy: 16
Uniform Buffers
Coming in WebGL 2
Supported Extensions:
@ Emotional3D
02 November 2015 18:01
Hi, klevis. This bug is reproduced on some old hardware, for example, nvidia 8000/9000 series. We'll fix it until the next release.
02 November 2015 18:31
Thank you Ivan for your quick reply.
@ Emotional3D
16 December 2015 12:21
Hi Ivan,

is there any news on that topic?

We tried with 15.11 but it is still the same :-/
@ Emotional3D
16 December 2015 15:31

We tried with 15.11 but it is still the same :-/
We've done some tests on NVIDIA GeForce 8400 GS which has the same issues and have included a fix for 8000/9000 series in 15.11.

If this fix is applied at start there should be a console message like the following one:
"Chrome / Windows / NVIDIA GeForce 8000/9000 series detected, setting max cubemap size to 256, use canvas for resizing."

Can you check this?
18 December 2015 11:51
Sorry Ivan, yes the message appears, on our 8000/9000 series pc. It works fine, thanks.
Unfortunatelly I checked only on another pc, which shows the same GL_OUT_OF_MEMORY issue, but has a slightly different hardware specification. I attach for you the verbose console of that pc, too:

Perhaps the same fix could be applied for that hardware profile, also.
Please let me know and thank you and the Blend4Web-Team for the automated texture resizing solution, it works fine!
@ Emotional3D
18 December 2015 12:56

Perhaps the same fix could be applied for that hardware profile, also.
Fixed it just now. It will be available soon in the 15.12 Release Candidate next week.
18 December 2015 14:51
next week

UPD: Sorry, i was wrong. RC was planned to be released this evening. Next week is the time for a stable release.
14 April 2016 11:56
Hi @ll,

on some machines (same as in post #5943) following website shows similar appearance in Firefox:

The console does not state any similar message as in previous posts, but it appears similar visually (black-material).
(env-map is 3x2 : 384x256px)

Any suggestions on this one?
Thanks in advance,

Cheers, Daniel.
@ Emotional3D
14 April 2016 13:05
Hi. We will look at this issue. Is it a Firefox-only error? What about Chrome?
Please register or log in to leave a reply.