diff options
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl new file mode 100644 index 00000000000..a3f447a85f9 --- /dev/null +++ b/source/blender/gpu/shaders/gpu_shader_3D_normal_vert.glsl @@ -0,0 +1,13 @@ + +uniform mat4 ModelViewProjectionMatrix; +uniform mat3 NormalMatrix; + +in vec3 pos; +in vec3 nor; +out vec3 normal; + +void main() +{ + normal = normalize(NormalMatrix * nor); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); +} |