ShoreLine: Stylized Water for URP (Mobile & Desktop)
One seamless mesh, made by the included Create Water Mesh window ... MOBILE AND QUALITY ... DEMO An island with a beach, rocks, a lagoon, an ocean and a pier with one pool per preset
by hardartcore
Price History +
• Unity 6000.0+, URP 17.0+ (Render Graph), Universal Renderer, Forward and Forward+
• Shader: "HardArtcore/ShoreLine", one transparent forward pass, SRP Batcher compatible
• Features as per-material keywords (shader_feature): waves, Shallow Water Damping, intersection foam, surface foam, shore waves, refraction, caustics, reflections, received shadows
• Renderer feature: requests the depth texture, the opaque texture only while a water material refracts, and draws the Surface Effects buffer only while a source is active
• Tested on Android: OpenGL ES 3 (OnePlus 3T) and Vulkan (Pixel 7 Pro); compiles for Direct3D 11 and Metal
• Assemblies: HardArtcore.ShoreLine, HardArtcore.ShoreLine.Editor
• 143 EditMode tests: CPU/GPU wave parity, render tests in perspective and orthographic, setup and quality checks
• Includes full C# and HLSL source and documentation
Stylized water for Unity URP, built for phones first.
ShoreLine is a hand-written URP shader with everything a stylized game needs: water that changes colour with depth, foam lines where it touches rocks and the shore, foam bands rolling up the beach, Gerstner waves, caustics, refraction and reflections. Waves calm down by themselves in shallow water, and an Ocean Mode carries the sea to the horizon.
It was tuned on real phones, a 2016 OnePlus 3T and a Pixel 7 Pro, into three quality tiers. Every feature is a per-material toggle, so what you switch off costs nothing and is stripped from your build. The CPU knows the waves too: float boats and place props with height queries that match the screen.
WATER
• Depth colour: shallow and deep colours by real water depth, plus a horizon colour at grazing angles
• Intersection foam where objects and the shore touch the water, with soft edges
• Shore waves: foam bands that roll toward the beach, from the water depth alone (no masks to paint)
• Surface foam on open water, with extra foam on wave crests
• Caustics, refraction (objects in front never bleed in), reflections, received shadows, sun glint
• Edge fade where the water meets objects
WAVES
• Up to 4 Gerstner waves, normalised so the surface never folds over
• Shallow Water Damping: waves calm down in shallow water, read from the depth texture in the vertex shader
• Distance fade, and renderer bounds that grow with the waves so water never pops out at the screen edges
OCEAN MODE
• A fine grid follows the camera, snapped so the waves never swim, with a ring out to the horizon
• One seamless mesh, made by the included Create Water Mesh window
• Per-pixel fog that stays correct on kilometre-long ring triangles
MOBILE AND QUALITY
• Low, Medium and High tiers, each a set of features you can apply to any material
• Pixel 7 Pro (Vulkan, 3120x1440): 60 fps on every tier with the water covering the screen
• OnePlus 3T (OpenGL ES 3, 2016): Low holds 60 fps until the phone throttles; Medium averages 37 fps sustained at 1080p
• Works without the depth or opaque texture too: depth effects read as deep water, refraction falls back to transparency, never black or pink
FOR PROGRAMMERS
• SampleHeight: the water's height anywhere, from the same Gerstner math as the shader; pass the water depth to include Shallow Water Damping (distance fade and Surface Effects are GPU only)
• Surface Effects API: draw ripples, wakes and foam into the water from your own scripts and shaders
• Reusable HLSL includes for depth, waves, foam, lighting, refraction and caustics
• Clean C# in assembly definitions, one URP renderer feature (Render Graph), 143 automated EditMode tests
DEMO
• An island with a beach, rocks, a lagoon, an ocean and a pier with one pool per preset
• Touch controls (orbit, pinch, pan), viewpoint buttons and live Low / Medium / High switching with an fps readout
IN THE BOX
• The shader with a custom material inspector and a one-click renderer setup
• 5 presets (Tropical, Lake, Swamp, Pool, Toon) and Low / Medium / High defaults
• Generated, seamlessly tiling normal, foam and caustics textures
• Create Water Mesh window, Water Surface component, demo scene, documentation
REQUIREMENTS
• Unity 6 (6000.0) or newer, tested on 6000.0, 6000.3 and 6000.6
• Universal Render Pipeline 17+ with a Universal Renderer (Forward or Forward+)
• Perspective and orthographic cameras
THIRD-PARTY
None: no third-party code, fonts, textures or models.
Support: support@hardartcore.com