mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Fix stencil rendering
This commit is contained in:
parent
3223e8e7fc
commit
bdf905b6b4
@ -174,7 +174,7 @@ pub mod tile_mask {
|
||||
&[wgpu::ColorTargetState {
|
||||
format: COLOR_TEXTURE_FORMAT,
|
||||
blend: None,
|
||||
write_mask: wgpu::ColorWrites::empty(),
|
||||
write_mask: wgpu::ColorWrites::ALL,
|
||||
}],
|
||||
);
|
||||
}
|
||||
|
||||
@ -371,8 +371,8 @@ impl State {
|
||||
|
||||
for tile in upload.iter() {
|
||||
let new_coords = TileCoords {
|
||||
x: tile.coords.x - MUNICH_X,
|
||||
y: tile.coords.y - MUNICH_Y,
|
||||
x: tile.coords.x,
|
||||
y: tile.coords.y,
|
||||
z: tile.coords.z,
|
||||
};
|
||||
|
||||
@ -382,8 +382,8 @@ impl State {
|
||||
let uniform = TileUniform::new(
|
||||
[0.0, 0.0, 0.0, 1.0],
|
||||
[
|
||||
new_coords.x as f32 * 4096.0,
|
||||
-1.0 * new_coords.y as f32 * 4096.0, // FIXME: Improve conversion to world tile coordinates
|
||||
(new_coords.x - MUNICH_X) as f32 * 4096.0,
|
||||
-1.0 * (new_coords.y - MUNICH_Y) as f32 * 4096.0, // FIXME: Improve conversion to world tile coordinates
|
||||
],
|
||||
);
|
||||
self.queue.write_buffer(
|
||||
@ -469,7 +469,7 @@ impl State {
|
||||
|
||||
// FIXME: Improve conversion
|
||||
let world_x = x as i32 - MUNICH_X as i32;
|
||||
let world_y = y as i32 - MUNICH_Y as i32 * -1;
|
||||
let world_y = (y as i32 - MUNICH_Y as i32 + 1) * -1;
|
||||
|
||||
pass.set_pipeline(&self.render_pipeline);
|
||||
let reference = match (world_x, world_y) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user