After updating from URP 8.2.0 to 10.0.0-preview.26, I noticed that my custom renderer features broke for no apparent reason. I didn’t see any breaking changes in the change log so I’m kinda wondering what’s up. The simplest one that broke was blitting from the camera texture to a temp texture with an invert material (to invert the colors) then blitting back to the camera texture. Any ideas what could be wrong?
Also affects the Azure Sky renderer feature, the author of that asset has had a look and concurs it’s a breaking change on the URP side with no documentation.
Same thing, all my custom renderer features just stopped working after going from 8.2 to 10 (meaning they are enabled, there are no errors, but they have no effect). Since built-in features like SSAO and Render Objects do work, I guess there are some changes as to how renderer features have to be implemented.
Edit: quick glance at the SSAO source has not enlightened me.
The interesting thing is, even though custom renderer features do not work in the scene and game views, for some reason they still kinda work in the preview window, though not exactly how they should.
Apparently it’s not a bug. I’ve updated to 10.1, and now they have added a warning: “You can only call cameraColorTarget inside the scope of a ScriptableRenderPass. Otherwise the pipeline camera target texture might have not been created or might have already been disposed.”
So doing things like pass.Setup(renderer.cameraColorTarget) in AddRenderPasses of your scriptable renderer feature does not work anymore and camera color needs to be accessed from the pass itself. Good thing is, they have actually fixed Blit feature from Universal Rendering Examples (it’s now called DrawFullscreenFeature). I’ve grabbed it and replaced the old Blit feature in my project and voila, it worked.
So is again like using a new engine and we have to redo everything and waste million time to fix things. This is getting really out of hand, it is impossible to keep up with such radical changes happening on a such fast pace.
I hope Unity roll back those changes and make everything working again, this is the only real solution.
Or perhaps fix the issue when out of beta, as it might be because this is a not ready for release version and beta (lately betas of unity are like nowhere near beta actually)
You can only call cameraColorTarget inside the scope of a ScriptableRenderPass. Otherwise the pipeline camera target texture might have not been created or might have already been disposed.
CODE
// Here you can inject one or multiple render passes in the renderer.
// This method is called when setting up the renderer once per-camera.
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
{
renderer.EnqueuePass(_scriptablePass);
_scriptablePass.SetCameraColorTarget(renderer.cameraColorTarget);
}
I didn’t even make this renderer feature, and I’m just trying to fix it, but i don’t really understand, would you be able to elaborate please? This is the original method that’s giving the error now,
Sorry, I don’t even have a class called RenderPass in my project. This render pass I downloaded is using a script called CustomRenderPass, i can’t seem to access the ScriptableRenderer class?