aboutsummaryrefslogtreecommitdiff
path: root/src/client/shadows (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Force-update shadows when the world is changed (#12364)x20482022-05-262-5/+11
|
* Quantize light frustum calculations (#12357)x20482022-05-231-1/+19
| | | | | | | * Quantize light frustum calculations Reduces shadow flicker * Fix function name to match conventions
* Improve shadow filters (#12195)x20482022-05-211-0/+1
| | | | | | | | | * Rewrite shadow filtering for the new distortion * Calculate penumbra radius using a single sample * Avoid peter-panning effect due to filtering of short shadows * Add adaptive filter quality for soft shadows * Avoid sharp shadows on surfaces without normals (e.g. plants) * Increase default and maximum soft shadow radius * Make line numbers in shader errors match the code
* Deal with compiler warningssfan52022-04-302-3/+4
|
* Implement shadow offsets for the new SM distortion function (#12191)x20482022-04-142-13/+8
| | | | | | | | * Move shadow position calculation to vertex shaders * Animate entire scene before rendering shadows to prevent lagging of shadows * Remove unnecessary use of PolygonOffsetFactor * Apply normal offset to both nodes and objects * Rename getPerspectiveFactor -> applyPerspectiveDistortion * Remove perspective distortion from fragment shaders
* Adjust shadowmap distortion to use entire SM texture (#12166)x20482022-04-075-34/+56
|
* Increase the ratio between shadow range and viewing rangeDmitry Kostenko2022-04-021-1/+1
|
* Limit shadow map to the viewing range (#12158)x20482022-03-311-0/+2
|
* Tune shadow perspective distortion (#12146)x20482022-03-314-5/+41
| | | | | * Pass perspective distortion parameters as uniforms * Set all perspective bias parameters via ShadowRenderer * Recalibrate perspective distortion and shadow range to render less shadow geometry with the same quality and observed shadow distance
* Add API to control shadow intensity from the game/mod (#11944)x20482022-03-262-28/+77
| | | * Also Disable shadows when sun/moon is hidden. Fixes #11972.
* Correct normal bias for entitiesDmitry Kostenko2022-03-073-12/+7
| | | | | | Remove use of magic constants. Apply cameraOffset Calculate distance projected on SM plane
* Reduce shadow jitter (#11668)lhofhansl2021-10-051-17/+0
|
* Move updating shadows outside of RenderingCore::drawAll. (#11491)x20482021-08-126-59/+59
| | | | Fixes indirect rendering modes such as some 3D modes mentioned in #11437 and undersampled rendering. Does not fully fix anaglyph 3d mode.
* Distribute shadow map update over multiple frames to reduce stutter (#11422)x20482021-07-254-46/+186
| | | | | | | | | | Reduces stutter and freezes when playing. * Maintains double SM and SM Color textures * Light frustum update triggers incremental generation of shadow map into secondary 'future' textures. * Every incremental update renders a portion of the shadow draw list (split equally). * After defined number of frames (currently, 4), 'future' and 'current' textures are swapped, and DirectionalLight 'commits' the new frustum to use when rendering shadows on screen. Co-authored-by: sfan5 <sfan5@live.de>
* Improve shadow rendering with non-default camera FOV (#11385)x20482021-07-111-13/+18
| | | | | | | | | | | * Adjust minimum filter radius for perspective * Expand shadow frustum when camera FOV changes, reuse FOV distance adjustment from numeric.cpp * Read shadow_soft_radius setting as float * Use adaptive filter radius to accomodate for PSM distortion * Adjust filter radius for texture resolution
* Shadow mapping render pass (#11244)Liso2021-06-068-0/+1122
Co-authored-by: x2048 <codeforsmile@gmail.com>