-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Bloom #12791
Bloom #12791
Conversation
All the settings are client-side to give early adopters ability to experiment. Game controls need separate discussion and will come in a PR of their own. |
Works. Code looks good (I'll trust you on the details of the constants in the calculations). |
To avoid artifacts on low-profile systems
For compatibility with certain GPUs (AMD on Windows is known to have problems)
@lhofhansl I've pushed minor changes to detect and the issue mentioned above, could you take a look? |
Issue with visual artifacts has been caused by the use of ping-pong buffer (rendering calls between two textures). Apparently on some hardware the render steps can overlap, causing renderbuffer texture to be sampled before it's fully written by the previous step, leading to undefined behavior. Fixed by rerouting rendering to a new texture, hidden behind a configuration flag |
Still looks good. :) I maintain my "One Approval" |
error on MacOS 12.5.1 m1pro cpu+gpu minetest latest master as of now, 5.7.0-dev-525fc38 doesn't matter if bloom_enabled = true or not 2022-09-30 14:33:50: ERROR[Main]: Irrlicht: GLSL (> 2.x) shader failed to compile: shaderType: 35632 2022-09-30 14:33:50: ERROR[Main]: generate_shader(): failed to generate "second_stage", addHighLevelShaderMaterial failed. |
I assume the error above is caused by |
This PR adds exposure control and bloom effect to the game.
The following settings are introduced:
exposure_factor
emulates the amount of light that is captured on screen. Default: 1.0, min: 0.1, max: 10.0enable_bloom
turns bloom effect on and offbloom_intensity
controls the amount of bloom on screen. Default: 0.05, min: 0.01 max: 1.0bloom_radius
controls the size of the blur convolution kernel. Default: 16, min: 1, max: 64To do
This PR is Ready for Review.
How to test
Experiments:
/set exposure_factor 2
- entire scene becomes lighter/set bloom_radius 32
- light bleeds further into the dark areas/set bloom_intensity 0.15
- the intensity of bloom effect is higher.