I used the custom Render texture feature but i couldn’t get it to work while using Shader graph.
Then I found an older 2019 project, [example of custom render textures made by Tim Neville](http:// I found an 2019 - example of custom render textures). This project was made in LWRP. They used Shader Graph to make the shaders and i used this as a reference to create a shader that uses a Camera target Render Texture as a source and everything worked.
Basically the setup is two shaders, one that adds the current RenderTexture to an aggregate of previous renders and one shader that reads the texture.
You can modify first shader to get so many interesting results.
Then later I found a forum post describing a workaround that didn’t really make sense in turns of what Unity says; URP and HDRP does not work together but the workaround was to make the shader that generates the Texture based on URP. This surprisingly worked!
The reasoning seems to be the URP shader has a pass “Unnamed pass 0” that works with Custom Render Texture.
Unfortunately this workaround breaks basic functionality such as the time node so I had to update a property with the total play time. This is of course not a proper method in terms of using the features in the proper way.
Based on the testing and info I’ve gotten in past, I’m assuming CRTs just use built-in renderer to render the RT regardless if you use SRP for rest of the rendering.
Since CRT’s rendering doesn’t require SRP related shaders, you can basically write CRT shaders just like before SRPs and they work. For example snippet from Unity - Manual: Custom Render Textures should work just fine even if you use HDRP materials for displaying the generated CRT, you just can’t use HDRP shaders to render to CRT itself.
So basically you have two options here: either write the old style shaderlab code yourself that it compatible with CRT (refer to that doc page I just linked here) or use Amplify Shader Editor as it has separate CRT template that can be used to author CRT shaders.
If you want to stick with Shader Graph, then there’s no built-in option to author CRT compatible shaders while only using HDRP as like you’ve found out, none of the HDRP passes are compatible. This could potentially change in the future once Unity gets built-in target for shader graph as chances are that these passes could be CRT compatible (haven’t tested myself).
Thanks for the clarification.
In the case of Klements implementation do you think it would be possible to use HDPR custom render passes to get similar results as using CRTs and if so would it there be any benefits to go in that route?
Again thank you so much for the help!
Edit: In any case i would still need to save the previous frames and modify them, but Custom passes can use HDRP shader graphs as well.
Thanks for the tips here. A shader made with amplify is working with custom render texture and hdrp for me. The wrinkle was that globals like time, and my own shader globals, didn’t work (usually). Setting properties directly on the material worked though.