Search Unity

Creating a Fog-of-War like shader/system in URP

Discussion in 'Universal Render Pipeline' started by Skotrap7, May 3, 2022.

  1. Skotrap7

    Skotrap7

    Joined:
    May 24, 2018
    Posts:
    125
    I am trying to make a fog of war like shader/system in URP. I posted this on the Android forum because it is critical for me that this is Android friendly, and I have made some progress on my own, but I'm really pushing my limits on knowledge and understanding here with the render features and shaders. If anyone takes a look at this thread, and has any opinions, feedback, suggestions, or otherwise, I would greatly appreciate the help.

    Android friendly fog-of-war-like shader/system - Unity Forum

    Thanks in advance!
     
  2. Matt-Cranktrain

    Matt-Cranktrain

    Joined:
    Sep 10, 2013
    Posts:
    129
    @eizenhorn recently posted about his solution to this in a thread over here. Perhaps he'll be kind enough to chime in with a few extra implementation details about his shader work!
     
  3. Skotrap7

    Skotrap7

    Joined:
    May 24, 2018
    Posts:
    125
    Came back to bump this. My linked solution above is having issues on Android where the "fog" flickers in and out pretty bad. I don't think I know enough about the render features to do any better. Still looking for some help if anyone has any advice. For now, I'm just going to save the render texture output of the camera to a texture2d and set that as the texture on the plane's material.
     
  4. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Which device? Are you on GLES or Vulkan?
     
  5. Skotrap7

    Skotrap7

    Joined:
    May 24, 2018
    Posts:
    125
    Test device was a OnePlus Nord N10 (BE2028). I don't see it on the list of supported GPUs for Vulkan, so I'm going to guess its OpenGL.