This will not work because, when there is no mesh in the selection array, the outline renderer does not render anything. This means that the snapshot renderer will record a snapshot without taking the outline renderer’s output into account. When you add a mesh to the selection, it creates an inconsistency between what was recorded and the current rendering state, which causes an error. You must either add a mesh to the selection before enabling snapshot rendering, or disable snapshots, add a mesh to the selection, and then re-enable snapshots: