Skip to content

Commit 4643f59

Browse files
committed
【fix】2362>12级heightfixed:true高度不对问题
1 parent 5ee6758 commit 4643f59

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/layers/src/polygon/shaders/extrude/polygon_extrude_vert.glsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ uniform float u_raisingHeight: 0.0;
2828

2929
void main() {
3030

31-
float isSide = a_Position.z;
31+
float isSide = a_Position.z;
3232
float topU = a_uvs[0];
3333
float topV = 1.0 - a_uvs[1];
3434
float sidey = a_uvs[2];
@@ -42,7 +42,7 @@ void main() {
4242
project_pos.z = a_Position.z * a_Size;
4343
project_pos.z += u_raisingHeight;
4444

45-
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
45+
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {
4646
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
4747
project_pos.z *= mapboxZoomScale;
4848
project_pos.z += u_raisingHeight * mapboxZoomScale;

packages/layers/src/polygon/shaders/extrude/polygon_extrudetex_vert.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void main() {
4343
project_pos.z = a_Position.z * a_Size;
4444
project_pos.z += u_raisingHeight;
4545

46-
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {
46+
if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {
4747
float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);
4848
project_pos.z *= mapboxZoomScale;
4949
project_pos.z += u_raisingHeight * mapboxZoomScale;

0 commit comments

Comments
 (0)