I have a project w/ 3 cameras
The 1st camera is for the main menu, has scenes and post processing on it (bloom, fxaa, vignette, and LUT found here: PlayCanvas 3D HTML5 Game Engine ). Once the play button is pressed, it is disabled and the gameplay camera is enabled.
The gameplay camera has post processing (fxaa, blend, vignette, and the LUT). The game plays and then gets to the end screen. The gameplay camera is turned off and the end scene camera is turned on.
The end scene camera has the same post processing as the main menu camera.
Once play again is pressed, the end scene camera is turned off and the gameplay camera is turned back on. Turning the camera back on causes a crash:
[playcanvas.min.js?version=1.51.5:6]: Uncaught TypeError: Cannot read properties of undefined (reading 'width')
TypeError: Cannot read properties of undefined (reading 'width')
at t.get (https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.min.js?version=1.51.5:6:368967)
at e.i.initRenderTarget (https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.min.js?version=1.51.5:6:338578)
at e.i.updateBegin (https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.min.js?version=1.51.5:6:340361)
at Object.Fs [as drawFullscreenQuad] (https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.min.js?version=1.51.5:6:374772)
at VignetteEffect.render (https://launch.playcanvas.com/api/assets/files/PostEffects/posteffect-vignette.js?id=65664227&branchId=65004c90-f4bd-4f4b-8dc2-a5aacc82f1c5:69:12)
at enabled.effects.length.camera.onPostprocessing (https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.min.js?version=1.51.5:6:841546)
at t.e.renderComposition (https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.min.js?version=1.51.5:6:473654)
at i.n.render (https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.min.js?version=1.51.5:6:1178794)
at https://launch.playcanvas.com/editor/scene/js/engine/playcanvas.min.js?version=1.51.5:6:1188783
At first I noticed that it was the vignette post effect, so I disabled it all together and the crash still happens but with a different effect. So I disabled all effects and turned one on, disabled the camera, enabled the camera and it worked fine (did this for each effect). So then I thought it was a combination of specific effects, it turns out that it doesn’t matter which 2 effects are on but if it is more than one post processing effect it always crashes.
The gameplay camera starts the game turned off. It is only when it is re-enabled does it crash.
All cameras are priority 1