23 lines
556 B
GLSL
23 lines
556 B
GLSL
#define EARTH
|
|
varying vec3 vViewPosition;
|
|
varying vec3 vLightDirection;
|
|
varying vec2 vUv;
|
|
varying vec3 vEyeNormal;
|
|
#include <common>
|
|
#include <normal_pars_vertex>
|
|
uniform vec3 light;
|
|
void main() {
|
|
#include <beginnormal_vertex>
|
|
#include <defaultnormal_vertex>
|
|
#include <normal_vertex>
|
|
#include <begin_vertex>
|
|
#include <project_vertex>
|
|
|
|
vViewPosition = - mvPosition.xyz;
|
|
vLightDirection = (viewMatrix * vec4(light, 0.)).xyz;
|
|
vec4 viewPos = modelViewMatrix * vec4(position, 1.0);
|
|
vEyeNormal = (modelViewMatrix * vec4(normal, 0.)).xyz;
|
|
|
|
vUv = uv;
|
|
}
|