When I tried to access this case: Cesium Stories.
I got an error like this:
Hi, sorry you are having trouble with the story.
- What browser and operating system are you using?
- What country are you trying to access the story from? (You can message support@cesium.com and reference this issue if you don’t want to post publicly)
- Are you able to view the browser console and see if there are any errors?
My browser is: Google Chrome 118.0.5993.71 (Official Build) (64-bit).
My OS is: Windows 11 Version 22H2 (Build 22621.2428).
I’m trying to access from China.
And the Error Messages from browser console is below:
Cesium.js:81 [Cesium WebGL] Vertex shader compile log: ERROR: 0:48: 'w' : vector field selection out of range
index.js:1561 Vertex shader failed to compile. Compile log: ERROR: 0:48: 'w' : vector field selection out of range
[Cesium WebGL] Vertex shader source:
#version 300 es
#define HAS_NORMALS
#define HAS_TANGENTS
#define HAS_TEXCOORD_0
#define HAS_BITANGENTS
#define LOG_DEPTH
#define OES_texture_float_linear
#define OES_texture_float
#line 0
uniform vec2 czm_currentFrustum;
uniform mat4 czm_inverseProjection;
#ifdef LOG_DEPTH
out float v_depthFromNearPlusOne;
#ifdef SHADOW_MAP
out vec3 v_logPositionEC;
#endif
#endif
vec4 czm_updatePositionDepth(vec4 coords) {
#if defined(LOG_DEPTH)
#ifdef SHADOW_MAP
vec3 logPositionEC = (czm_inverseProjection * coords).xyz;
v_logPositionEC = logPositionEC;
#endif
coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;
#endif
return coords;
}
void czm_vertexLogDepth()
{
#ifdef LOG_DEPTH
v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;
gl_Position = czm_updatePositionDepth(gl_Position);
#endif
}
void czm_vertexLogDepth(vec4 clipCoords)
{
#ifdef LOG_DEPTH
v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;
czm_updatePositionDepth(clipCoords);
#endif
}
uniform mat3 czm_normal;
uniform mat4 czm_modelView;
uniform mat3 czm_normal3D;
uniform mat4 czm_modelView3D;
struct czm_modelVertexOutput {
vec3 positionMC;
float pointSize;
};
uniform mat4 czm_model;
uniform mat4 czm_projection;
#line 0
in vec3 a_positionMC;
in vec3 a_normalMC;
in vec3 a_tangentMC;
in vec2 a_texCoord_0;
in vec3 a_bitangent;
out vec3 v_positionWC;
out vec3 v_positionEC;
out vec3 v_normalEC;
out vec3 v_positionMC;
out vec3 v_tangentEC;
out vec2 v_texCoord_0;
out vec3 v_bitangent;
out vec3 v_bitangentEC;
struct ProcessedAttributes
{
vec3 normalMC;
vec3 positionMC;
vec3 tangentMC;
float tangentSignMC;
vec2 texCoord_0;
vec3 bitangent;
vec3 bitangentMC;
};
struct SelectedFeature
{
float _empty;
};
struct FeatureIds
{
float _empty;
};
struct Metadata
{
float _empty;
};
struct MetadataClass
{
float _empty;
};
struct MetadataStatistics
{
float _empty;
};
void initializeAttributes(out ProcessedAttributes attributes)
{
attributes.normalMC = a_normalMC;
attributes.positionMC = a_positionMC;
attributes.tangentMC = a_tangentMC.xyz;
attributes.tangentSignMC = a_tangentMC.w;
attributes.texCoord_0 = a_texCoord_0;
attributes.bitangent = a_bitangent;
}
void setDynamicVaryings(inout ProcessedAttributes attributes)
{
v_texCoord_0 = attributes.texCoord_0;
v_bitangent = attributes.bitangent;
}
void initializeFeatureIds(out FeatureIds featureIds, ProcessedAttributes attributes)
{
}
void initializeFeatureIdAliases(inout FeatureIds featureIds)
{
}
void setFeatureIdVaryings()
{
}
void initializeMetadata(out Metadata metadata, out MetadataClass metadataClass, out MetadataStatistics metadataStatistics, ProcessedAttributes attributes)
{
}
void setMetadataVaryings()
{
}
vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal)
{
vec4 computedPosition;
vec3 positionMC = attributes.positionMC;
v_positionMC = positionMC;
v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz;
#if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
vec3 position2D = attributes.position2D;
vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz;
computedPosition = czm_projection * vec4(positionEC, 1.0);
#else
computedPosition = czm_projection * vec4(v_positionEC, 1.0);
#endif
#if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE)
v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
#endif
#ifdef HAS_NORMALS
v_normalEC = normalize(normal * attributes.normalMC);
#endif
#ifdef HAS_TANGENTS
v_tangentEC = normalize(normal * attributes.tangentMC);
#endif
#ifdef HAS_BITANGENTS
v_bitangentEC = normalize(normal * attributes.bitangentMC);
#endif
setDynamicVaryings(attributes);
return computedPosition;
}
void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes)
{
initializeFeatureIds(featureIds, attributes);
initializeFeatureIdAliases(featureIds);
setFeatureIdVaryings();
}
void metadataStage(
out Metadata metadata,
out MetadataClass metadataClass,
out MetadataStatistics metadataStatistics,
ProcessedAttributes attributes
)
{
initializeMetadata(metadata, metadataClass, metadataStatistics, attributes);
setMetadataVaryings();
}
czm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {
czm_modelVertexOutput vsOutput;
vsOutput.positionMC = positionMC;
vsOutput.pointSize = 1.0;
return vsOutput;
}
void czm_log_depth_main()
{
ProcessedAttributes attributes;
initializeAttributes(attributes);
#ifdef USE_DEQUANTIZATION
dequantizationStage(attributes);
#endif
#ifdef HAS_MORPH_TARGETS
morphTargetsStage(attributes);
#endif
#ifdef HAS_SKINNING
skinningStage(attributes);
#endif
#ifdef HAS_PRIMITIVE_OUTLINE
primitiveOutlineStage();
#endif
#ifdef HAS_BITANGENTS
attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);
#endif
FeatureIds featureIds;
featureIdStage(featureIds, attributes);
#ifdef HAS_SELECTED_FEATURE_ID
SelectedFeature feature;
selectedFeatureIdStage(feature, featureIds);
cpuStylingStage(attributes.positionMC, feature);
#endif
#if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
mat4 modelView = czm_modelView3D;
mat3 normal = czm_normal3D;
#else
mat4 modelView = czm_modelView;
mat3 normal = czm_normal;
#endif
#ifdef HAS_INSTANCING
#ifdef USE_LEGACY_INSTANCING
mat4 instanceModelView;
mat3 instanceModelViewInverseTranspose;
legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);
modelView = instanceModelView;
normal = instanceModelViewInverseTranspose;
#else
instancingStage(attributes);
#endif
#ifdef USE_PICKING
v_pickColor = a_pickColor;
#endif
#endif
Metadata metadata;
MetadataClass metadataClass;
MetadataStatistics metadataStatistics;
metadataStage(metadata, metadataClass, metadataStatistics, attributes);
#ifdef HAS_CUSTOM_VERTEX_SHADER
czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);
customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);
#endif
vec4 positionClip = geometryStage(attributes, modelView, normal);
#ifdef HAS_SILHOUETTE
silhouetteStage(attributes, positionClip);
#endif
#ifdef HAS_POINT_CLOUD_SHOW_STYLE
float show = pointCloudShowStylingStage(attributes, metadata);
#else
float show = 1.0;
#endif
#ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
show *= pointCloudBackFaceCullingStage();
#endif
#ifdef HAS_POINT_CLOUD_COLOR_STYLE
v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);
#endif
#ifdef PRIMITIVE_TYPE_POINTS
#ifdef HAS_CUSTOM_VERTEX_SHADER
gl_PointSize = vsOutput.pointSize;
#elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
#else
gl_PointSize = 1.0;
#endif
gl_PointSize *= show;
#endif
gl_Position = show * positionClip;
}
#line 0
void main()
{
czm_log_depth_main();
czm_vertexLogDepth();
}
gIe @ Cesium.js:81
index.js:1561 Vertex shader failed to compile. Compile log: ERROR: 0:48: 'w' : vector field selection out of range
Sorry, I didn’t describe the problem clearly. I got this error when I clieck the “1/5 Next”(from 1/5 to 2/5) button in the left bottom corner.
Thank you for providing that additional information. I was able to reproduce the error you reported. I have created an issue for the team to investigate the error and update the story with a fix.