Page 1 of 1

How to make nights even darker without using gamma?

PostPosted: Thu Apr 28, 2016 21:48
by adamr
I don't want to change gamma settings. I just want less light to be cast by the moon, so the night is even more scary. I couldn't find any reference on how to do this. Anyone knows? :-)

Re: How to make nights even darker without using gamma?

PostPosted: Fri Apr 29, 2016 12:54
by Lejo
adamr wrote:I don't want to change gamma settings. I just want less light to be cast by the moon, so the night is even more scary. I couldn't find any reference on how to do this. Anyone knows? :-)

It is easy set in minetest.conf:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
time_speed = 0

Now the Sun don't walk.
Then set time to night.

Re: How to make nights even darker without using gamma?

PostPosted: Tue May 03, 2016 11:18
by azekill_DIABLO
you want darker nights?

shader modifications :)

Here are shader modifications:

PostPosted: Thu May 05, 2016 08:24
by Hybrid Dog
Just change the end of client/shaders/nodes_shader/opengl_fragment.glsl:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
[…]
   col = vec4(col.rgb, base.a);
#endif
/*
average_brightness  b     a

0.1  6.9216142999862      1.0009872101959
0.2  3.2812798961849      1.0390475388339
0.3  1.8010717753886      1.1977795369103
0.4  0.82216323430739     1.7840574297201
0.5  8.1838768211219e-12  122191161173.47
0.6  -0.82216323430739    -0.78405742972006
0.7  -1.8010717753886     -0.1977795369103
0.8  -3.2812798961849     -0.039047538833918
0.9  -6.9216142999862     -0.00098721019590494
*/
   float b = -1.8010717753886;
   float a = -0.1977795369103;
   col.rgb = (vec3(1.0) - pow(vec3(e), -col.rgb * b)) * a;

#ifdef ENABLE_TONE_MAPPING
   gl_FragColor = applyToneMapping(col);
#else
[…]

a screenshot:
Image

Re: How to make nights even darker without using gamma?

PostPosted: Thu May 05, 2016 12:06
by azekill_DIABLO
cool!