From d7eb824dcaa14fa2b5eb3dfd1c512a2263d105b5 Mon Sep 17 00:00:00 2001 From: Ruslan Kabatsayev Date: Fri, 3 Feb 2023 04:03:54 +0600 Subject: [PATCH] Make color of the Moon closer to reality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If you have ever looked at the Moon through a telescope, you may have noticed its peculiar color, which is definitely not gray nor white. It's closer to beige. This patch makes the color of the simulated Moon like this. The reference color was taken from a minimally-processed photo I made of the Moon when it was at elevation of about 65.9° — highest achievable now at my current location to minimize the effect of the atmospheric extinction. --- data/shaders/planet.frag | 1 + 1 file changed, 1 insertion(+) diff --git a/data/shaders/planet.frag b/data/shaders/planet.frag index 21f46a4ae36f2..d4c86bcdb4974 100644 --- a/data/shaders/planet.frag +++ b/data/shaders/planet.frag @@ -425,6 +425,7 @@ void main() // maximum at 1.0 instead of 0.4. texColor.rgb = vec3(0.4) + 0.6 * texColor.rgb; texColor.rgb = pow(texColor.rgb, vec3(2.8)); + texColor.rgb *= vec3(1., 0.79, 0.57); #else texColor.rgb = srgbToLinear(texColor.rgb); #endif