Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebGL2] "3D Material Testers" doesn't load textures properly and takes 24minutes to load #19089

Closed
37TS opened this issue May 21, 2018 · 6 comments

Comments

@37TS
Copy link

37TS commented May 21, 2018

Godot version:
Godot_v3.0.3-rc2_win64 (with rc1 export templates because rc2 templates for html5 are missing, though the same happens with Godot_v3.0.3-rc1_win64 too)

OS/device including version:
Win10 x64 / R9 280X / Firefox 60.0.1 (64-bit)

Issue description:
Multiple errors in the web console when exporting the demo project "3d material testers".
Of particular importance the last "pieces" regarding WebGL warning: blitFramebuffer: DRAW_FRAMEBUFFER: This operation requires zeroing texture data. This is slow.

Up to now, I'm trying all the offical projects given as demos on the website.
My (disputable) analysis is that there is some procedure slowing down the loading times, maybe timing out the GPU.
I had to suppress errors generated from the material%20testers.html and this prompted the webconsole to output errors as related to the material%20testers.js file generated during export (nothing special here, it just changes the origin of the error in the console but it is really the JS the one responsible, not the html).

All in all, the project works perfectly at 60fps but some textures are missing and it takes approximately 104 to 112 kilobytes per second to load when exported as release, or about 23 minutes for 140 megabytes (it takes 24 minutes if exported as "debug"). This seems to be related to an indefinite amount of exceptions/errors raised in the background and to some wrong procedures used by the engine because I've tried bigger WASM projects made with other engines and they're incredibly fast in loading times ( to make it clear, It can't be my setup).

Also, while searching for issues, I've found somebody who archived ** ERROR: Method/Function Failed, returning: RES() -projectname- :whatever-line:whatever-column
At: core/io/resource_loader.cpp:186:_load()** by saying that it was strictly mono related : it isn't.

I've attached some screen-shots (one for each cube-map) to prove that the demo is indeed loading but that some textures are missing.
3dmat0
3dmat1
3dmat2
3dmat3
3dmat5

Here's the list of errors
( the last errors appear whenever you scroll in the html page)


3d_material_testers_errors.txt


Steps to reproduce:

  • Export the demo "3D material testers" as HTML5 project
  • Do not select a texture compression out of the 3 available because you'll have more errors (s3, etc, etc2)
  • Load it in the Firefox (chrome might not prompt some errors, nonetheless, it is as slow as firefox)

Minimal reproduction project:
Not needed. It's the official, unmodified demo.

@37TS
Copy link
Author

37TS commented May 22, 2018

UPDATE:

There is something worth checking here for "Buffer for uniform block is smaller than UNIFORM_BLOCK_DATA_SIZE"

https://github.com/mozilla/gecko-dev/blob/master/dom/canvas/WebGLContextDraw.cpp

// Check UBO sizes.

        for (const auto& cur : linkInfo->uniformBlocks) {
            const auto& dataSize = cur->mDataSize;
            const auto& binding = cur->mBinding;
            if (!binding) {
                mWebGL->ErrorInvalidOperation("%s: Buffer for uniform block is null.",
                                              funcName);
                *out_error = true;
                return;
            }

            const auto availByteCount = binding->ByteCount();
            if (dataSize > availByteCount) {
                mWebGL->ErrorInvalidOperation("%s: Buffer for uniform block is smaller"
                                              " than UNIFORM_BLOCK_DATA_SIZE.",
                                              funcName);
                *out_error = true;
                return;
            }

            if (binding->mBufferBinding->IsBoundForTF()) {
                mWebGL->ErrorInvalidOperation("%s: Buffer for uniform block is bound or"
                                              " in use for transform feedback.",
                                              funcName);
                *out_error = true;
                return;
            }
        }

        ////

@eon-s
Copy link
Contributor

eon-s commented May 23, 2018

try to hide long blocks of text in

<details>

</details>

tags to make posts more readable.

@37TS
Copy link
Author

37TS commented May 23, 2018

@eon-s fixed.

@akien-mga
Copy link
Member

CC @eska014

@leonkrause leonkrause changed the title HTML5 export of "3D Material Testers" doesn't load textures properly and takes 24minutes to load WebGL 2: "3D Material Testers" doesn't load textures properly and takes 24minutes to load Nov 19, 2018
@leonkrause leonkrause added this to the 3.1 milestone Nov 28, 2018
@Chaosus Chaosus changed the title WebGL 2: "3D Material Testers" doesn't load textures properly and takes 24minutes to load [WebGL2] "3D Material Testers" doesn't load textures properly and takes 24minutes to load Dec 27, 2018
@akien-mga akien-mga modified the milestones: 3.1, 3.2 Jan 22, 2019
@LinuxUserGD
Copy link
Contributor

LinuxUserGD commented Feb 2, 2019

For me it only takes 1 minute but I get strange rendering glitches. I've picked all checkboxes.
material
That you don't get textures when you uncheck all checkboxes is expected, I think. I also got no textures by unchecking everything on my Solus Stunts project.

@clayjohn
Copy link
Member

We are no longer working on the WebGL2 backend due to poor driver support on most systems. We recommend you use the GLES2/WebGL backend instead.

Unfortunately, that means this bug just isn't going to be fixed in GLES3/WebGL2, sorry.

@clayjohn clayjohn removed this from the 3.2 milestone Dec 18, 2019
@akien-mga akien-mga added this to the 3.2 milestone Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants