05-09-2022, 09:26 AM
(This post was last modified: 05-09-2022, 09:27 AM by josemendez.)
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:
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,
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:
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,