Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Reflections appear in play mode but not in build
#11
Attached to this post you will find a modified version of both the built-in fluid shader as well as the editor/inspector classes, that accepts a custom cubemap as input for reflections.

There's 4 files in the provided patch, this is where they should be placed in your project:

- Obi/Scripts/Fluid/Rendering/ObiFluidRenderer.cs
- Obi/Scripts/Fluid/Rendering/FluidRenderingUtils.cs
- Obi/Resources/ObiMaterials/FluidShader.shader
- Obi/Editor/Fluid/ObiFluidRendererSettingsDrawer.cs

Once you drop these files in your project, the fluid renderer will show an extra field under the "Reflections" section that accepts a cubemap as input:

[Image: 52esuv4.png]

Note: Unlike reflection probes, cubemaps aren't convolved/prefiltered, so changing the "smoothness" parameter in the fluid renderer will jump between cubemap mipmaps instead of smoothly interpolating.

let me know if I can help in any way.

kind regards,


Attached Files
.zip   CubemapFluid.zip (Size: 9.05 KB / Downloads: 5)
Reply


Messages In This Thread
RE: Reflections appear in play mode but not in build - by josemendez - 05-09-2022, 09:26 AM