We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

WebGL crash on mobile when importing ThreeJS

Home Forums Bug Reports and Feature Requests WebGL crash on mobile when importing ThreeJS

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #779
    donalffons
    Customer

    I ran into a problem with the bloom feature that I implemented. However, this seems not to be a bloom-related issue, but more a ThreeJS related one. Here is an example file, with the bloom effect I wanted to achieve: https://donalffons-interface.s3.amazonaws.com/Verge3D/BloomBug/Verge3DTest.html

    This file runs fine in my laptop’s web browser. But it crashes on my phone (tried it on two different phones).

    I drilled down on the issue a bit and found out, that seemingly as soon as I include ThreeJS in my main HTML page, it crashes on my phones. Example: https://donalffons-interface.s3.amazonaws.com/Verge3D/ThreeJSFail/ThreeJSFail.html
    However, I think I need ThreeJS for the bloom effect (right?!).

    <html lang="en">
    <head>
    ...
    </head>
    <body>
        <div id="container"></div>
    
        <script src="build/three.js"></script> 
        <script src="v3d.js"></script>
        <script src="ThreeJSFail.js"></script>
    </body>
    </html>

    Am I doing something wrong? Is there a way around this problem?
    Attached is the simplified (second) example.
    Here you can download the first (bloom) example: https://donalffons-interface.s3.amazonaws.com/Verge3D/BloomBug/Verge3DBloom.zip

    #780
    donalffons
    Customer

    Upload failed. Download link for simplified (second) example: https://donalffons-interface.s3.amazonaws.com/Verge3D/ThreeJSFail/ThreeJSFail.zip

    #786
    Will Welker
    Customer

    The three.js engine is already included in your Verge3D app. One of the issues on my list to understand is how to implement three.js code into the Verge3D architecture. Three.js examples do all of their initializing operations as part of the example. In Verge3D, all that initializing is already done. So eventually I need to learn where to delineate the three.js examples and cut out the initialization parts that are already included within a Verge3D app.

    #797

    Yes, Verge3D already exposes THREE namespace so no need to link three.js library again. I checked the file and see that there are many light sources in it and from my experience this may cause overflowing curtain shader limits on restricted hardware such as smartphones. We’ll investigate this further.

    Chief 3D Verger | LinkedIn | Twitter

    #802
    donalffons
    Customer

    Thank you for clarifying, Yuri. I will take another shot at making Bloom work without importing ThreeJS.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.