Skip to content

General Refactor

Choose a tag to compare

@stephen-hqxu stephen-hqxu released this 09 Nov 20:41
4073be4

Release 0.15.3

SuperAlgorithm+Device

  • Remove OOP designs for most SuperAlgorithm+Device source code because they are too trivial.
  • Remove STPKernelMath because it is too trivial.
  • Make implementation of STPSingleHitogramWrapper inline.
  • Revamp STPTextureSplatRuleWrapper, decouple the process of finding splatmap registry to avoid repetitive computation.
  • simplex2DFractal() function now by default returns normalised noise value. The fractal information now is taken as a reference to constant value.
  • Use unsigned int in simplex2D whenever applicable.

STPCamera

  • Remove STPOrthographicProject because we will never need this in this particular application; merge STPPerspectiveProject with STPCamera.
    • We will add more camera model in the future.
  • Remove STPCameraInformationMemory from STPScenePipeline. Instead, the camera class now manages its own memory. User only needs to attach the camera to the scene pipeline.
  • Now camera callback no longer uses a bunch of virtual functions. As camera events are queued and require an explicit event polling by the application, camera update events are now reported as flags.
    • This improve performance. If user needs to update many camera attributes every frame, we don't need to flush buffer and recompute transform matrices for every small changes, instead it is done once all small changes are consolidated.

STPEnvironment

  • Remove STPSetting base class because we don't need polymorphic behaviour.
  • All STPEnvironment are now default constructed, this makes initialising parameters using brace initialisation much easier.
  • Change specification of validate() function. Instead of returning a bool indicating the validation status, it throws exception directly when it fails.
  • Remove STPTestEnvironment because it is so trivial.
  • Remove STPConfiguration because it is useless in the core engine.
  • Refactor STPHightfieldGenerator slightly, it only copies erosion settings (rather than the whole heightfield settings) to the device.
    • Also for STPHeightfieldSetting, compositing STPRainDropSetting instead of inheriting.

Pass by value

  • STPWorldPipeline now copies the chunk setting into the object rather than taking a reference.
  • STPHeightfieldGenerator does the same as above for STPHeightfieldSetting.
  • STPDemo::STPWorldManager no longer needs to store those settings.

General fixes and improvement

  • Remove STPLayerTree. Now the user application is responsible for managing memory to layer tree structure provided to STPBiomeFactory.
  • Replace some use of std::accumulate with std::reduce.
  • Remove a unused variable from STPTestFreeSlip.
  • Fix a compilation error in STPTestUtility.
  • Avoid doing floating point division in a massive loop in STPSingleHistogramFilter. However this causes a tiny loss in FP accuracy, and we have changed the tolerance in test program to accommodate this tiny error.
  • Offset parameter in STPSimplexNoiseSetting now by default takes a unit in radians, was in degree, for consistency with our API.
  • Make string object composed in STPINIBasicString rather than inherited.
  • Refactor constructor arguments for STPHeightfieldGenerator into a structure.
  • Refactor heightmap texel unit calculation in terrain fragment shader.
  • Correct many typos.

Distance settings in SuperRealism+

Now the following shader parameters are specified in terms of maximum viewing distance multiplier rather than an absolute distance. This make tweaking camera far and terrain size much easier.

  • Terrain texture triple scaling far distance.
  • Terrain and water mesh tessellation distance.
  • Water wave height (relative to water plane altitude).
  • Cascaded shadow map light frustum settings.