~vladh/peony

peony/src_shaders/skysphere.vert -rw-r--r-- 513 bytes
7fc9922bVlad-Stefan Harbuz changes shaders namespace into class a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
  Peony Game Engine
  Copyright (C) 2020 Vlad-Stefan Harbuz <vlad@vladh.net>
  All rights reserved.
*/

layout (location = 0) in vec3 position;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 tex_coords;

out BLOCK {
  vec3 world_position;
  vec3 normal;
  vec2 tex_coords;
} vs_out;

void main() {
  vs_out.world_position = position;
  vs_out.normal = normalize(normal);
  vs_out.tex_coords = tex_coords;
  gl_Position = projection * mat4(mat3(view)) * vec4(vs_out.world_position, 1.0);
}