From f2acac7230aed39174bc931dea9a977dd4996a44 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sun, 13 Jul 2014 21:37:12 +0200 Subject: [PATCH] Inadverly inverted shadow and shadow_grass.vert --- data/shaders/shadow.vert | 6 ++---- data/shaders/shadow_grass.vert | 6 ++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/shaders/shadow.vert b/data/shaders/shadow.vert index 0e26cdb4f..d1212e7ea 100644 --- a/data/shaders/shadow.vert +++ b/data/shaders/shadow.vert @@ -8,10 +8,8 @@ layout (std140) uniform MatrixesData }; uniform mat4 ModelMatrix; -uniform vec3 windDir; layout(location = 0) in vec3 Position; -layout(location = 2) in vec4 Color; layout(location = 3) in vec2 Texcoord; #ifdef VSLayer @@ -26,10 +24,10 @@ void main(void) #ifdef VSLayer gl_Layer = gl_InstanceID & 3; uv = Texcoord; - gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position + windDir * Color.r, 1.); + gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position, 1.); #else layerId = gl_InstanceID & 3; tc = Texcoord; - gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position + windDir * Color.r, 1.); + gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position, 1.); #endif } diff --git a/data/shaders/shadow_grass.vert b/data/shaders/shadow_grass.vert index d1212e7ea..0e26cdb4f 100644 --- a/data/shaders/shadow_grass.vert +++ b/data/shaders/shadow_grass.vert @@ -8,8 +8,10 @@ layout (std140) uniform MatrixesData }; uniform mat4 ModelMatrix; +uniform vec3 windDir; layout(location = 0) in vec3 Position; +layout(location = 2) in vec4 Color; layout(location = 3) in vec2 Texcoord; #ifdef VSLayer @@ -24,10 +26,10 @@ void main(void) #ifdef VSLayer gl_Layer = gl_InstanceID & 3; uv = Texcoord; - gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position, 1.); + gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position + windDir * Color.r, 1.); #else layerId = gl_InstanceID & 3; tc = Texcoord; - gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position, 1.); + gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position + windDir * Color.r, 1.); #endif }