question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shaders do not compile for WebGL

See original GitHub issue

On WebGL build I have following error: ShaderNotFoundException: GLTF/PbrMetallicRoughness not found. Did you forget to add it to the build? So I have included 2 shaders in the graphics settings

  1. PbrMetallicRoughness
  2. PbrSpecularGlossiness Then I was waiting for like 3 hours for building, then I realize that it repeats “compiling shader variants” infinitely:

_Originally posted by @kolodi in https://github.com/KhronosGroup/UnityGLTF/issues/357#issuecomment-463976395_

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
edumlauercommented, Feb 15, 2019

I believe you would need one or the other, preferably PbrMetallicRoughness. It still takes some time to compile all the variants, but you will only need to endure this process once.

0reactions
miketalbottcommented, Sep 8, 2020

@flecoq I was facing the same issue as you. I don’t have a clean fix but I did figure out a workaround: Instead of including the shader in the the graphics include list, I just added a cube to my scene using a material set to the “GLTF/PbrMetallicRoughness” shader and I disabled the cube. This seems to include the shader without all the variants.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebGL fragment shader won't compile
I am attempting to compile a WebGL fragment shader. I believe the error is in the shader's string, but I am unsure what...
Read more >
Default UI Shaders won't compile for WebGL
It appears that Unity is having trouble compiling the default UI shader for WebGL builds (other platforms, e.g. Mac, build fine).
Read more >
WebGL shader compile flow severely cripples ...
WebGL shader compile flow severely cripples WebGL and WebVR ... The core problem is that there is no way to know when a...
Read more >
WebGLRenderingContext: compileShader() method - Web APIs
compileShader () method of the WebGL API compiles a GLSL shader into binary data so that it can be used by a WebGLProgram...
Read more >
Fragment shader compiling in webGL but not in OpenGL
Very simple as you can see. It runs fine in webGL, but it seems it won't compile in OpenGL. I am no expert...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found