diff --git a/src/singletons/draw-manager/earth.ts b/src/singletons/draw-manager/earth.ts index 6f52585c9..ff0b8a80c 100644 --- a/src/singletons/draw-manager/earth.ts +++ b/src/singletons/draw-manager/earth.ts @@ -182,7 +182,7 @@ export class Earth { const pos = Sun.position(EpochUTC.fromDateTime(keepTrackApi.getTimeManager().simulationTimeObj)); this.lightDirection = [pos.x, pos.y, pos.z]; - vec3.normalize(( this.lightDirection), ( this.lightDirection)); + vec3.normalize((this.lightDirection), (this.lightDirection)); this.modelViewMatrix_ = mat4.copy(mat4.create(), this.mesh.geometry.localMvMatrix); // this.modelViewMatrix_ = mat4.mul(this.modelViewMatrix_, keepTrackApi.getMainCamera().camMatrix, this.modelViewMatrix_); @@ -373,6 +373,10 @@ export class Earth { this.setUniforms_(gl); this.setTextures_(gl); + gl.enable(gl.DEPTH_TEST); + gl.disable(gl.BLEND); + gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); + gl.bindVertexArray(this.mesh.geometry.vao); gl.drawElements(gl.TRIANGLES, this.mesh.geometry.indexLength, gl.UNSIGNED_SHORT, 0); gl.bindVertexArray(null);