Search Unity

Free URP Sky Fog Implementation

Discussion in 'Assets and Asset Store' started by Weaver, Jun 20, 2021.

  1. Weaver

    Weaver

    Joined:
    Jul 2, 2013
    Posts:
    18
    Hey all, I wrote a free fog implementation for URP using Shader Graph that will fade to the skybox instead of a solid colour. You can get it here:

    https://github.com/WeaverGames/UnityURPSkyFog



    Note that it uses the Render Objects feature in the URP system which is still marked as Experimental. That likely means it will change over time. However, I noticed no issues in my simple testing with it.

    I am working on a game in which there is no ground and the sky is very complex so I couldn't use traditional terrain and scenery trickery to blend a solid fog to a complex sky. Large objects were very obviously culled by the camera view distance - so I came up with this solution.

    It works with cubemaps - however it also includes a small script I wrote to take a reflection probe and sample its cubemap into the shader and use that for the sky. The example scene in the project has it setup this way using a built in procedrual skybox.

    It's MIT License so feel free to modify. If this saves someone any amount of time that would be great. Enjoy :)
     

    Attached Files: