Shaders do not compile for WebGL
See original GitHub issueOn 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
- PbrMetallicRoughness
- 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:
- Created 5 years ago
- Comments:5
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@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.