Hello World!
I’m having a problem setting up URP for my project. I’m upgrading my Fog Of War from built-in to URP and found that it no longer works due to camera clear flags no longer supporting “Don’t Clear”, which means I’m now resorting to creating a Render Feature and shader that will do what I want. I’m almost done and trying to test my render-feature/shader but when I set the Project Settings\Graphics - Scriptable Render Pipeline Settings to my URP Asset and added my Render-Feature to my URP Asset Renderer Data settings, nothing happens. However, when I go to Project\Settings\Quality and set Render Pipeline Asset to my URP Asset my scene editor goes nuts and I can see the effect I was going for being painted onto the scene editor itself. What the heck?! I can see it doing that to my Game output, but why on earth would it mess with the rendering of my scene editor?
Please pardon my immense ignorance on the subject, I’m new to URP and have a lot to learn ahead of me, but here are a few questions:
-
Why did it blow up my scene editor? That is, why did it affect the rendering of my scene editor? It treated my scene editor as if it was the output render texture. To me that’s akin to blowing up my visual studio editor renderer; it makes no sense to me, that editor is only viewed by me, the programmer, to edit the game meta, just like the scene editor, nothing I do in the unity rendering pipeline should have any effect on the rendering of my tools, they should only affect the things my tools produce. I’m twilight zone confused, lol!
-
Obviously I must be doing something wrong. I just want to render the output of my main camera to a render texture, but do some post-processing (via Render Feature & Shader) in between. How can I set this up so it affects only that one camera and nothing else?
-
This whole thing depends of me being able to:
A) init a render texture
B) assign this render texture as an input to my shader, the other texture input being whatever the camera sees.
C) camera sends my shader output to the very same render texture.
I’m using the same render texture in order to update the previous fog of war with new info. Is this using the same render texture as input and output feasible? Doing it this way in order to simulate Don’t Clear flag.
Many thanks in advance!
Anthony
URP Asset Settings:
URP Asset Renderer Settings:
Here my URP Asset has been assigned to Project Settings\Graphics\Scriptable Render Pipeline Settings, but doesn’t seem to be in effect. I tried changing my camera renderer to my URP Asset Renderer but it doesn’t give me the option, still uses the URP High Fidelity instead:
Didn’t seem to work so I assign my URP Asset to Project Settings\Quality\Render Pipeline Asset (which has the effect of assigning it to my camera as well by default), and my editor blows up! Looks like my shader is being applied to the Scene Editor itself! :
My Shader:
FOW Shader.shadergraph.zip (5.5 KB)



