Skip to content

Commit bc16ca0

Browse files
authored
Merge branch 'main' into edge_line_unique_VAO
2 parents afe6e41 + d7329e2 commit bc16ca0

File tree

10 files changed

+24
-13
lines changed

10 files changed

+24
-13
lines changed

.github/workflows/cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v5
1414
- name: install node 22
15-
uses: actions/setup-node@v4
15+
uses: actions/setup-node@v5
1616
with:
1717
node-version: '22'
1818
- name: install npm packages

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v5
2929
- name: install node 22
30-
uses: actions/setup-node@v4
30+
uses: actions/setup-node@v5
3131
with:
3232
node-version: '22'
3333
- name: npm install

.github/workflows/dev.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v5
1515
- name: install node 22
16-
uses: actions/setup-node@v4
16+
uses: actions/setup-node@v5
1717
with:
1818
node-version: '22'
1919
- name: npm install
@@ -34,7 +34,7 @@ jobs:
3434
steps:
3535
- uses: actions/checkout@v5
3636
- name: install node 22
37-
uses: actions/setup-node@v4
37+
uses: actions/setup-node@v5
3838
with:
3939
node-version: '22'
4040
- name: npm install
@@ -51,7 +51,7 @@ jobs:
5151
steps:
5252
- uses: actions/checkout@v5
5353
- name: install node 22
54-
uses: actions/setup-node@v4
54+
uses: actions/setup-node@v5
5555
with:
5656
node-version: '22'
5757
- name: npm install
@@ -67,7 +67,7 @@ jobs:
6767
steps:
6868
- uses: actions/checkout@v5
6969
- name: install node 20
70-
uses: actions/setup-node@v4
70+
uses: actions/setup-node@v5
7171
with:
7272
node-version: '20'
7373
- name: npm install

.github/workflows/prod.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v5
1111
- name: install node 22
12-
uses: actions/setup-node@v4
12+
uses: actions/setup-node@v5
1313
with:
1414
node-version: '22'
1515
- name: npm install
@@ -34,7 +34,7 @@ jobs:
3434
steps:
3535
- uses: actions/checkout@v5
3636
- name: install node 22
37-
uses: actions/setup-node@v4
37+
uses: actions/setup-node@v5
3838
with:
3939
node-version: '22'
4040
- name: npm install

.github/workflows/sandcastle-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v5
2020
- name: install node 22
21-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@v5
2222
with:
2323
node-version: '22'
2424
- name: npm install

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Materials loaded from type now respect submaterials present in the referenced material type. [#10566](https://github.com/CesiumGS/cesium/issues/10566)
1010
- Reverts `createImageBitmap` options update to continue support for older browsers [#12846](https://github.com/CesiumGS/cesium/issues/12846)
1111
- Fix flickering artifact in Gaussian splat models caused by incorrect sorting results. [#12662](https://github.com/CesiumGS/cesium/issues/12662)
12+
- Fixes vertical misalignment of glyphs in labels with small fonts [#8474](https://github.com/CesiumGS/cesium/issues/8474)
1213

1314
#### Additions :tada:
1415

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
103103
- [Jason Crow](https://github.com/jason-crow)
104104
- [Erin Ingram](https://github.com/eringram)
105105
- [Daniel Zhong](https://github.com/danielzhong)
106+
- [Mark Schlosser](https://github.com/markschlosseratbentley)
106107
- [Flightradar24 AB](https://www.flightradar24.com)
107108
- [Aleksei Kalmykov](https://github.com/kalmykov)
108109
- [BIT Systems](http://www.caci.com/bit-systems)

packages/engine/Source/Scene/BillboardCollection.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,13 +1020,20 @@ function writeCompressedAttrib0(
10201020
Math.floor(
10211021
CesiumMath.clamp(pixelOffsetY, -UPPER_BOUND, UPPER_BOUND) + UPPER_BOUND,
10221022
) * LEFT_SHIFT8;
1023+
1024+
// We scale `translate` by LEFT_SHIFT2 before encoding it (and unscale after decoding in the shader)
1025+
// to preserve some subpixel precision (1 / 4 = 0.25 pixels). This mitigates rounding errors in aligning glyphs.
1026+
// The cost of increasing this scaling factor is that it decreases the range of representable `translate` values
1027+
// by the same scaling factor. Value must be kept in sync with the shader.
10231028
let compressed2 =
10241029
Math.floor(
1025-
CesiumMath.clamp(translateX, -UPPER_BOUND, UPPER_BOUND) + UPPER_BOUND,
1030+
CesiumMath.clamp(translateX * LEFT_SHIFT2, -UPPER_BOUND, UPPER_BOUND) +
1031+
UPPER_BOUND,
10261032
) * LEFT_SHIFT8;
10271033

10281034
const tempTanslateY =
1029-
(CesiumMath.clamp(translateY, -UPPER_BOUND, UPPER_BOUND) + UPPER_BOUND) *
1035+
(CesiumMath.clamp(translateY * LEFT_SHIFT2, -UPPER_BOUND, UPPER_BOUND) +
1036+
UPPER_BOUND) *
10301037
RIGHT_SHIFT8;
10311038
const upperTranslateY = Math.floor(tempTanslateY);
10321039
const lowerTranslateY = Math.floor(

packages/engine/Source/Scene/Scene.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ const requestRenderAfterFrame = function (scene) {
100100
* @param {object} options Object with the following properties:
101101
* @param {HTMLCanvasElement} options.canvas The HTML canvas element to create the scene for.
102102
* @param {ContextOptions} [options.contextOptions] Context and WebGL creation properties.
103-
* @param {Element} [options.creditContainer] The HTML element in which the credits will be displayed.
104-
* @param {Element} [options.creditViewport] The HTML element in which to display the credit popup. If not specified, the viewport will be a added as a sibling of the canvas.
103+
* @param {Element} [options.creditContainer] The HTML element in which the credits will be displayed. If not specified, a credit container will be created and added as a sibling of the canvas.
104+
* @param {Element} [options.creditViewport] The HTML element in which to display the credit popup. If not specified, the viewport will be added as a sibling of the canvas.
105105
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The default ellipsoid. If not specified, the default ellipsoid is used.
106106
* @param {MapProjection} [options.mapProjection=new GeographicProjection(options.ellipsoid)] The map projection to use in 2D and Columbus View modes.
107107
* @param {boolean} [options.orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency.

packages/engine/Source/Shaders/BillboardCollectionVS.glsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ void main()
165165

166166
temp = compressedAttribute0.z * SHIFT_RIGHT8;
167167
translate.x = floor(temp) - UPPER_BOUND;
168+
translate.x *= SHIFT_RIGHT2; // undo translateX scaling (helps preserve subpixel precision, see BillboardCollection.js attribute writer for more info)
168169

169170
translate.y += (temp - floor(temp)) * SHIFT_LEFT8;
170171
translate.y -= UPPER_BOUND;
172+
translate.y *= SHIFT_RIGHT2;
171173

172174
temp = compressedAttribute1.x * SHIFT_RIGHT8;
173175
float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);

0 commit comments

Comments
 (0)