[RELEASED] Lux Water

Lux Water is a simple yet robust solution to render water surfaces, which is focused on giving you reliable results as far as refraction, reflection and lighting are concerned.

Rendering Features

  • Physically based shading including subsurface scattering
  • Dual depth based color absorption
  • Dual depth based underwater fog
  • High precision refraction
  • Cube map based and real time planar reflections
  • Real time lit screen space caustics – no projectors are harmed. (Caustics currently work best using deferred rendering)
  • Dynamic shoreline foam
  • Simple Gerstner waves and dynamic foam caps
  • Water volumes which allow you to create smooth transitions between above and below water surface rendering
  • Water projectors which allow you to add local foam as well as local normals (and displacement)
  • Tessellation and projected displacement
  • Support for orthographic cameras
  • Deep water rendering

Compatibility

Lux Water has been successfully tested on DX11, OpenGLCore and Metal.
Lux Water supports forward and deferred rendering, but it looks best using deferred.

Resources

Asset Store | Documentation

8 Likes

Awesome water shader!
Infinite customizations … a must have!

Super cool!


5 Likes

Hey Lars,
are you planning to support HD Render Pipeline?
I’m imagining how beautiful would be add this water to the new Book of Dead Environment asset.

indeed, that looks super cool!

some day maybe, when it is out of preview – or at least a bit more stable.

1 Like

btw: which features do you actually use?
i think i see some very subtle gerstner waves – great job!
cubemap reflections? or planar?
and the coloring of the water is super nice. maybe just a little bit too strong (some less/later color absorption?) but it looks fantastic.

Hey Lars,
I played ( it was a month agoo i think )a bit with all settings but at last I used probe reflections and i tried to find a good settings to simulate the water shore with small waves as you said.
Yes the color is quite exagerate (maybe also due post processing) but for a very few minute of testing i was very satisfied of LUX Water.
I think you need a little but very detailed (texture and models) scene and more image amd videos to show how good Lux Water is.
I’m surprised to not see other comment here.
Monday morning i will post more detail about the used settings.

Awesome caustics and view depth! :wink:

7 Likes

Any chance we could get compatibility with Aura?

This is how Lux Water looks out of the box with Aura enabled. In my opinion, it looks pretty bad. Every other piece of geometry will be affected by Aura, leaving a strong and unnatural look against the water:


And this is how it looks when changing the Render Queue to 2500:

In the second image, the water is basically invisible, except for the light reflections. I’ve tweaked all of the settings and couldn’t make it work.

Here’s another angle. It’s impossible to tell where the water is:

Edit: I see that as long as I have a strong enough light source, the water will show. If there’s no light, then you won’t be able to tell there’s water. Could there be a way to adjust how opaque water is?

actually i have no how idea, how you think it should look like.
so maybe you can add a simple plane to your scene which uses the standard shader set to render mode = transparent and tweak its opacity?
and i am not sure about what i see on your screen shoots. what are these white bars? why do the glow even if they point away from the light sources?

the visual fidelity of water heavily depends on reflections (ambient and direct lighting). no light, no water.
like with any other material.

you control the opacity by adjusting the “underwater fog” and “light absorption”.

1 Like

HI Lars,
what’s next?
I can’t wait to see more feature coming to this beautiful water shader.

Something like:

  • Buoyancy
  • Splash on collision/interaction/trails
  • Underwater FX
  • Underwater caustic projection

Underwater FX

1 Like

Awesome new river setup (1.01 update)

9 Likes

nice!

Could anyone post some underwater pictures with this water?

Regards,
Carlos

right now only the underwater water surface is rendered :frowning:
i am working on underwater rendering, but this will probably take some more time.#

[edit] wip

3579261--289250--underwater.jpg

3579261--289251--underwater1.jpg

2 Likes

that looks pretty awesome! My game is in iOs, Android, Xbox One and I use Forward rendering path, does this shader work on the mobile platform and Forward?

I will only need the underwater part of this water, I see you have a brown like fog in these picture, can that be tinted to a more tropical blue color instead? and finally, I usually work with the fog from the lighting panel in unity; is the fog in your picture from the shader or I can use the fog mentioned above?

Regards,
Carlos

hi there,

the shader supports forward (itself runs in forward of course) – but screen space caustics do not look that nice in forward right now… https://docs.google.com/document/d/1NDtUpVBgd3UYEI8LRNI4teFF3qm38h-u3Az-ozaaOX0/edit#heading=h.keck6twhaqe3

if have tested in on dx11, metal (os x 10.11.6) and opengl core. i did not test it on any mobile device. it might be a bit heavy if you turn on all options. but you may give it a go and we will see what has to be optimized/made optional to make it run on mobile.

this part is still wip. but you may ask for some kind of beta access.

yes. please have a look at the docs: https://docs.google.com/document/d/1NDtUpVBgd3UYEI8LRNI4teFF3qm38h-u3Az-ozaaOX0/edit#heading=h.thm2k7ru0z0b

3580005--289368--00_variation.jpg

in forward fog is rendered per pixel right when the geometry is rendered to screen. so you can’t add custom fog just to the parts below the water surface :frowning: one would have to add fog as image effect – just like in deferred.

in deferred we can mask the standard fog so it gets only rendered above the surface and apply custom fog just for the underwater (white fog is built in, water has dark brown fog (muddy water)) – right now this is accomplished using two image effects but it should be possible to join both effects into one.

3580005--289366--fog.jpg

So is underwater fog fx or even the bottom of the ocean shader usable in this version (like the image in your post?)
I currently need to dive in as a transition. But not a full fledged underwater solution. (underwater is a different setup for me)