Skip to content

Commit d7eb824

Browse files
committed
Make color of the Moon closer to reality
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.
1 parent 32b9957 commit d7eb824

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

data/shaders/planet.frag

+1
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ void main()
425425
// maximum at 1.0 instead of 0.4.
426426
texColor.rgb = vec3(0.4) + 0.6 * texColor.rgb;
427427
texColor.rgb = pow(texColor.rgb, vec3(2.8));
428+
texColor.rgb *= vec3(1., 0.79, 0.57);
428429
#else
429430
texColor.rgb = srgbToLinear(texColor.rgb);
430431
#endif

0 commit comments

Comments
 (0)