This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
Campbell Barton 02f28da187 Cleanup: trailing spaces
Applied to newly added files in 2.8
2018-04-22 08:45:52 +02:00

34 lines
699 B
GLSL

uniform mat4 ModelViewProjectionMatrix;
#ifdef MESH_SHADER
uniform mat4 ModelMatrix;
uniform mat4 ModelViewMatrix;
uniform mat3 WorldNormalMatrix;
# ifndef ATTRIB
uniform mat3 NormalMatrix;
# endif
#endif
in vec3 pos;
in vec3 nor;
#ifdef MESH_SHADER
out vec3 worldPosition;
out vec3 viewPosition;
out vec3 worldNormal;
out vec3 viewNormal;
#endif
void main() {
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
#ifdef MESH_SHADER
viewPosition = (ModelViewMatrix * vec4(pos, 1.0)).xyz;
worldPosition = (ModelMatrix * vec4(pos, 1.0)).xyz;
viewNormal = normalize(NormalMatrix * nor);
worldNormal = normalize(WorldNormalMatrix * nor);
#ifdef ATTRIB
pass_attrib(pos);
#endif
#endif
}