Commit Graph

4 Commits

Author SHA1 Message Date
x2048 442e48b84f
Move updating shadows outside of RenderingCore::drawAll. (#11491)
Fixes indirect rendering modes such as some 3D modes mentioned in #11437 and undersampled rendering.
Does not fully fix anaglyph 3d mode.
2021-08-12 20:07:09 +02:00
x2048 bf3acbf388
Distribute shadow map update over multiple frames to reduce stutter (#11422)
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>
2021-07-25 12:36:23 +02:00
x2048 f5706d444b
Improve shadow rendering with non-default camera FOV (#11385)
* 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
2021-07-11 08:15:19 -07:00
Liso c47313db65
Shadow mapping render pass (#11244)
Co-authored-by: x2048 <codeforsmile@gmail.com>
2021-06-06 18:51:21 +02:00