Search Unity

Road Mirage Shader?

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

  1. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    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,343
    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.