General Refactor
Release 0.15.3
SuperAlgorithm+Device
- Remove OOP designs for most
SuperAlgorithm+Devicesource code because they are too trivial. - Remove
STPKernelMathbecause it is too trivial. - Make implementation of
STPSingleHitogramWrapperinline. - 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 intinsimplex2Dwhenever applicable.
STPCamera
- Remove
STPOrthographicProjectbecause we will never need this in this particular application; mergeSTPPerspectiveProjectwithSTPCamera.- We will add more camera model in the future.
- Remove
STPCameraInformationMemoryfromSTPScenePipeline. 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
STPSettingbase class because we don't need polymorphic behaviour. - All
STPEnvironmentare 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
STPTestEnvironmentbecause it is so trivial. - Remove
STPConfigurationbecause it is useless in the core engine. - Refactor
STPHightfieldGeneratorslightly, it only copies erosion settings (rather than the whole heightfield settings) to the device.- Also for
STPHeightfieldSetting, compositingSTPRainDropSettinginstead of inheriting.
- Also for
Pass by value
STPWorldPipelinenow copies the chunk setting into the object rather than taking a reference.STPHeightfieldGeneratordoes the same as above forSTPHeightfieldSetting.STPDemo::STPWorldManagerno 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 toSTPBiomeFactory. - Replace some use of
std::accumulatewithstd::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
STPSimplexNoiseSettingnow by default takes a unit in radians, was in degree, for consistency with our API. - Make string object composed in
STPINIBasicStringrather than inherited. - Refactor constructor arguments for
STPHeightfieldGeneratorinto 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.