gl_PerVertex outputs

This commit is contained in:
saschawillems 2016-07-03 17:30:27 +02:00
parent fe2aa7ff92
commit 28fee1fe6c
6 changed files with 16 additions and 1 deletions

View file

@ -15,6 +15,11 @@ layout (binding = 0) uniform UBO
layout (location = 0) out vec3 outUV;
out gl_PerVertex
{
vec4 gl_Position;
};
void main()
{
outUV = vec3(inUV.st, inNormal.z);

Binary file not shown.

View file

@ -14,6 +14,11 @@ layout (binding = 0) uniform UBO
layout (location = 0) out vec2 outUV;
out gl_PerVertex
{
vec4 gl_Position;
};
void main()
{
outUV = inUV;

View file

@ -20,6 +20,11 @@ layout (location = 1) out vec2 outUV;
layout (location = 2) out vec3 outColor;
layout (location = 3) out vec3 outWorldPos;
out gl_PerVertex
{
vec4 gl_Position;
};
void main()
{
gl_Position = ubo.projection * ubo.view * ubo.model * inPos;
@ -35,7 +40,7 @@ void main()
// Normal in world space
mat3 mNormal = transpose(inverse(mat3(ubo.model)));
outNormal = mNormal * normalize(inNormal);
outNormal = mNormal * normalize(inNormal);
// Currently just vertex color
outColor = inColor;

Binary file not shown.