I'm currently trying to pull a fog of war for an rts game, and planned it like this. (Unity 2020.2.7, URP 10.3.1)
- Use units field of view to generate a texture of what is seen (alpha 0).
- Create other render texture to generate fog (alpha > 0 && alpha < 1) by not clearing camera buffer.
- Use the mask made between the two textures to cut the fog of war (alpha 1).
Now i'm currently stuck at the 2nd step. Please check the image
As you can see, the camera is doing what I want, but the render texture somehow clears the buffer, which just gives me the "Use units field of view to generate a texture of what is seen (alpha 0)." part again.
This whole buffer thing has been hard to understand, i'm not sure if this implementation is right or not. I would be really thankful for any pointers given! :D
Cheers guys!