From 9d944f26d359e4bc1ffd8e44350b0df9f0935b18 Mon Sep 17 00:00:00 2001 From: pryazha Date: Sun, 15 Jun 2025 16:11:31 +0500 Subject: something --- advanced_lighting/9.ssao/gbuffer.vert | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 advanced_lighting/9.ssao/gbuffer.vert (limited to 'advanced_lighting/9.ssao/gbuffer.vert') diff --git a/advanced_lighting/9.ssao/gbuffer.vert b/advanced_lighting/9.ssao/gbuffer.vert new file mode 100644 index 0000000..81ab951 --- /dev/null +++ b/advanced_lighting/9.ssao/gbuffer.vert @@ -0,0 +1,21 @@ +#version 330 core + +layout (location = 0) in vec3 position; +layout (location = 1) in vec3 normal; + +out vert_t { + vec3 position; + vec3 normal; +} vert; + +uniform mat4 projection; +uniform mat4 view; +uniform mat4 model; + +void main() +{ + vert.position = vec3(view * model * vec4(position, 1.0)); + mat3 matrix_normal = transpose(inverse(mat3(view * model))); + vert.normal = matrix_normal * normal; + gl_Position = projection * view * model * vec4(position, 1.0); +} -- cgit v1.2.3-70-g09d2