Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Shader Error in Obi Fluid 7.0.4 with Unity 2023.1.3f1 (URP 2D)
#2
(Yesterday, 09:43 AM)robertye Wrote: Hi,

I am using Obi Fluid 7.0.4 in Unity 2023.1.3f1 with Universal 2D, and I encountered the following error message:

2D lighting is not supported by Obi, the reason is simple: Obi fluids are not sprites so they won't receive 2D lighting. Let me know if you need a refund because of this.

URP's 2D renderer bases its entire lighting pipeline on sprites, using very different lighting/shadowing methods compared to regular 3D lighting.

(Yesterday, 09:43 AM)robertye Wrote: the fluid seems to display correctly, but something appears to be missing.

Commenting out the OUTPUT_SH line will yield usable rendering, albeit with no ambient lighting whatsoever.

(Yesterday, 09:43 AM)robertye Wrote: However, in the RollingFriction example, the stone becomes invisible after commenting it out.

The OUTPUT_SH line only affects fluid ambient lighting when using spherical harmonics. Stones (granulars) don't use the fluid renderer or any of its shaders, it makes no sense for them to disappear after commenting the above line as it's entirely unused. Maybe you're using the compute backend? keep in mind that instanced particle rendering requires using a different shader for Compute and Burst backends. That particular sample scene is set up for using the Burst backend, if you switch to compute rocks will become invisible unless you use a material that supports GPU instancing. See: https://obi.virtualmethodstudio.com/manu...ering.html

let me know if I can be of further help,

kind regards,
Reply


Messages In This Thread
RE: Shader Error in Obi Fluid 7.0.4 with Unity 2023.1.3f1 (URP 2D) - by josemendez - Yesterday, 10:26 AM