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.8k stars 3.46k forks source link

specularEnvironmentMaps not working with 3D Tiles #9332

Open dzungpng opened 3 years ago

dzungpng commented 3 years ago

Related community forum thread: https://community.cesium.com/t/how-to-use-specularenvironmentmaps-in-3dtiles/12001

When trying to set the specularEngironmentMaps for 3D tileset, the user is running into the following error: image

The example is using a tileset from Cesium SampleData folder.

Sandcastle reproducing error: link

This Sancastle is created based on the Image Based Lighting Sandcastle in the documentation.

sofasama commented 3 years ago

I found this error has happened in Batched3DModel3DTileContent.js. The ComputeCommand doesn't include the variable that Function [update] need. I skipped the front part of this For loop, which includes ComputeCommand, and goes straight to DrawCommand, then everything is good but the specularEnvironmentMaps does not work. Maybe these computecommands is in the wrong place or it needs another way to read those. image image

HiXiSi commented 3 years ago

Do you have any idea how to fix this?