Search Unity

Equivalent of Camera.layerCullDistances for reflection probes?

Discussion in 'General Graphics' started by sparrowsion, Aug 1, 2020.

  1. sparrowsion

    sparrowsion

    Joined:
    Mar 3, 2019
    Posts:
    8
    The problem I'm trying to solve is this: I'm generating random/procedural islands in an ocean of WaterPro which reflects the landscape and any details on it. The more details I have, the worse the performance. I'd already noticed the same effect on the main camera, so put the details and landscape on separate layers, and by setting
    Camera.main.layerCullDistances
    to have a much closer cull plain for details got a big performance boost while still being able to see islands at a distance at which the details would be invisible anyway.

    I strongly suspect the same thing is going on with the WaterPro reflection probes. With lots of details, performance takes a real hit, but can be restored by taking the detail layer out of the
    Water
    reflection layers mask. But that of course means you don't see any reflections of the detail objects, which looks weird.

    So what I want to do is apply the same layer mask to the WaterPro reflection probes as I have on
    Camera.main
    . But I can't see any way of doing that.