Home
Clone this wiki locally
Welcome to the wiki and thank you for purchasing Low Poly Water GPU!
Please consider rating or leaving a review. This will help the growth of this asset.
For support, issues, feature requests and feedback: jolixmail@gmail.com
Supports:
☑ Shader Model 3.0 or higher
☑ Shader Model 2.0: limited features
☑ Mobile devices (limited)
☑ Virtual reality devices (limited)
☑ Desktop and consoles
☑ Orthographic camera
Getting Started
-
Drag one of the water prefabs (inside the Prefab folder) to the scene.
-
Select the prefab object in the scene.
-
Adjust the properties to your liking using the inspector window.
Property Documentation
LowPolyWater Component
| Property | Description |
|---|---|
| Material | The low poly water material of your choice. |
| Grid Type |
Hexagonal: Generates an hexagonal water plane. Square: Generates a square water plane. Hexagonal LOD: Generates an hexagonal water plane with LOD options. Custom: Enables custom meshes to be used. |
| Size | The size of the water plane. |
| Noise | Offset the vertices with position-dependent noise. |
| Receive Shadows | Enables shadows. If depth effects AND shadows are enabled, an extra hidden camera will render to a Z-Buffer without the water mesh. Not recommended for low-end devices. |
| Enable Reflection | Enables planar light reflections. This will not make sense for non-planar meshes. This adds an extra hidden camera. Not recommended for low-end devices. Does not support single-pass VR rendering. |
| Enable Refraction | Enables planar water refraction. This will not make sense for non-planar meshes. This adds an extra hidden camera. Not recommended for low-end devices. Does not support single-pass VR rendering. |
| Disable Pixel Lights | Disable pixel lights in the reflection render. Enable for better performance. |
| Texture Size | The texture size of the reflection and refraction. Choose a lower size for better performance. |
| Clip Plane Offset | The offset of the reflection plane. Increase if you see clipping artifacts. |
| Reflect Layers | Unity Layers to render in the reflection pass. |
| Refraction Layers | Unity Layers to render in the refraction pass. |
| Sun | A direction light representing the sun. The script will automatically search for a directional light when no object is assigned. |
Lighting
| Property | Description |
|---|---|
| Color | The color of (shallow) the water. |
| Deep Water Color | The color of the deep water. (Only if Light Absorption is enabled). |
| Opacity | The opacity of the water. |
| Specular | Specular lighting power. |
| Sun Color | Specular lighting color. |
| Shadow Bias | Controls the shadow strength if shadows are enabled. |
| Diffuse | Diffuse lighting influence. |
| Enable Point Lights | Supports up to 4 point lights. Disable for better performance. |
| Shading |
Flat: Pixels inside a triangle have always the same color. Lighting is calculated in the vertex shader. VertexLit: Lighting is calculated in the vertex shader. PixelLit: Lighting is calculated in the fragment shader. Slowest option. |
Reflection
| Property | Description |
|---|---|
| Reflection | The reflection strength of the water. |
| Fresnel (A) | An 8-bit alpha texture approximating a Fresnel lens. A default texture is provided in the Textures sub-folder. The slider controls the fresnel power. |
| Fresnel Color | The color of the horizon for the Fresnel effect to reflect. |
| Enable Distortion | Enable reflection / refraction distortion effects. Disable for better performance. |
| Reflective Distortion | Distort the reflection texture. |
| Refractive Distortion | Distort the refraction texture. |
| Distortion Map | Use a normal texture to distort the reflection / refraction textures. The float value controls the tile-parameter allowing the distortion to scale. |
| Distortion Speed | The moving velocity of the refraction and reflection distortion. |
Waves
| Property | Description |
|---|---|
| Enable Waves |
Off: Disable waves. LowQuality: These waves are calculated using the Noise Texture. This option is faster than HighQuality, but the texture sampling can cause flickering/jittering of the lighting. HighQuality: Based on Trochoidal or Gerstner waves. Slowest Option. |
| Wave Length | The length of the waves. |
| Wave Stretch | Higher values stretch out the waves in the perpendicular travel direction. |
| Wave Speed | The travel velocity of the waves. |
| Wave Height | The amplitude of the waves. |
| Wave Steepness | The steepness of the waves. |
| Wave Direction | The travel direction of the waves. |
| Ripple Speed | The speed of the water ripples. |
| Ripple Height | The amplitude of the water ripples. |
Depth Effects
| Property | Description |
|---|---|
| Enable Foam | Toggles the foam (shore blending) feature. Toggle off for best performance. |
| Foam Color | The color of the Foam. |
| Foam Intensity | The intensity of the blending/fading into the shore. |
| Foam Distance | The distance from the edge intersection to start blending with the shore. |
| Enable HQ Foam | Toggles High Quality foam distortion. Toggle off for best performance. |
| Foam Scale | The scale of the foam distortion. |
| Foam Speed | The speed of the foam distortion. |
| Foam Spread | The spreading amount of the foam distortion. |
| Enable Light Absorption | Toggles the Light Absorption effect. The water absorbs the light, so deeper parts of the water have a darker color. This uses the depth buffer to calculate the absorption. |
| Depth Transparency | How deep the light gets through. |
| Deep Water Color | The color of the deepest parts of the water. |
Other
| Property | Description |
|---|---|
| Global Scale | The global scale of the waves and ripples. |
| Noise Texture (A) | A single-channel (8-bit alpha) texture with random numbers between 0 and 255. |
| Write to Depth Buffer | Render to the Z-Buffer. Enabling this allows image effects that use the Z-Buffer (like Depth of Field) to work properly. If shadows are enabled, the mesh is written to the depth buffer by default. |
| Show Surface Underwater | If this is enabled, back-face culling is turned off (Cull Off). An underwater system or underwater effects are not supported. Disable for best performance. |
Infinite Ocean
This package only supports static LOD (Grid -> Hexagonal LOD). This means that triangles get bigger further away. This also means you're supposed to stay near the center and not explore the ocean.
If you want an infinite sea you can explore, then you could set up a dynamic tiling system. This is possible with this asset, but will require quite some more scripting work on your part (place tiles size*scale*sqrt(3) from each other).
Tiling
Place square tiles size*scale*sqrt(3) from each other.
Depth of Field
Depth of field uses the geometry depth-buffer. Transparent objects are not drawn to that depth-buffer, so this won't work (Unity limitation). If you want transparency AND depth of field, you can enable shadows and it will work this way. If want depth of field, but don't care for transparency, let me know, I can fix that for you. :)
Floating Objects / Wave Displacement
This feature is still in development and not fully supported.
To enable floating:
-
Uncomment line 5 of
LowPolyWaterv2/Shaders/LowPolyWaterAdvanced.shader:#define LPW_DISPLACE -
Replace line 9 with of
LowPolyWaterv2/Shaders/LPWNoise.cginc:return frac(sin(n)*10.0); -
Set
enableDisplacetotrueat line 30 ofLowPolyWaterv2/Scripts/LowPolyWaterScript.cs:static bool enableDisplace = true; -
Make sure Enable Waves is set to HighQuality in the material inspector.
-
The vertical displacement is returned by:
float LPWAsset.Displacement.Get(Vector3 position, Material waterMaterial);It gets you the vertical ( Y-axis ) displacement of the water, given the position on the water plane. It is the height of the wave at a certain location. You can use it like this in a script:
var waveHeight = LPWAsset.Displacement.Get(position, waterMaterial);
Version Notes
v2.02:
- GLES build fix in 5.4 & 5.5
v2.01:
- Unity 5.5 Import fix
v2.00:
- Reflection and refraction support
- Shadow receiving
- Custom mesh support
- Static LOD grid
- Foam distortion
- Light absorption
- Point light support (up to 4)
- Inspector GUI overhaul
v1.05:
- Tiling is now possible with noise
- Edge blend supports Single-pass stereo
v1.04:
- Fixed memory leak in Editor Mode
- WaterFresnel texture set to Clamp
- Fixed precision issues
- Vertex Lit rendering path support
v1.03:
- Waterchunks have now the same layer as the parent object
- Fixed issues with SM2.0 mobiles
- Fixed issues with iOS depth camera
v1.02:
- Change size in X and Z directions
- Fixed scaling issues
- Shore blend for Orthographic camera
- Opacity parameter
- Option to write to depth buffer
- Proper shore opacity
v1.01: Meshes are not saved, but regenerated on load







