Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Road Mirage Shader?

Discussion in 'Shaders' started by MikeUpchat, Apr 19, 2021.

  1. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,055
    Does anyone know how to make a road mirage shader to get effects like:

    Tried with Screen Space reflections but couldn't seem to get anything close.
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,263
    Mirages are an extremely non-trivial effect to reproduce with real time rendering. However screen space reflections are probably your best bet. The trick is going to be you'd need a custom shader on your road that uses a harsh cutoff Fresnel to modify the material properties from the rough dielectric road to a less rough metallic surface, like a lumpy chrome. Maybe with the normal being calculated from an animated noise function, though it might be better to implement that more as a post process "fog" effect since everything in the distance on a hot day has that shimmery look.