CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.73k stars 3.45k forks source link

Since 1.91, 3dtiles with KHR_texture_transform display unnormal #11362

Open geo3data opened 1 year ago

geo3data commented 1 year ago

Sandcastle example: https://sandcastle.cesium.com/#c=bVJrb5swFP0rFp9SqTKwZmmapdUqqCJYHkubdkuFNLnmJnExdmqbZDDlv89AspcmgeDee865xwdcF40UEQYFoFmRxw+IUApaIyNRKQuFmBSIaA1GJ6LF4EgKnMKKFNzcNuCFzECga5Q4UMablxFlMxZHj1XkT1mkI3H/ngZRL8q2X5+C+Apb0Fs6ympQtnw3705HcTZ78PNJ9czGi3k5rSIz+zK/WJZeNQkf/am9n8NldxpSNg7i7bMVm7zOy1k40VHON2ldL5bV9HVezcK77kR4eF3cLcBfZfPoW59cLfuMB/EyfBwvPH25Gn3/7HvhJlvDp13ZTZwPiUgElUIbtGOwB2XPImB/zAQ/Nb1O4tCmDqQwhAlQiXPWMI0q0Y9EINRKKNA2OApWhOwJO0Vbx3Z/HOGVkvltnWqUdvx+r9e97NdaJwkQhpnSCrR2cFMz0JikaadZhdBWatuTYnDSD4gy9o2Ii0Y+hLUC0B3vHNnL97yz85aYyxT4AB1lECoUG/wyfcQcmueh9XQ0YRShGaR3J2+tSYs4IEoM3aAOKCXV2e8sJAfM5frYr5GJcM6doTYlh5sa9ZHlW6mM9cA7GLsG8i0n9hTuS2F3GUy1rnlD90QZpmyHWHr9n4+BKLc/qp2sCs4fWAWJczN0Lf4vGpckZWI924HipLSQ2sZw49+M2wHGeOjasl76L9dIyV+I+kP3Jw Browser: Chrome Operating System: Windows 11

Hi, the same 3dtiles data, I load it with 1.90, display well, look at the picture below, 微信截图_20230620153611

I load the same data ,with 1.91,1.93,1.95, 1.100, and the latest 1.106, all not well. In the gltf mode, I pack four images with gap to one single image, and modify the uv, so there is only one mesh, but only 1.90 or older version works well.

below is the gltf material, "materials": [ { "pbrMetallicRoughness": { "baseColorTexture": { "index": 0 }, "metallicFactor": 0, "roughnessFactor": 0.5 }, "extensions": { "KHR_materials_unlit": {} } }, { "pbrMetallicRoughness": { "baseColorTexture": { "index": 0, "extensions": { "KHR_texture_transform": { "offset": [ 0.5009727478027344, 0.000974658876657486 ], "scale": [ 0.49805447459220886, 0.0623781681060791 ] } } }, "metallicFactor": 0, "roughnessFactor": 0.5 }, "extensions": { "KHR_materials_unlit": {} } }, { "pbrMetallicRoughness": { "baseColorTexture": { "index": 0, "extensions": { "KHR_texture_transform": { "offset": [ 0.5009727478027344, 0.06530214101076126 ], "scale": [ 0.06225680932402611, 0.0623781681060791 ] } } }, "metallicFactor": 0, "roughnessFactor": 0.5 }, "extensions": { "KHR_materials_unlit": {} } } ],

geo3data commented 1 year ago

and the mesh's uv is not within [0,1], so I believe some shader change since 1.91 makes this problem, { "bufferView": 4, "componentType": 5126, "count": 6, "type": "VEC2", "max": [ 0.9940000176429749, 2.242000102996826 ], "min": [ 0.014999999664723873, -0.9700000286102295 ] },