Recently, I delved into the world of ThreeJS and embarked on creating a model of the Earth using a Sphere mesh. Alongside this, I crafted a model of the Sun and now desire to infuse two distinct textures onto the Earth model based on its orientation. Specifically, I envision applying a "night" texture on the side of the Earth sphere that is shielded from the Sun's rays, and a "day" texture on the side that directly faces the Sun. The "night" version showcases a darker Earth with glittering lights.
To enhance the realism further, I believe introducing some type of "feathering" effect would create a smoother transition between the two textures, rather than having a sharp separation. How could I achieve this?