sPerRow = (depthTexture.width * 4 + 255) & ~0xff;
    const bufferSize = 4 * depthTexture.width * depthTexture.height;

    const tempBuffer = device.createBuffer({
      size: bufferSize,
      usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ
    });

    commandEncoder2.copyTextureToBuffer(
      { texture: dst, mipLevel: 0, origin: { x: 0, y: 0, z: 0 } },
      { buffer: tempBuffer, bytesPerRow },
      { width: depthTexture.width, height: depthTexture.height, depthOrArrayLayers: 1 }
