CesiumGS / CesiumGS/cesium

Error rendering glTFs with 2-component normals

Open
#11,280 8 comments 0 reactions 0 assignees View on GitHub
category - model/gltf type - bug type - regression
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Before we are using CesiumJS 1.93 and it works, after upgraded to 1.105 it fails, error show in below:

RuntimeError: Fragment shader failed to compile. Compile log: WARNING: 0:2: 'GL_OES_standard_derivatives' : extension is not supported
ERROR: 0:326: 'v_texCoord_0' : undeclared identifier
ERROR: 0:326: '=' : dimension mismatch
ERROR: 0:326: '=' : cannot convert from 'const highp float' to 'highp 2-component vector of float'

Error
at new RuntimeError (http://localhost:8080/Build/CesiumUnminified/index.js:15434:11)
at createAndLinkProgram (http://localhost:8080/Build/CesiumUnminified/index.js:36538:9)
at reinitialize (http://localhost:8080/Build/CesiumUnminified/index.js:36691:19)
at initialize2 (http://localhost:8080/Build/CesiumUnminified/index.js:36686:3)
at ShaderProgram._bind (http://localhost:8080/Build/CesiumUnminified/index.js:36745:3)
at beginDraw (http://localhost:8080/Build/CesiumUnminified/index.js:182260:17)
at Context.draw (http://localhost:8080/Build/CesiumUnminified/index.js:182346:3)
at DrawCommand.execute (http://localhost:8080/Build/CesiumUnminified/index.js:33512:11)
at executeCommand (http://localhost:8080/Build/CesiumUnminified/index.js:231039:52)
at executeCommands2 (http://localhost:8080/Build/CesiumUnminified/index.js:231345:7)

I have tried the latest gltf-pipeline to remove the unsupported extension, but still no hope ...

Extensions of the model which working in 1.93: (named a.gltf)
"CESIUM_RTC",
"WEB3D_quantized_attributes",
"KHR_techniques_webgl"

Extensions of the model after gltf-pipeline: (named b.gltf)
"CESIUM_RTC",
"WEB3D_quantized_attributes"

both a and b glTF having the same error when import to 1.105, and only a.gltf in 1.93 is working.

can anyone please help?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the shader compilation failure in CesiumJS 1.105 with the supplied a.gltf and b.gltf models, comparing their 2-component normals and listed extensions. Use the reported v_texCoord_0 errors as the initial investigation point; done means both models render without the fragment shader compilation failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.