前言

1
记录修改shader和cesium版本迭代替换的一些变量函数。

替换

czm_phong
1
2
3
4
1.5x 之前

gl_FragColor =
czm_phong(normalize(positionToEyeEC), material)
1
2
3
4
1.6x 之后

gl_FragColor =
czm_phong(normalize(positionToEyeEC), material, lightDirectionEC)
czm_ellipsoidInverseRadii
1
2
3
4
5
6
7
1.5x 之前

float ellipsoidSurfaceFunction(czm_ellipsoid ellipsoid, vec3 point)
{
vec3 scaled = ellipsoid.inverseRadii * point;
return dot(scaled, scaled) - 1.0;
}
1
2
3
4
5
6
7
1.6x 之后

float ellipsoidSurfaceFunction(vec3 point)
{
vec3 scaled = czm_ellipsoidInverseRadii * point;
return dot(scaled, scaled) - 1.0;
}