I’m trying to make an in-world mirror that only shows a specific layer (the player model) and is otherwise transparent. I’m doing the classic approach for a mirror: a camera that copies the player view’s position but mirrored across a plane, renders to a render texture, and displays that render texture on the said plane.
In general I’d be able to make only the single layer show up on the plane and make the background transparent by making the camera clear to transparent black (I’ve done this successfully before) but this time around I’m working with a game that essentially uses the alpha channel for bloom so my usual approach doesn’t work; the alpha channel doesn’t contain the opacity so I’m not able to use it as the blend factor in the plane material’s shader. The only way I’ve managed to get a similar effect is to use a chroma key set to the camera clear color but that’s obviously not as nice since I have to deal with color spill.
Is there any way I could get the camera to render the one layer on top of a transparent background when shaders aren’t writing the opacity to the alpha channel? Maybe there’s another way to do this altogether? I’m happy to provide some code and/or a sample project if it helps, I’d just have to take some time to extract the specific things I’m talking about here.