Change Color Of Texture Through Shader At Level Start and Save To Memory To Stop Shader Use
I have have texture maps for a lot of the level that need to be a certain colour, shades of actually. A green level, a blue level etc...
So I have a shader from ShaderGraph which takes the colour from a base texture I have made and uses the replace colour node. ie in the base texture the colour yellow is a wall and so I can replace the yellow with blue to get blue walls. Hope that makes sense.
This works well, but obviously this color replacement happens every frame. What would be nice is to the use the standard URP shaders / materials with the texture already colours, something that can happen as the level / scene loads before the start of play.
So, as im new to Unity, what would be the best way to alter the base texture and cache it for use only when that level is loaded.
I guess render textures generated from the shader somehow. I also don't want to have both the base texture and coloured texture in memory after wards, just the coloured texture.
Your answer
![](https://koobas.hobune.stream/wayback/20220613041100im_/https://answers.unity.com/themes/thub/images/avi.jpg)