Skip to content

Commit

Permalink
CARTO: Fix off-by-one raster vertex shader error (#9236)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer authored Nov 7, 2024
1 parent 920cf98 commit 2de1bc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/carto/src/layers/raster-layer-vertex.glsl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void main(void) {
int yIndex = - (gl_InstanceID / BLOCK_WIDTH);
int xIndex = gl_InstanceID + (yIndex * BLOCK_WIDTH);
common_position += scale * vec2(float(xIndex), float(yIndex));
common_position += scale * vec2(float(xIndex), float(yIndex - 1));
vec4 color = column.isStroke ? instanceLineColors : instanceFillColors;
Expand Down
10 changes: 3 additions & 7 deletions test/apps/carto-dynamic-tile/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ import React, {useState} from 'react';
import {createRoot} from 'react-dom/client';
import {Map} from 'react-map-gl/maplibre';
import DeckGL from '@deck.gl/react';
import {
H3TileLayer,
RasterTileLayer,
QuadbinTileLayer,
query,
VectorTileLayer
} from '@deck.gl/carto';
import {H3TileLayer, RasterTileLayer, QuadbinTileLayer, VectorTileLayer} from '@deck.gl/carto';

import {query} from '@carto/api-client';
import datasets from './datasets';
import {Layer} from '@deck.gl/core';

Expand Down

0 comments on commit 2de1bc5

Please sign in to comment.