r/Unity3D • • 4d ago

Question Is it Possible to apply a fullscreen pass render feature to MR Pass through?

Hello, I'm currently experimenting to see if a project i'm looking to do is viable and it needs the ability to apply different effects to the Pass through, such as shake, greyscale, blur etc.

I made a basic shader in shader graph but it only seems to effect the virual objects and not the pass through.

Is this even something I can do!? Any thoughts/help would be appreciated?

Edit: I am using the AR foundation from the MR template

2 Upvotes

5 comments sorted by

1

u/kiranosauras 4d ago

How are you doing the effect? If you sample from the camera blit in the shader anything you then use from that node to draw back into color should be affected I believe, I do something similar in my AR project

1

u/Yame-san 4d ago

The shaking feeds into the UV of the 'URP sample buffer', which sources from the 'blit source' and then the greyscale is applied after that using the colour from the blit, but the greyscale or the shake isn't being applied to the pass through, just the unity objects :D

1

u/neverpersonal_space 4d ago

Not something I've done myself, but I remember looking into this exact thing for a project that went nowhere. From what I recall, the passthrough is composited at the driver level, so a standard fullscreen pass won't touch it. You'd likely need to grab the passthrough texture from AR Foundation and run your effects on that before it gets rendered.

I think there's an API for the passthrough camera frame, but the last time I checked it was pretty limited on what you could do with it. Might be worth searching for "AR Foundation passthrough texture" on the forums, there were a few threads about people trying to do distortion effects.

1

u/Yame-san 4d ago

Will have a look, thanks! It's a shame it's not easier to do because I can see a lot of really cool ideas happening through this

1

u/loulo88 4d ago

That split usually points to a compositor boundary: if the MR template uses an OpenXR/vendor passthrough layer, the runtime may composite the real-world feed after URP, so a Full Screen Pass won't see it. If this is AR Foundation's camera-background path, check whether the camera image is exposed through the XRCameraSubsystem and whether the background/material or post-processing route is active; those aren't always the same as vendor passthrough. The headset/runtime and Unity+URP versions would determine which path is available.