Real-time Shadow
Release 0.10.4
Terrain shadow
- Add
STPOrthographicCameraas an ortho projection camera, along withSTPOrthographicCameraSettingto store settings. - Add another type of flag to determine which component will contribute to shadow map to
traverse()function inSTPScenePipeline. - Add
STPBindlessTexturefor handling automatic unresident of bindless texture handle.
STPCascadedShadowMap
This is a shadow manager that implements CSM technique. It allows rendering shadow on a large scene using directional light with adaptive shadow quality based on distance from camera to the main scene.
STPSun now derives from this class, STPHeightfieldTerrain has provided users with two options, to cast or not cast shadow.
General fixes and improvement
- Change exception type thrown when validating
STPSunSettingandSTPAtmosphereSettinginSTPSuntoSTPInvalidEnvironment. - Refactor Lottes and Uncharted2 tone mapping calculation.
- Move
NearandFarsetting fromSTPPerspectiveCameraSettingtoSTPCameraSettingas these settings are shaded by both types of projection. - Make all functions in
STPImageParameterpublic. - Add a new pure virtual function in
STPCamerathat allows overriding the near and far plane to calculate the projection matrix. - Add
compareFunction()andcompareModetoSTPImageParameteras well as implementations for all derived classes. - Add
drawBuffer()andreadBuffer()forSTPFrameBuffer. - Fix incorrectly calculated tangent and bitangent for terrain unit plane that causes the normal Y direction to be flipped. Also change the unit plane winding order from CW to CCW for consistency reason.
- Fix a repetitive use of RNG in
STPLayerCachetest program that causes warning due to generation of the same RNG sequence to be generated during test session. - Change the specification of all cameras. Now they all use callback functions to determine if the camera state has changed rather than having them returned from the camera matrix retrieval call.
- Instead of using an exponential function, terrain LoD shifting now uses linear. Remove
ShiftFactorsetting fromSTPMeshSetting. - Buffer stream in
STPWorldPipelineis now initialised as non blocking. supply()function inSTPBiomeFactorynow returns an instance rather than a pointer.- Remove redundant storage of list iterator in
STPSingleHistogramFilter, now the queue returns a moved memory block directly.
Shader compilation
- Add some wrappers function over shader source code in
STPShaderManagerthat allows pre-processing the source string directly rather than messing up other functionalities with the shader class. - Remove all unnecessary shader include paths from all renderers (
STPSunetc.) because all shader source code use absolute path. - Fix incorrect semantics in
STPShaderManager, shader include path should be an relative directory rather than the full name of the include source. STPShaderManagernow requires explicit initialisation for system shader include. For such reason, addedSTPRendererInitialiserdedicated for initialisations.