Skip to content

Commit

Permalink
Make color of the Moon closer to reality
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
10110111 committed Feb 2, 2023
1 parent 91fbe9d commit fa293dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions data/shaders/planet.frag
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa293dc

Please sign in to comment.