Changing properties of a CustomRenderTexture.material, saves those changes to the material asset in the project.
This is very unfortunate in my case, because every time I press Play in the editor, the game modifies properties of the CustomRenderTexture.material and I end up with various material changes in git, that should take place in-memory only.
I guess a workaround would be to instantiate the CustomRenderTexture.material at runtime and work on the in-memory duplicate instead. But this “issue” must be so common, that I’m afraid I must miss something very obvious in the API to not modify the project material asset.
I hoped there would be a [NonSerialized] shader attribute, but that’s not the case.
How do you change CustomRenderTexture.material properties without modifying the material asset in the project?