All Projects → muckSponge → Optically Realistic Water

muckSponge / Optically Realistic Water

Licence: mit
A Unity port of Martins Upitis' fantastic ocean water shader, which was originally coded in GLSL for Blender.

Labels

Projects that are alternatives of or similar to Optically Realistic Water

Proceduralcity
Unity demo that uses a few tricks to build random nice-looking 3D cities
Stars: ✭ 77 (-30.63%)
Mutual labels:  shaderlab
Iridescence
Iridescence shader
Stars: ✭ 89 (-19.82%)
Mutual labels:  shaderlab
Unitypixelartcamera
Easy pixel art camera rendering in Unity
Stars: ✭ 95 (-14.41%)
Mutual labels:  shaderlab
Openyandere
An open-source community rewrite of the game "Yandere Simulator" in C#. 2020 july 4th update (This isn't the leak guys soz.) but you may join discord https://discord.gg/e8RNBBw
Stars: ✭ 81 (-27.03%)
Mutual labels:  shaderlab
Unityvertexcolors
Stars: ✭ 86 (-22.52%)
Mutual labels:  shaderlab
Unity Basic Shader
Unity Basic Shader
Stars: ✭ 93 (-16.22%)
Mutual labels:  shaderlab
3dxrayshader unity
Surface shader. Clips a Model with given plane , applies fresnel on clipped part and highlights the cross section.
Stars: ✭ 73 (-34.23%)
Mutual labels:  shaderlab
Normal Mapping For A Triplanar Shader
Example shaders showing different methods of implementing normal mapping for triplanar shaders.
Stars: ✭ 101 (-9.01%)
Mutual labels:  shaderlab
Shadergraph examplelibrary
A library of Shaders created using Unity's Shader Graph.
Stars: ✭ 1,273 (+1046.85%)
Mutual labels:  shaderlab
Sigexam
Correction of a Shader Exam
Stars: ✭ 94 (-15.32%)
Mutual labels:  shaderlab
Temporalreprojectionexample
Temporal reprojection example for Unity
Stars: ✭ 82 (-26.13%)
Mutual labels:  shaderlab
Photosynthesizer
Unity plugin to procedurally sprout foliage throughout your scene.
Stars: ✭ 85 (-23.42%)
Mutual labels:  shaderlab
Darkandstormy
Overcast clouds with crazy colors skybox shader for Unity3d
Stars: ✭ 93 (-16.22%)
Mutual labels:  shaderlab
Unityshadercheatsheet
Collection of Unity shader copypastas and gotchas
Stars: ✭ 81 (-27.03%)
Mutual labels:  shaderlab
Smo Shaders
A collection of shaders to replicate those used in Super Mario Odyssey's Snapshot Mode.
Stars: ✭ 97 (-12.61%)
Mutual labels:  shaderlab
Se Natural Bloom Dirty Lens
(Legacy) post-processing effect for Unity.
Stars: ✭ 76 (-31.53%)
Mutual labels:  shaderlab
Uimask
Stars: ✭ 91 (-18.02%)
Mutual labels:  shaderlab
Arcadevehiclephysics
A framework for creating an arcade inspired physics system for vehicles in Unity
Stars: ✭ 103 (-7.21%)
Mutual labels:  shaderlab
Unitytoonshader
👾 Toon shader for Unity.
Stars: ✭ 99 (-10.81%)
Mutual labels:  shaderlab
Dq Skinning For Unity
Stars: ✭ 93 (-16.22%)
Mutual labels:  shaderlab

Optically Realistic Water

A Unity port of Martins Upitis' fantastic ocean water shader, which was originally coded in GLSL for Blender.

water

Contents

The shader actually consists of two parts:

  • WaterSurface.shader
  • WaterUnder.shader

WaterSurface.shader is intended to be used with the water plane and renders reflections, subsurface scattering, etc.

WaterUnder.shader must be applied to any renderers which could potentially be submerged in the water (such as the terrain, etc.).

Water.cs should be attached to the water plane and handles planar reflections and all shader parameters. It is mostly self-explanatory if you are at all familiar with Unity's existing water shader.

Just like in Martins' project, you can click and drag the sun into any position you like.

Features

  • Reflection with accurate fresnel reflectance model
  • Refraction with chromatic aberration
  • Projected caustics on geometry from the water surface based on normals
  • Seamless transition to underwater (no post effects used)
  • Accurate water volume with light scattering
  • View and light ray color extinction based on water color and sunlight

Additional features/changes

  • Refraction is masked based on depth to prevent foreground distortion artefacts
  • Normal map intensity fades out with distance to prevent excessive distortion artefacts
  • Clip plane offset depends on camera distance from water plane, which reduces artefacts when close to surface
  • Some shader calculations moved into scripts (sun colour, for example)
  • Some optimisations (much more could be done here)

Removed/unported features

  • Simple coastline detection (I didn't want this shader to rely on baked shoreline maps)
  • "Caustic fringe" effect
  • Above/below water transition droplet post effect
  • Underwater distortion (it's not a real physical phenomenon so I chose to remove it)
  • "Glitter" post effect

Limitations

Due to the required underwater shader, you may find it very difficult to adapt this to an existing project and thus it should be considered more of a prototype or proof of concept. This is also a limitation of Martins' original shader.

The shader uses forward rendering and has not been tested in deferred.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].