Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi URP + HDR
#2
(25-09-2023, 12:19 PM)Voolg Wrote: Hello,

On URP, if I enable HDR for my camera, then the fluids always render on top of any transparent material (eg a glass window).

Is there any workaround for this?

Also weirdly, the scene camera (editor) properly renders Obi fluids behind transparent objects, even though I suppose it has HDR enabled (since it renders bloom properly)

Hi!

I'm unable to reproduce this, never had a similar report either. What URP version are you using?

In URP, fluids are rendered using a RendererFeature, which injects fluid rendering at a specific point during the render loop using RenderPassEvent. You can open up
Obi/Scripts/Fluid/Rendering/URP/ObiFluidRendererFeature.cs and change the RenderPassEvent for all fluid rendering passes to one of your choice (lines 30-42 in the script), the default is RenderPassEvent.BeforeRenderingTransparents +1.

Note that fluids (and transparent particle systems in general) won't be accurately drawn around other transparent objects, since Unity only allows to sort objects back to front. Proper rendering would require to sort fluid particles and object triangles together which is not possible.

kind regards,
Reply


Messages In This Thread
Obi URP + HDR - by Voolg - 25-09-2023, 12:19 PM
RE: Obi URP + HDR - by josemendez - 26-09-2023, 07:08 AM
RE: Obi URP + HDR - by Voolg - 26-09-2023, 08:06 AM