summaryrefslogtreecommitdiff
path: root/advanced_lighting/7.bloom/shaders/bloom.vert
diff options
context:
space:
mode:
Diffstat (limited to 'advanced_lighting/7.bloom/shaders/bloom.vert')
-rw-r--r--advanced_lighting/7.bloom/shaders/bloom.vert24
1 files changed, 24 insertions, 0 deletions
diff --git a/advanced_lighting/7.bloom/shaders/bloom.vert b/advanced_lighting/7.bloom/shaders/bloom.vert
new file mode 100644
index 0000000..0c9dc02
--- /dev/null
+++ b/advanced_lighting/7.bloom/shaders/bloom.vert
@@ -0,0 +1,24 @@
+#version 330 core
+
+layout (location = 0) in vec3 position;
+layout (location = 1) in vec3 normal;
+layout (location = 2) in vec2 tex_coords;
+
+out VS_OUT {
+ vec3 position;
+ vec3 normal;
+ vec2 tex_coords;
+} vs_out;
+
+uniform mat4 projection;
+uniform mat4 view;
+uniform mat4 model;
+
+void main()
+{
+ vs_out.position = vec3(model * vec4(position, 1.0));
+ mat3 normal_matrix = transpose(inverse(mat3(model)));
+ vs_out.normal = normalize(normal_matrix * normal);
+ vs_out.tex_coords = tex_coords;
+ gl_Position = projection * view * model * vec4(position, 1.0);
+}