-
Notifications
You must be signed in to change notification settings - Fork 0
/
atmo_shader_vert.glsl
44 lines (33 loc) · 1017 Bytes
/
atmo_shader_vert.glsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
out vec4 vpos;
out vec3 frag_position;
uniform vec3 obj_position;
uniform vec3 sun_position;
uniform float planet_radius;
uniform float planet_mass;
uniform float atmo_radius;
uniform float temperature;
uniform float surface_density;
uniform float red_scatter_base;
uniform float opacity_curve_base;
uniform vec3 atmo_colors;
uniform vec3 star_rgb;
uniform float view_path_samples;
uniform float light_path_samples;
// // = object.matrixWorld
// uniform modelMatrix;
// // = camera.matrixWorldInverse * object.matrixWorld
// out mat4 modelViewMatrix;
// // = camera.projectionMatrix
// out mat4 projectionMatrix;
// // = camera.matrixWorldInverse
// out mat4 viewMatrix;
// // = inverse transpose of modelViewMatrix
// out mat3 normalMatrix;
// // = camera position in world space
// out vec3 cameraPosition;
void main(){
//obj_position;
vpos = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
frag_position = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}