diff --git a/src/layers/cctv/render/navaraMeshes.js b/src/layers/cctv/render/navaraMeshes.js index c1d1a26b1..b2b0a42e0 100644 --- a/src/layers/cctv/render/navaraMeshes.js +++ b/src/layers/cctv/render/navaraMeshes.js @@ -46,8 +46,12 @@ export function createCctvNavaraMeshes(engine, { view, MeshDesc }) { super(owner, ctx, config); this.cctv = config[KIND]; } + // The opaque scene draws after the scene depth is copied into its + // target, so walls and terrain hide the frame and volume; Navara's + // transparent pass runs after the effects without that depth and + // painted them through (scripts/qa-edge-cctv-occlusion.mjs). getPassKey() { - return 'transparent'; + return 'opaque'; } createMesh() { return this.cctv.group; diff --git a/src/layers/cctv/render/navaraMeshes.test.mjs b/src/layers/cctv/render/navaraMeshes.test.mjs index aaec1a2dc..fadb504fc 100644 --- a/src/layers/cctv/render/navaraMeshes.test.mjs +++ b/src/layers/cctv/render/navaraMeshes.test.mjs @@ -28,7 +28,8 @@ function harness() { } const kind = Object.keys(config)[0]; const desc = new (kinds.get(kind))(view, {}, config); - assert.equal(desc.getPassKey(), 'transparent'); + // Depth-tested against the scene: the frame must not paint through walls. + assert.equal(desc.getPassKey(), 'opaque'); const object = desc.createMesh(); scene.add(object); const handle = {