I've been doing some reading and can't seem to figure out a good way to do this..
I have a simple globe with a material on it like so:
const earthGeomerty = new THREE.SphereGeometry( 4, 48, 48 );
const earthDiffuse = loader.load('assets/drought_earth_texture.png');
const earthSpec = loader.load('assets/drought_earth_texture_bump.png');
const material = new THREE.MeshPhongMaterial( {
specular: 0xffffff,
map: earthDiffuse,
specularMap: earthSpec,
normalScale: new THREE.Vector2( 1, 1 ),
shininess: 5,
transparent: true,
depthTest: true,
depthWrite: false,
polygonOffset: true,
polygonOffsetFactor: - 4,
wireframe: false
} );
and I apply this material to my earthGeometry
like so:
const sphere = new THREE.Mesh( earthGeomerty, material );
but now I want to add an atmospheric glow, which I found a nice extension for and created like so:
const atmosphereMaterial = THREEx.createAtmosphereMaterial();
but after doing a ton of reading I'm unsure of how to use both material
and atmosphereMaterial
to my single sphere
mesh.
Any help? Thanks!