The attached archive contains a tileset with three contents:
Box.glb is just the "Box" glTF sample model
boxScaled.i3dm is an I3DM that contains a version of the box that scaled by a factor of 100 in x-direction, but defines a SCALE_NON_UNIFORM of [0.01, 1.0, 1.0], resulting in a unit box to be rendered
boxScaled.glb is a glTF asset that contains a version of the box that scaled by a factor of 100 in x-direction, and uses EXT_mesh_gpu_instancing with a SCALE of [1.0, 1.0, 1.0] (!), attached to a node with a scaling of [0.01, 1.0, 1.0] - also resulting in a unit box to be rendered
The non-uniform scaling of the node that refers to the EXT_mesh_gpu_instancing causes some error with the computation of the normals:
The effect is highly dependent on the view direction...
This may be a hint that there's likely some place where the transformation of the normals with the transpose of the inverse of the modelview matrix does not properly take into account the matrix of the node that the instancing extension is attached to...
The archive with the tileset, tiles, and a Sandcastle for quick tests:
The attached archive contains a tileset with three contents:
Box.glb
is just the "Box" glTF sample modelboxScaled.i3dm
is an I3DM that contains a version of the box that scaled by a factor of 100 in x-direction, but defines aSCALE_NON_UNIFORM
of[0.01, 1.0, 1.0]
, resulting in a unit box to be renderedboxScaled.glb
is a glTF asset that contains a version of the box that scaled by a factor of 100 in x-direction, and usesEXT_mesh_gpu_instancing
with aSCALE
of[1.0, 1.0, 1.0]
(!), attached to a node with a scaling of[0.01, 1.0, 1.0]
- also resulting in a unit box to be renderedThe non-uniform scaling of the node that refers to the
EXT_mesh_gpu_instancing
causes some error with the computation of the normals:Bottom:
Box.glb
Center:boxScaled.i3dm
Top:boxScaled.glb
The effect is highly dependent on the view direction...
This may be a hint that there's likely some place where the transformation of the normals with the transpose of the inverse of the modelview matrix does not properly take into account the matrix of the node that the instancing extension is attached to...
The archive with the tileset, tiles, and a Sandcastle for quick tests:
CesiumJS_instancing_normal_issue.zip