1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-04 00:40:24 +02:00
Commit Graph

11 Commits

Author SHA1 Message Date
180ec92ef9 Remove trailing whitespace (#13505) 2023-05-18 20:34:18 +02:00
70a82b0784 Avoid shadow flicker at certain angles (#12961)
Change the way look direction and camera position are quantized when calculating light frustum
2022-11-20 21:28:01 +01:00
ed26ed5a1f Quantize light frustum calculations (#12357)
* Quantize light frustum calculations

Reduces shadow flicker

* Fix function name to match conventions
2022-05-23 23:45:18 +02:00
48f7c5603e Adjust shadowmap distortion to use entire SM texture (#12166) 2022-04-07 22:13:50 +02:00
26c046a563 Increase the ratio between shadow range and viewing range 2022-04-02 10:39:43 +02:00
3dd7d7867b Limit shadow map to the viewing range (#12158) 2022-03-31 22:40:59 +02:00
4801bdf45a Correct normal bias for entities
Remove use of magic constants.
Apply cameraOffset
Calculate distance projected on SM plane
2022-03-07 23:45:26 +01:00
b4b9bee5f2 Reduce shadow jitter (#11668) 2021-10-05 21:54:01 +02:00
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
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
c47313db65 Shadow mapping render pass (#11244)
Co-authored-by: x2048 <codeforsmile@gmail.com>
2021-06-06 18:51:21 +02:00