Search Unity

Planar reflections and inverted distance fog

Discussion in 'Shaders' started by Shapefarm, Jan 15, 2015.

  1. Shapefarm

    Shapefarm

    Joined:
    Dec 10, 2014
    Posts:
    17
    Hey guys,
    I've got a little problem here with a reflective surface. We're making a game called Vane with a very big open world. There's a scene where we have a total reflective surface using Aras's planar reflection script. Problem is: Structures in the distance don't get any fog, making the reflection look really strange. The fog in the reflection is based (ofc) on the camera rendering the reflection pass so in the reflection our main cameras distance fog becomes height fog.

    I'm attaching an image from Evil Tak's reflection scene to highlight the problem. I can't post anything from the game just yet, but i'll do that in a week or two.



    Any ideas of how to solve this? We did a really ugly solution rendering a half transparent plane masked in the main camera. Works, and looks fine, but it's very limited to few carefully composed angles and adding more overdraw to the already heavy reflection feels like a very bad thing to do.

    Thanks in advance!