Search Unity

Creating simple reflections that doesn't KILL FPS?

Discussion in 'General Graphics' started by QbAnYtO, Aug 21, 2020.

  1. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    223
    So I am trying different ways to create a simple reflection on a window. about the size of a door.

    reflection probes kill my FPS (from the 100's to like 15-20fps)
    I tried using a water shader with planar reflections and setting it to 0 waves 0 ripples (basically looks like ice).
    I've also tried using a plugin that uses a camera system but doesn't work when incorporating cinemachine to my game.

    But is there another way for this? using the regular built in pipeline?
     
  2. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    reflection probes are gonna be pretty fast. Basically just one texture read. Maybe it is because the reflection probes are breaking your batches.
     
    liam_unity628 likes this.
  3. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    223
    I’m am not sure I understanding the reflection probe setting I even reduced the reflection distance from 1000 to 40. And the resolution to 256 and it’s still hogging down the FPS. Mind you this is for a constantly reflecting mirror. Not just on wake. No time slicing

     
  4. Oxeren

    Oxeren

    Joined:
    Aug 14, 2013
    Posts:
    121
    So you use realtime reflection probes that refresh every frame? I haven't done any testing with them, but as I understand it, these are extremely expensive, since to build a cubemap reflection probe has to basically render six views (once for each side of the cubemap). And doing so for every reflection probe every frame... yeah...
    Using planar reflections with a secondary camera is the way to go I think. I'm not sure what was the problem with incorporating it with cinemachine, but I think it should not be very hard to fix.
     
  5. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    223
    Yea I use the cubemap :p
    i will keep trying with frozen water lmao

     
  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    You should use planar reflections for flat surfaces. Reflection probes are for capturing the surroundings in all directions, and are quite expensive when the reflection is updated in real time.
     
  7. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    223
    Yea that seems to be the case. Thanks again guys.