Added gl_PerVertex out blocks to silence validation (Refs #277) [skip ci]

This commit is contained in:
saschawillems 2017-02-07 20:39:25 +01:00
parent f6d384d444
commit 89cc457ccc
8 changed files with 19 additions and 4 deletions

Binary file not shown.

View file

@ -21,6 +21,11 @@ layout (location = 2) out vec2 outUV;
layout (location = 3) out vec3 outViewVec; layout (location = 3) out vec3 outViewVec;
layout (location = 4) out vec3 outLightVec; layout (location = 4) out vec3 outLightVec;
out gl_PerVertex
{
vec4 gl_Position;
};
void main() void main()
{ {
outNormal = inNormal; outNormal = inNormal;
@ -28,9 +33,9 @@ void main()
outUV = inUV; outUV = inUV;
gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0); gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0);
vec4 pos = ubo.model * vec4(inPos, 1.0); vec4 pos = ubo.model * vec4(inPos, 1.0);
outNormal = mat3(ubo.model) * inNormal; outNormal = mat3(ubo.model) * inNormal;
vec3 lPos = mat3(ubo.model) * ubo.lightPos.xyz; vec3 lPos = mat3(ubo.model) * ubo.lightPos.xyz;
outLightVec = lPos - pos.xyz; outLightVec = lPos - pos.xyz;
outViewVec = -pos.xyz; outViewVec = -pos.xyz;
} }

Binary file not shown.

View file

@ -25,6 +25,11 @@ layout (location = 2) out vec3 outColor;
layout (location = 3) out vec4 outLightVec[lightCount]; layout (location = 3) out vec4 outLightVec[lightCount];
out gl_PerVertex
{
vec4 gl_Position;
};
void main() void main()
{ {
outNormal = inNormal; outNormal = inNormal;

View file

@ -22,6 +22,11 @@ layout (location = 2) out vec2 outUV;
layout (location = 3) out vec3 outViewVec; layout (location = 3) out vec3 outViewVec;
layout (location = 4) out vec3 outLightVec; layout (location = 4) out vec3 outLightVec;
out gl_PerVertex
{
vec4 gl_Position;
};
void main() void main()
{ {
outNormal = inNormal; outNormal = inNormal;