Skip to content

Introduce Water

Choose a tag to compare

@stephen-hqxu stephen-hqxu released this 01 May 14:14
7ae8117

Release 0.13.0

Please refer to pull request #40 for more development discussions.

Water system

The major highlight in this release is the simple water rendering system with procedural animation and basic reflection / refraction. STPWater is added as a new rendering component for rendering water geometry. STPBidirectionalScattering is also added as a new rendering component for rendering water visual effects using bidirectional scattering distribution function. The current implementation is far from being photorealistic, though.

We may decide to use global illumination in the future for improving rendering quality of water, such as adding caustics and underwater effect, as screen-space reflection produces underwhelming quality.

Water shader shares a lot in common with the terrain shader so all vertex-related shaders co-exist with the terrain one.

  • Add STPWaterSetting to configure the behaviour of water renderer.
  • Add STPMaterialLibrary to configure material properties for water geometry. It assumes that the water has uniform material to reduce memory cost.

Free-slip logic

We have also improved the very old system introduced in #15 and bring significant performance improvement to the particle-based hydraulic erosion. Due to the fact that the old index lookup table degrades performance dramatically, we ended up removing this entirely from the engine.

To ensure data safety, modification to the heightmap is made to be atomic during erosion. For performance consideration this is not enabled in debug mode as atomics perform poorly without turning on optimisation.

General fixes and improvement

  • STPAlphaCulling now supports using double culling expressions.
  • Add a new G-Buffer to STPScenePipeline for storing material ID.
  • Improve STPPlaneGeometry to fully utilise the power of index buffer and remove all repeated vertices.
  • Simplify terrain shader. Remove redundant pass-through of normal vector. Remove useless geometry shader during regular rendering. Remove unused stuff from the shader.
  • Improve terrain tessellation control shader to fully exploit the power of invocation parallelism.
  • Separate STPTessellationSetting from STPMeshSetting.
  • Remove texture type Specular.
  • Fix some bugs in the HBAO implementation which causes the occlusion to be weaken.
  • Fix an error related to use of char* on string literal in a number of places like STPWorldManager in the demo program and STPDebugCallback in the rendering engine.
  • Make argument std::string to const std::string& for a number of functions in STPRuntimeCompilable.
  • Make include directory template file STPAlgorithmDeviceInfo.h.in to use std::string_view instead of const char[].
  • STPCommonCompiler in the demo program now generates include directory in compile-time.