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 gltf Shader Error with Blender 4?

Home Forums Bug Reports and Feature Requests WebGL gltf Shader Error with Blender 4?

  • This topic has 7 replies, 3 voices, and was last updated 1 year ago by masj.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #68980
    masj
    Participant

    Hi,

    I installed the latest version of V3D (4.5.1), and am running Blender 4.0.1.
    My assets exported from Blender 3.x were working fine, but when I exported a gltf model today with Blender 4 using the same file (same models, same materials), I started getting this WebGL error in the web app:

    v3d.js:1 v3d.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.
    G @ v3d.js:1
    v3d.js:1 v3d.WebGLProgram: shader error: 0 35715 false gl.getProgramInfoLog Fragment shader is not compiled.
    (see screenshot for full error)

    The 3D models no longer show up. The materials are all basic Principled BDSFs – nothing special besides an input node driving the opacity in the web app (see screenshot).

    Please let me know if I can provide any more info.
    REALLY need help ASAP to get this working again.
    Thank you!

    • This topic was modified 1 year ago by masj. Reason: missing screenshots
    Attachments:
    You must be logged in to view attached files.
    #68982
    xeon
    Customer

    I have run into this recently. Blender fundamentally changed the BSDF shaders from 3.x to 4.x and you will have to update it to a 4.0 BSDF node for it to work properly. Its been a while you can try it and see if that solves it. I also believe there were some other shader nodes that got changed, color mix, emission and something else….but try rebuilding your shader nodes in 4.0.1 replacing the 3.x shaders with newly built 4.0 shaders and I think the problem will go away.

    Try it out on one object and see.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #68983
    masj
    Participant

    Thanks for your reply.

    I went through all the node trees for each material, created a new Principled BDSF Shader node, swapped it in the node tree with the legacy one, deleted the legacy Principled BDSF node, and reconnected it into the node network. Saved and reexported, but the issue persists, sadly :-(

    Could I be missing a step? Surprised more people aren’t running into this issue, so might just be my unlucky setup?
    Really not looking forward to potentially having to go back and recreate past scenes from scratch if we can’t find a solution, so any further help is appreciated.

    Attachments:
    You must be logged in to view attached files.
    #68989
    xeon
    Customer

    Ok..well..sorry that did not work for you.

    If you could isolate the mesh and materials giving you the problem and post up the blend file I will be happy to go through it and see what I can find.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #68990
    masj
    Participant

    Thanks for the offer. I might take you up on that.

    Upon further testing, I found the errors would go away if I changed the shader type to something else (i.e. Diffuse BSDF, Sheen BSDF, etc.).
    The error only seems to get thrown when it’s a Principled BSDF (even if created from scratch), and it happens when v3d.js is trying to do something with it (the gltf file itself loads fine in the browser on its own).

    I guess I can use a different shader type until this gets addressed, assuming its not just me and others are able to recreate the issue as well (Blender 4.0.1, Any Mesh Objects with Principled BSDF Material applied, exported as a gltf file to v3d).

    • This reply was modified 1 year ago by masj. Reason: including screenshot
    Attachments:
    You must be logged in to view attached files.
    #68996
    masj
    Participant

    Think I might’ve found the issue.
    There is a v3d checkbox setting for each material called “glTF 2.0 Compatible” that was left unchecked by default for me. Checking it on and reexporting seemed to have solved the issue, but need to check later if anything else broke and/or this is a false positive.

    Attachments:
    You must be logged in to view attached files.
    #68998
    kdv
    Participant

    I installed the latest version of V3D (4.5.1)

    But you didn’t update your app. Your app is running with v3d.js 4.4.0 :scratch: And the result is quite expected :unsure:

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #69003
    masj
    Participant

    …yup, you are totally right. I completely missed that crucial step when updating this time around >.<
    Learned a bit regardless, and thanks for calling that out.

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