sebastianhein / urp_kawase_blur

URP renderfeature test project
421 stars 76 forks source link

Warning spam when using Camera.Render #13

Open lordubbe opened 1 year ago

lordubbe commented 1 year ago

I experienced heavy warning spam when using Camera.Render in a separate, unrelated system: 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.

However, this is easily fixed by not accessing ScriptableRenderer.cameraColorTarget in ScriptableRenderPass.AddRenderPasses, and instead moving it to OnCameraSetup. I've added a Pull Request that implements this solution: https://github.com/sebastianhein/urp_kawase_blur/pull/12