Introduce Night
Release 0.14.0
STPStarfield
The highlight in this release is this procedurally rendered and animated starfield. Like most others renderers, it comes with the main renderer class STPStarfield, a setting class STPStarfieldSetting, and finally a shader STPStarfield.frag.
To allow simultaneously rendering multiple environments, some improvements have been done to STPScenePipeline:
- Add an extinction environment rendering cache for holding temporary environment colours before blended with other scene objects.
- Add a visibility switch for
STPEnvironmentObject. - All environment colours are now summed together instead of overwriting.
- Replace small range-based for-loop with
std::for_eachfor clarity. - Add ambient light at night.
General fixes and improvement
- Fix a mistake in
STPGaussianFilterfor forgetting to assign uniform for image depth sampler. - Remove use of element buffer in
STPScreenand use triangle fan instead. - Avoid explicit call to bindless texture destructor during random texture generation in
STPHeightfieldTerrainwhich causes the destructor to be called twice at move construction. - Add
STPSimpleScreenBindlessFrameBufferinSTPScreento allow using screen colour texture attachment on a framebuffer as a bindless target. - Refactor
STPBidirectionalScatteringwith the newly introducedSTPSimpleScreenBindlessFrameBuffer. - Fix a unspecified argument evaluation order in erosion kernel in
STPHeightfieldKernel. - Ambient occlusion blending now only enables at output to avoid doing the useless 1.0 x anything = anything stuff.
- Don't clear G-Buffer every frame because each pixel is read only by exactly one of the responsible shading invocation.
- Fix some incorrect code style.
- Improve
STPLightSpectrumto allow supporting different channel types.
Refactor environment object rendering
- Add
STPSkybox; similar toSTPScreen, it is used by environment renderers that require an axis-aligned origin-centred skybox. - Refactor
STPSunto make it benefits from the new skybox renderer. - Add projection view rotation matrix in
STPCameraInformation.