Skip to content

Commit

Permalink
chore: Update Ubuntu for CI (visgl#7672)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer authored Feb 21, 2023
1 parent eebaed2 commit f864ea3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test-node:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2.1.1
Expand All @@ -21,7 +21,8 @@ jobs:

- name: Install dependencies
run: |
sudo apt-get install -y mesa-utils xvfb libgl1-mesa-dri libglapi-mesa libosmesa6
sudo apt-get update
sudo apt-get install -y mesa-utils xvfb libgl1-mesa-dri libglapi-mesa libosmesa6 libxi-dev
yarn bootstrap
- name: Run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ uniform sampler2D iconsTexture;
uniform float gamma;
uniform bool sdf;
uniform float alphaCutoff;
uniform float buffer;
uniform float sdfBuffer;
uniform float outlineBuffer;
uniform vec4 outlineColor;
Expand All @@ -46,7 +46,7 @@ void main(void) {
// if enable sdf (signed distance fields)
if (sdf) {
float distance = alpha;
alpha = smoothstep(buffer - gamma, buffer + gamma, distance);
alpha = smoothstep(sdfBuffer - gamma, sdfBuffer + gamma, distance);
if (outlineBuffer > 0.0) {
float inFill = alpha;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class MultiIconLayer<DataT, ExtraPropsT extends {} = {}> extends
...params.uniforms,
// Refer the following doc about gamma and buffer
// https://blog.mapbox.com/drawing-text-with-signed-distance-fields-in-mapbox-gl-b0933af6f817
buffer: DEFAULT_BUFFER,
sdfBuffer: DEFAULT_BUFFER,
outlineBuffer,
gamma: smoothing,
sdf: Boolean(sdf),
Expand Down

0 comments on commit f864ea3

Please sign in to comment.