Commit Graph

17 Commits

Author SHA1 Message Date
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
Liso c47313db65
Shadow mapping render pass (#11244)
Co-authored-by: x2048 <codeforsmile@gmail.com>
2021-06-06 18:51:21 +02:00
Loic Blot 1bc855646e refacto: protect some RenderingEngine::get_scene_manager
* protect it from Camera, Sky, ClientMap object calls
* rename Game::sky to Game::m_sky
2021-05-03 19:49:19 +02:00
sfan5 f0bad0e2ba
Reserve vectors before pushing and other code quality changes (#11161) 2021-04-05 13:38:31 +02:00
hecks 225e69063f
Keep mapblocks in memory if they're in range (#10714)
Some other minor parts of clientmap.cpp have been cleaned up along the way
2021-02-26 21:23:46 +01:00
Lars 289425f6bd Minor profiler fixes. 2020-12-23 14:48:08 -08:00
hecks 6d7067fd37
Implement mapblock camera offset correctly (#10702)
Implement mapblock camera offset correctly - reduce client jitter

Co-authored-by: hecktest <>
2020-12-05 15:03:40 -08:00
Lars 8dc70ebb93 Fix camera panning glitches (partially revert 10489.) 2020-11-25 14:22:36 -08:00
Lars b826e39730 Minor clientmap improvements.
- Avoid calculating isBlockInSight for blocks without meshes.
- Add metric for how many blocks the client has currently loaded.
- Make some variables constant.
2020-10-19 09:31:09 -07:00
Lars 521a04222a Avoid drawing invisible blocks on the client. 2020-10-13 09:30:59 -07:00
SmallJoker f46509d5e2
Remove unused functions reported by cppcheck (#10463)
Run unused functions reported by cppcheck

This change removes a few (but not all) unused functions.
Some unused helper functions were not removed due to their complexity and potential of future use.
2020-10-05 09:07:33 +02:00
SmallJoker 6ada090bb0 Occlusion: Check for light_propagates and do mapblock bounds checks 2019-08-23 19:17:43 +02:00
SmallJoker 7d016b4efd Occlusion: Begin cleanup 2019-08-23 19:17:43 +02:00
Jozef Behran 72b7a957af Fix unnecessary exception use in Map::getSectorXXX (#8792)
The Map::getSectorNoGenerate throws an exception but no other
code is really dependent on that. Fix the odd instance of
misuse in ClientMap::emergeSector and remove the exception
throwing version of the method along with the "NoEx" suffixes
in the names of these methods.
2019-08-13 19:58:27 +02:00
SmallJoker 539f016c1b
Better F6 profiler (#8750)
Update the profiler names to make more sense of what they actually represent
Move the profiler code from header to its source file
Use monospace font to align lines
Format the statistics line to align better with surrounding values
Refresh the profiler each 3 seconds (roughly)
2019-08-13 19:56:55 +02:00
Jozef Behran 86d7f84b89 Merge pull request #8776 from osjc/FixGetNode
Finish getNode cleanup
2019-08-10 19:45:44 +02:00
Quentin Bazin 5f1cd555cd Move client-specific files to 'src/client' (#7902)
Update Android.mk
Remove 'src/client' from include_directories
2018-11-28 20:01:49 +01:00