From b127501c52f89aaac3778f41f78d2aae24ea1aa0 Mon Sep 17 00:00:00 2001 From: medievalshell Date: Fri, 29 May 2026 00:45:05 +0200 Subject: [PATCH] fix: restore room-background Z transparency after branding offsetZ change FurnitureBrandedImageVisualization now adds offsetZ to the branded layer (z-index for the MPU/billboard editor). The room background uses offsetZ as an inverse depth push (the 'play with Z to hide floor/walls' trick); its getLayerZOffset subtracted offsetZ assuming the parent did not add it, so the two cancelled out and the effect was lost. Cancel the parent's +offsetZ for the branded layer to restore the original net (base - offsetZ). --- .../furniture/FurnitureRoomBackgroundVisualization.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/room/src/object/visualization/furniture/FurnitureRoomBackgroundVisualization.ts b/packages/room/src/object/visualization/furniture/FurnitureRoomBackgroundVisualization.ts index 558a6db..a2c0d39 100644 --- a/packages/room/src/object/visualization/furniture/FurnitureRoomBackgroundVisualization.ts +++ b/packages/room/src/object/visualization/furniture/FurnitureRoomBackgroundVisualization.ts @@ -76,6 +76,12 @@ export class FurnitureRoomBackgroundVisualization extends FurnitureBrandedImageV if(this.getLayerTag(scale, direction, layerId) === FurnitureBrandedImageVisualization.BRANDED_IMAGE) { + // The parent (FurnitureBrandedImageVisualization) now ADDS offsetZ to the + // branded layer as a z-index (for the MPU/billboard editor). The room + // background instead uses offsetZ as an INVERSE depth push — the classic + // "play with Z to make the floor/walls go transparent" trick — so cancel + // the parent's +offsetZ to restore the original net (base - offsetZ). + zOffset += (-(this._offsetZ)); zOffset += FurnitureRoomBackgroundVisualization.BRANDED_IMAGE_LAYER_DEPTH_BIAS; }