mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Fix vignette and whitespace
This commit is contained in:
parent
364ca57819
commit
f0407080ac
4 changed files with 6 additions and 13 deletions
|
@ -625,11 +625,6 @@ secondstage_gamma (Gamma) float 1.6 1.0 5.0
|
||||||
# Requires: enable_post_processing
|
# Requires: enable_post_processing
|
||||||
enable_color_grading (Color grading) bool false
|
enable_color_grading (Color grading) bool false
|
||||||
|
|
||||||
# Apply vignette effect to darken the edges of the screen.
|
|
||||||
#
|
|
||||||
# Requires: enable_post_processing
|
|
||||||
enable_vignette (Vignette) bool false
|
|
||||||
|
|
||||||
# Apply dithering to reduce color banding artifacts.
|
# Apply dithering to reduce color banding artifacts.
|
||||||
# Dithering significantly increases the size of losslessly-compressed
|
# Dithering significantly increases the size of losslessly-compressed
|
||||||
# screenshots and it works incorrectly if the display or operating system
|
# screenshots and it works incorrectly if the display or operating system
|
||||||
|
|
|
@ -546,7 +546,7 @@ void main(void)
|
||||||
col.rgb += reflection_color * pow(fresnel_factor, 2.0) * 0.5 * brightness_factor;
|
col.rgb += reflection_color * pow(fresnel_factor, 2.0) * 0.5 * brightness_factor;
|
||||||
|
|
||||||
vec3 water_reflect_color =
|
vec3 water_reflect_color =
|
||||||
6.0 * sunTint * dayLight * fresnel_factor * f_adj_shadow_strength * max(1.0 - shadow_uncorrected, 0.0) *
|
6.0 * sunTint * dayLight * fresnel_factor * f_adj_shadow_strength * max(1.0 - shadow_uncorrected, 0.0) *
|
||||||
mtsmoothstep(0.85, 0.9, pow(clamp(dot(reflect_ray, viewVec), 0.0, 1.0), 32.0));
|
mtsmoothstep(0.85, 0.9, pow(clamp(dot(reflect_ray, viewVec), 0.0, 1.0), 32.0));
|
||||||
|
|
||||||
// We clip the reflection color if it gets too bright
|
// We clip the reflection color if it gets too bright
|
||||||
|
|
|
@ -150,7 +150,7 @@ void main(void)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
||||||
color.rgb *= (vignette_bright - vignette_dark) * (1.0 - pow(length(uv - vec2(0.5)) * 1.4, vignette_power)) + vignette_dark;
|
color.rgb *= (vignette_bright - vignette_dark) * (1.0 - pow(length(uv - vec2(0.5)) * 1.4, vignette_power)) + vignette_dark;
|
||||||
|
|
||||||
#if ENABLE_TONE_MAPPING
|
#if ENABLE_TONE_MAPPING
|
||||||
color = applyToneMapping(color);
|
color = applyToneMapping(color);
|
||||||
|
|
|
@ -548,12 +548,10 @@ public:
|
||||||
float gamma = m_gamma;
|
float gamma = m_gamma;
|
||||||
m_gamma_pixel.set(&gamma, services);
|
m_gamma_pixel.set(&gamma, services);
|
||||||
|
|
||||||
if (g_settings->getBool("enable_vignette")) {
|
const Vignette &vignette_params = lighting.vignette;
|
||||||
const Vignette &vignette_params = lighting.vignette;
|
m_vignette_dark_pixel.set(&vignette_params.dark, services);
|
||||||
m_vignette_dark_pixel.set(&vignette_params.dark, services);
|
m_vignette_bright_pixel.set(&vignette_params.bright, services);
|
||||||
m_vignette_bright_pixel.set(&vignette_params.bright, services);
|
m_vignette_power_pixel.set(&vignette_params.power, services);
|
||||||
m_vignette_power_pixel.set(&vignette_params.power, services);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_settings->getBool("enable_color_grading")) {
|
if (g_settings->getBool("enable_color_grading")) {
|
||||||
const ColorDecisionList& cdl_params = lighting.cdl;
|
const ColorDecisionList& cdl_params = lighting.cdl;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue