Inadverly inverted shadow and shadow_grass.vert
This commit is contained in:
parent
54b1ce39e4
commit
f2acac7230
@ -8,10 +8,8 @@ layout (std140) uniform MatrixesData
|
|||||||
};
|
};
|
||||||
|
|
||||||
uniform mat4 ModelMatrix;
|
uniform mat4 ModelMatrix;
|
||||||
uniform vec3 windDir;
|
|
||||||
|
|
||||||
layout(location = 0) in vec3 Position;
|
layout(location = 0) in vec3 Position;
|
||||||
layout(location = 2) in vec4 Color;
|
|
||||||
layout(location = 3) in vec2 Texcoord;
|
layout(location = 3) in vec2 Texcoord;
|
||||||
|
|
||||||
#ifdef VSLayer
|
#ifdef VSLayer
|
||||||
@ -26,10 +24,10 @@ void main(void)
|
|||||||
#ifdef VSLayer
|
#ifdef VSLayer
|
||||||
gl_Layer = gl_InstanceID & 3;
|
gl_Layer = gl_InstanceID & 3;
|
||||||
uv = Texcoord;
|
uv = Texcoord;
|
||||||
gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position + windDir * Color.r, 1.);
|
gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position, 1.);
|
||||||
#else
|
#else
|
||||||
layerId = gl_InstanceID & 3;
|
layerId = gl_InstanceID & 3;
|
||||||
tc = Texcoord;
|
tc = Texcoord;
|
||||||
gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position + windDir * Color.r, 1.);
|
gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position, 1.);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,10 @@ layout (std140) uniform MatrixesData
|
|||||||
};
|
};
|
||||||
|
|
||||||
uniform mat4 ModelMatrix;
|
uniform mat4 ModelMatrix;
|
||||||
|
uniform vec3 windDir;
|
||||||
|
|
||||||
layout(location = 0) in vec3 Position;
|
layout(location = 0) in vec3 Position;
|
||||||
|
layout(location = 2) in vec4 Color;
|
||||||
layout(location = 3) in vec2 Texcoord;
|
layout(location = 3) in vec2 Texcoord;
|
||||||
|
|
||||||
#ifdef VSLayer
|
#ifdef VSLayer
|
||||||
@ -24,10 +26,10 @@ void main(void)
|
|||||||
#ifdef VSLayer
|
#ifdef VSLayer
|
||||||
gl_Layer = gl_InstanceID & 3;
|
gl_Layer = gl_InstanceID & 3;
|
||||||
uv = Texcoord;
|
uv = Texcoord;
|
||||||
gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position, 1.);
|
gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position + windDir * Color.r, 1.);
|
||||||
#else
|
#else
|
||||||
layerId = gl_InstanceID & 3;
|
layerId = gl_InstanceID & 3;
|
||||||
tc = Texcoord;
|
tc = Texcoord;
|
||||||
gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position, 1.);
|
gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position + windDir * Color.r, 1.);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user