Search Unity

Question [HDRP SSR] How to stop an object produce SSR on surfaces

Discussion in 'High Definition Render Pipeline' started by skinwalker, Feb 5, 2021.

  1. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Hello,

    I have an object with a new shader that has a high amount of glow, Im using SSR and this object is reflected very heavily on all kind of surfaces, I'd like to stop that, but I can't find an option to choose which layers to affect like in Reflection Probes. If there is a way to stop this object being reflected through it's shader I would also like to know how to do it.

    Thanks
     
  2. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Check your HDRP material on the object you don't want to receive SSR. It has "Receives SSR" checkbox which you can toggle for each material separately. You can't toggle this on/off by layers, only by materials.
     
  3. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    I'm not sure if this is the right thing to add because I want my material to stop producing SSR.

    I want my surfaces to receive SSR from everything except a specific object..
     
    Last edited: Feb 5, 2021
  4. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Anyone?
     
  5. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    765
    Since SSR is a screen space effect you can't really pick what you want in the reflection or not. You can only chose which surface receives it.
    What you want is totally possible using layer mask in Ray traced reflection on the other hand.
     
  6. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    As a side note, there could be better ways to solve the original issue but it's quite hard to suggest anything without seeing the actual issue on a screenshot etc.
     
  7. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Hello,

    Here you can see the issue. The character is using my custom hologram shader which has glow, all of the space ship materials are suppose to reflect everything, but in that case the hologram is just way too much.

     
  8. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    If there is a way to modify my shader so it's not used by SSR then it would also help
     
  9. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Do you need Transparent SSR? If you are using new enough HDRP to support this option, you could just make sure your holographic shader is using transparent surface option and then make sure transparent SSR is off, pretty sure HDRP should neglect the tranparent objects on opaque SSR then.

    Edit: like pointed below transparent SSR has nothing to do with this. So basically you could just use transparent surface option for the thing you don't want to show up on SSR effects if that's acceptable for you.
     
    Last edited: Feb 10, 2021
    Camarent likes this.
  10. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    765
    Screen Space Reflection won't include transparent objects that are in the default rendering pass (only the one that are before refraction are in the color buffer) so this could work but you will lose a lot of the benefit of using an opaque object too.

    However, while the workaround could work in a way, I'd like to clarify that even though the naming can be confusing, Transparent SSR is not about reflecting transparent objects in Screen Space Reflection.
    Enabling it (in the HDRP asset) will allow transparent objects to receive Screen Space Reflection, that's all.
    The reflections itself is not supposed to change in any way, only the type of object that can receive it.
     
    Beennn, fuzzy3d and rz_0lento like this.
  11. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    This is a good point, I have no idea how I came to other conclusion :D
     
    chap-unity likes this.
  12. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    765
    I would agree that the wording of the variable doesn't emphasis enough on that to prevent this confusion.
     
  13. Genebris

    Genebris

    Joined:
    Mar 18, 2013
    Posts:
    144
    I'm thinking, is it possible to render objects with custom opaque pass to have them excluded from ssr? Any particular requirements for this pass?