Author Topic: Line Renderer Support?  (Read 236 times)

Trey Hayden

  • Guest
Line Renderer Support?
« on: February 23, 2021, 01:51:06 PM »
Hey there!  The new SSRR library seems to have a strange time handling Line Renderers (see below). 



The reflected angle seems to be off and doesn't display properly.  Would like to leave a nice review on the Asset Store, hopeful that this is a quick solution.

Thanks!
-Trey

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7103
    • View Profile
Re: Line Renderer Support?
« Reply #1 on: February 24, 2021, 11:51:56 AM »
Hi Trey,

This is a limitation of all SSRR with transparent materials. The workaround is to make the effect render before transparent objects.
Go to Global Settings and change this option:


Screen Space Raytraced Reflection performs a depth-buffer raytracing. Since transparent objects do not write to this buffer, the reflection you see on the floor is actually the line render color on the wall reflected on the ground.

Regards
« Last Edit: February 24, 2021, 12:36:02 PM by Kronnect »

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7103
    • View Profile
Re: Line Renderer Support?
« Reply #2 on: February 24, 2021, 01:17:15 PM »
Using a tweaked transparent shader that also renders to depth can also work. Try the attached material/shader.
Note that this is a "trick" and could not be perfect but it could be a workaround for this case.
This one if for URP. For built-in, see a few posts below.
« Last Edit: June 06, 2021, 06:22:33 PM by Kronnect »

TreyH

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Line Renderer Support?
« Reply #3 on: February 25, 2021, 02:41:15 PM »
Oh I had no idea, reading around and that does seem to be a known limitation.

Thanks for the info and help with workarounds!

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7103
    • View Profile
Re: Line Renderer Support?
« Reply #4 on: February 25, 2021, 02:52:59 PM »
Yes, by design, as with any post effect that relies on depth buffer: fog, etc. Anything like that requires special treatment. Usually it's not a big issue or a workaround can be implemented.
We're experimenting with reusing the last frame as an option so anything in the scene could be reflected.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7103
    • View Profile
Re: Line Renderer Support?
« Reply #5 on: February 25, 2021, 03:15:11 PM »

Charles

  • Guest
Re: Line Renderer Support?
« Reply #6 on: June 06, 2021, 10:07:56 AM »
Hi there,

May I ask you some help for this? We are facing the same issue, but this shader is for URP. We would need this for built-in. Is there any chance you have a version of this transparent shader with Z- buffer for built-in, please?

Thank you!
Charles

Using a tweaked transparent shader that also renders to depth can also work. Try the attached material/shader.
Note that this is a "trick" and could not be perfect but it could be a workaround for this case.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7103
    • View Profile
Re: Line Renderer Support?
« Reply #7 on: June 06, 2021, 06:22:12 PM »
Attached for built-in pipeline.

You can assign a texture or color. Use the Clipping material property to define the cutoff threshold.