# Earth GLSL Shader

**URL:** <https://discourse.processing.org/t/earth-glsl-shader/19452>\
**Category:** Gallery\
**Created:** [April 6, 2020, 1:20am UTC](https://discourse.processing.org/t/earth-glsl-shader/19452 "2020-04-06T01:20:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElementMo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/elementmo/32/4253_2.png) [@ElementMo](https://discourse.processing.org/u/ElementMo)\
**Post date:** [April 6, 2020, 1:20am UTC](https://discourse.processing.org/t/earth-glsl-shader/19452/1 "2020-04-06T01:20:06Z")

</div>

I wrote a shader for rendering realistic earth with the most basic version of shader.  
The lighting model is the most basic Phong shading model, the normal map is not that correct, the color of the light source is hard-coded in the shader. Everything is messy… But it looks good~! 😉

 ![earth3](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/d/d4efed7484f4da510514bd1afe235fe36b632085.jpeg)  
 ![earth4](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/054fad6bf9081d056f39e31b8a956538611be0a3.jpeg)  
 ![earth5](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/323ff0c75f29eaf69e6f220ace3de001b63233df.jpeg)  
 ![earth6](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f4b8e843dc58066dec73daa36f38983b896f285d.jpeg)

**PR and Issues are welcomed!**

> **[ElementMo/GLSLEarth](https://github.com/ElementMo/GLSLEarth)**
>
> Earth Shader in Processing. Contribute to ElementMo/GLSLEarth development by creating an account on GitHub.

Sources:  
Textures: [VIDEO COPILOT ORB plug-in](https://www.videocopilot.net/orb/)  
Blog by christian: [Normal Mapping Without Precomputed Tangents](http://www.thetenthplanet.de/archives/1180)
