Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OBI Fluid and transparent objects in URP
#4
(11-03-2021, 09:32 AM)EmreO Wrote: Hi Jose,

Thank you for your reply. Actually it worked, but this time the refractions gone weird.

It's like the refractions being calculated and cached once at the begining, and never updating after then, like they're static. I tried "BeforeRenderingTransparents" and "BeforeRenderingTransperents -1" and other values as well as "AfterRenderingOpaques". It seems like if the value is 451 or higher, It has correct reflections but rendered on top of all other transparent objects. If the value is 450 or lower, rendering order is correct, but the refractions become weird.

Any help would be appreciated.

Investigated this deeper.

Seems that URP updates the opaque buffer right after rendering all opaques, and then immediately starts rendering transparent objects. There's no place "in between", so you either render something together with transparent objects (and get a correct opaque buffer, this is what Obi does by default in URP), or you render together with opaque objects, before all transparent objects but have no opaque buffer available (which is your case).

The only option I see is to render other transparent objects after the fluid, but I haven't tried yet so I don't know how well this will work, or if it will cause some other issues.

Another solution could be to resort to GrabPass or custom blitting (like Obi does in the built-in pipeline) but afaik neither of these can be done in URP. The "opaque buffer" is its alternative to GrabPass, and it does not work in all cases. See:
https://forum.unity.com/threads/the-scri...ss.521473/
Reply


Messages In This Thread
RE: OBI Fluid and transparent objects in URP - by josemendez - 11-03-2021, 12:20 PM