🌊 Ocean Shader
A stylized ocean shader for InnerSpace.
Designed to improve style and performance, the surface shading and shallow depth-transparency allow nearly all geometry below the shoreline to be hidden & culled.
Vertex colors are added near islands via a simple vertex Ambient Occlusion bake.
This bake defines the transition between the deep & shallow water shading styles, and influences the strength of the texture warping around shorelines.
These areas, and any user-defined vertex painting, are further used to clamp the water's motion, preventing geometry clipping in shallow areas.
The shader also uses a depth write pre-pass to prevent self-occluding transparency-sorting errors.
Wave motion is driven primarily by Gerstner Waves (used for the water in games like Uncharted & Dishonored, documented here) along with additional custom noise & further modifications to compensate for the spherical water surfaces of InnerSpace.
🌊 🌊 🌊 🌊 🌊 🌊