diff options
Diffstat (limited to 'advanced_lighting/4.normal_mapping/shaders/shadow.vs')
-rw-r--r-- | advanced_lighting/4.normal_mapping/shaders/shadow.vs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/advanced_lighting/4.normal_mapping/shaders/shadow.vs b/advanced_lighting/4.normal_mapping/shaders/shadow.vs deleted file mode 100644 index ac8ee4f..0000000 --- a/advanced_lighting/4.normal_mapping/shaders/shadow.vs +++ /dev/null @@ -1,29 +0,0 @@ -#version 330 core -layout(location = 0) in vec3 apos; -layout(location = 1) in vec3 anormal; -layout(location = 2) in vec2 atex_coords; - -out VS_OUT { - vec3 frag_pos; - vec3 normal; - vec2 tex_coords; -} vs_out; - -uniform mat4 projection; -uniform mat4 view; -uniform mat4 model; - -uniform bool reverse_normals; - -void -main(void) -{ - vs_out.frag_pos = vec3(model*vec4(apos, 1.0)); - if (reverse_normals) - vs_out.normal = mat3(transpose(inverse(model)))*(-1.0*anormal); - else - vs_out.normal = mat3(transpose(inverse(model)))*anormal; - - vs_out.tex_coords = atex_coords; - gl_Position = projection*view*vec4(vs_out.frag_pos, 1.0); -} |