I’m using the CameraWS node in the material editor and need to know which camera in the scene is being referenced as I have a spectator/mirror camera and the VR camera.
Is there a way of determining which camera is currently rendering in the material editor so I can create camera dependent shader behaviour?
Alright after a bit of testing i think i have come to a solution:
if anyone is interested this trick is possible with SceneCaptures, basically what you would have to do is disable capture very frame and capture on movement, and wrap the CaptureScene function in a custom one like so:
what i do here is basically have an MPC with a slot for an ID that i can use to identify a SceneCapture, this ID then gets briefly changed to some persistent value corresponding to the SceneCapture, and after the capture gets reset back to its default/previous value thus allowing for the game to render the object with different materials for different SceneCaptures.
Havent tested it thoroughly, so im not sure if its 100% going to work well in all scenarios, but it seems to be a somewhat working solution for now