Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a URP renderer feature affect only the current camera

I'm making a renderer feature with a single ScriptableRenderPass. This renderer feature is present on a single 2D Renderer, like so:

inspector with 2d renderer

and I have a single camera that is using this renderer, that only affects a particular layer of the camera: inspector with camera using 2d renderer

The camera only renders everything on the PixelPerfect layer, ignoring anything else. This camera is in a camera stack, like so: camera stack

But, somehow, the renderer feature on Downscaled Camera affects the Background Camera - I suspect that the render pass somehow sees everything from the previous cameras, but I have no idea how that even makes sense, as when singling out only the downscaled camera, I only see the layer that I have set the Camera to cull.

Here's how the Downscaled Camera is set-up: downscaled camera properties

I'm Blitting to the renderingData.cameraData.renderer.cameraColorTarget in Execute. I've found this post on the GameDev StackExchange, but this was before the era of URP and scriptable renderer features, but it describes my problem perfectly. Any thoughts?

like image 423
boooba Avatar asked Dec 13 '25 19:12

boooba


1 Answers

I am having a similar issue where I have selected a custom renderer on my camera, but it refuses to use my custom renderer and only uses the default. I have yet to figure out why.

EDIT: For future reference, I fixed my problem. Turns out there was no problem. The scene view (and subsequently any camera previews for cameras you have selected) will always render with the default renderer. My render target was being rendered with the correct renderer.

like image 147
Sprite101 Avatar answered Dec 16 '25 23:12

Sprite101



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!