![]() |
Bug / Crash Shader Error in Obi Fluid 7.0.4 with Unity 2023.1.3f1 (URP 2D) - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Bug / Crash Shader Error in Obi Fluid 7.0.4 with Unity 2023.1.3f1 (URP 2D) (/thread-4453.html) |
Shader Error in Obi Fluid 7.0.4 with Unity 2023.1.3f1 (URP 2D) - robertye - 25-02-2025 Hi, I am using Obi Fluid 7.0.4 in Unity 2023.1.3f1 with Universal 2D, and I encountered the following error message: Code: Shader error in 'Shader Graphs/IndirectTransparent': 'OUTPUT_SH': Too few arguments to a macro call. This causes the transparent fluid to not display correctly. If I comment out the code, the fluid seems to display correctly, but something appears to be missing. However, in the RollingFriction example, the stone becomes invisible after commenting it out. Before commenting: After commenting: Any insights or solutions would be greatly appreciated. Thank you! RE: Shader Error in Obi Fluid 7.0.4 with Unity 2023.1.3f1 (URP 2D) - josemendez - 25-02-2025 (Yesterday, 09:43 AM)robertye Wrote: Hi, 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/manual/7.0/particlerendering.html let me know if I can be of further help, kind regards, |