首页 / 浏览问题 / 三维GIS / 问题详情
白膜数据设置自发光纹理报错
7EXP 2022年08月19日
代码如下:

  const hyp = new cesium.HypsometricSetting()

      hyp.emissionTextureArray = [

        {

          url: './static/building/building1.jpg',

          USpeed: 0,

          VSpeed: 0,

          UTiling: 100,

          VTiling: 100

        },

        {

          url: './static/building/building2.jpg',

          USpeed: 0,

          VSpeed: 0,

          UTiling: 80,

          VTiling: 80

        },

        {

          url: './static/building/building1.jpg',

          USpeed: 0,

          VSpeed: 0,

          UTiling: 100,

          VTiling: 100

        },

        {

          url: './static/building/building1.jpg',

          USpeed: 0,

          VSpeed: 0,

          UTiling: 100,

          VTiling: 100

        },

        {

          url: './static/building/building5.jpg',

          USpeed: 0.5,

          VSpeed: 0,

          UTiling: 50,

          VTiling: 50

        },

        {

          url: './static/building/building1.jpg',

          USpeed: 0.1,

          VSpeed: 0,

          UTiling: 30,

          VTiling: 30

        },

        {

          url: './static/building/building2.jpg',

          USpeed: 0,

          VSpeed: 0.5,

          UTiling: 20,

          VTiling: 20

        },

        {

          url: './static/building/building3.jpg',

          USpeed: 0,

          VSpeed: 0,

          UTiling: 100,

          VTiling: 100

        },

        {

          url: './static/building/building4.jpg',

          USpeed: 0,

          VSpeed: 0,

          UTiling: 70,

          VTiling: 70

        },

        {

          url: './static/building/building5.jpg',

          USpeed: 0,

          VSpeed: 0,

          UTiling: 70,

          VTiling: 70

        }

      ]

      layer.hypsometricSetting = {

        hypsometricSetting: hyp

      }

报错信息如下:

An error occurred while rendering.  Rendering has stopped.
undefined
RuntimeError: Fragment shader failed to compile.  Compile log: ERROR: 0:172: 'czm_getEmissiveTextureColor' : no matching overloaded function found
ERROR: 0:172: '=' : dimension mismatch
ERROR: 0:172: 'assign' : cannot convert from 'highp float' to 'highp 3-component vector of float'

白膜数据是通过矢量面数据,设置风格拉起来的

2 个回答

您好,

建议您这边先换个浏览器试一下。

看报错是着色器报错,着色器编译失败

ERROR: 0:172: 'czm_getEmissiveTextureColor':不匹配 

4,151EXP 2022年08月19日
好的,谢谢解决了,我拉白膜的方式有问题,我开始用的是风格设置里面拉的白膜,这样设置动态材质就有问题。后来我用三维设计里面的拉伸拉的白膜就可以了
换成他们官网的白膜数据报错么。是不是纹理有问题。还是白膜有问题。
330EXP 2022年08月19日
嗯呢,定位到问题了是白膜服务有问题
...