Skip to content

v0.0.7πŸŒ„ Vulkan Terrain Renderer

Choose a tag to compare

@sheeepsoup sheeepsoup released this 25 Aug 13:25
· 11 commits to main since this release

🌊 Initial Ocean System Implementation | 2026-08-25

This update introduces the first prototype of the ocean system for the Vulkan terrain project.

✨ New Features

  • 🌊 Added a basic ocean plane covering the current world area
  • πŸ“ Set the initial sea level to Z = 0
  • πŸ”Ί Created the water plane using 4 vertices and 6 indices
  • πŸ—ΊοΈ Automatically calculates the ocean size using BlockNum Γ— BlockDistance
  • 🎨 Added color presets for shallow, medium, and deep water
  • 🧱 Reused the existing depth buffer for basic terrain-water occlusion
  • πŸ”οΈ Terrain above sea level remains visible, while lower areas are covered by water
  • 🧩 Prepared the project structure for a future independent water mesh and rendering pipeline

🎨 Current Water Colors

const vec3 deepOceanColor    = vec3(0.0, 0.1, 0.35);
const vec3 middleOceanColor  = vec3(0.0, 0.4, 0.7);
const vec3 shallowOceanColor = vec3(0.1, 0.6, 0.6);

The current prototype uses a constant water color. A future update will calculate water depth from the terrain below and smoothly blend between shallow, coastal, and deep-water colors.

πŸ› οΈ Current Implementation Status

This version primarily verifies:

  • Correct water vertices and indices
  • Successful ocean rendering
  • Correct depth testing between terrain and water
  • Proper alignment between terrain height and sea level
  • Sufficient ocean coverage across the current map

The ocean system is still in an early prototype stage and does not yet include:

  • Vertex-displaced waves
  • Depth-based water colors
  • Transparency and refraction
  • Fresnel reflections
  • Shoreline foam
  • A coastline distance field
  • A dedicated water rendering pipeline
  • FFT ocean simulation

⚠️ Known Limitations

  • The ocean currently contains only 4 vertices and cannot support geometric waves
  • Some rendering resources are still shared with the terrain system
  • Water is temporarily detected using a fixed sea-level condition
  • The fragment shader cannot currently access the terrain height below each water fragment
  • Water color does not yet react to coastline distance or actual water depth

🚧 Planned Improvements

  • Create an independent LveWater module
  • Add a dedicated WaterVertex structure
  • Separate water vertex and index buffers from terrain buffers
  • Create dedicated water vertex and fragment shaders
  • Upgrade the ocean plane to a 128Γ—128 or 256Γ—256 grid
  • Calculate water depth using the underlying terrain height
  • Add smooth shallow, coastal, and deep-water color transitions
  • Implement Gerstner waves
  • Calculate dynamic normals from wave derivatives
  • Add Fresnel reflections and transparent blending
  • Implement shoreline foam and shallow-water effects
  • Explore GPU-based FFT ocean simulation

πŸ“ Summary

This update completes the first basic validation stage of the ocean system. The current goal is not final visual quality, but verifying that the water mesh, indices, depth testing, ocean coverage, and sea-level relationship work correctly.

Future updates will separate the ocean from the terrain system and gradually introduce dynamic waves, depth-based coloring, reflections, refraction, shoreline foam, and more advanced GPU ocean simulation. 🌊