Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit force shadow update to urgent blocks #12692

Merged
merged 2 commits into from
Aug 14, 2022

Conversation

x2048
Copy link
Contributor

@x2048 x2048 commented Aug 13, 2022

Significantly improves performance when:

  • shadows are enabled
  • shadow_update_frames > 1
  • mesh generation is active (world is loading, camera changes etc.)

To do

This PR is Ready for Review.

How to test

  1. Enable shadows
  2. Set shadow_update_frames to a value > 1 (default: 8)
  3. Enter the world
  4. Observe the graphs: mesh generation should not have significant impact on FPS
  5. Place a block / dig a block - shadow is updated without lag.

@lhofhansl
Copy link
Contributor

Looks good. (But have not tested, yet)

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that the hit count (not value) of SHADOW MapBlocks drawn [#] is significantly lower while flying through newly generated world

@sfan5 sfan5 merged commit aa2fdc6 into minetest:master Aug 14, 2022
@x2048 x2048 deleted the shadow_update_priority branch August 14, 2022 18:59
@x2048 x2048 added this to the 5.6.1 milestone Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants