gl_PerVertex outputs
This commit is contained in:
parent
fe2aa7ff92
commit
28fee1fe6c
6 changed files with 16 additions and 1 deletions
|
|
@ -15,6 +15,11 @@ layout (binding = 0) uniform UBO
|
||||||
|
|
||||||
layout (location = 0) out vec3 outUV;
|
layout (location = 0) out vec3 outUV;
|
||||||
|
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
};
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
outUV = vec3(inUV.st, inNormal.z);
|
outUV = vec3(inUV.st, inNormal.z);
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -14,6 +14,11 @@ layout (binding = 0) uniform UBO
|
||||||
|
|
||||||
layout (location = 0) out vec2 outUV;
|
layout (location = 0) out vec2 outUV;
|
||||||
|
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
};
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
outUV = inUV;
|
outUV = inUV;
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -20,6 +20,11 @@ layout (location = 1) out vec2 outUV;
|
||||||
layout (location = 2) out vec3 outColor;
|
layout (location = 2) out vec3 outColor;
|
||||||
layout (location = 3) out vec3 outWorldPos;
|
layout (location = 3) out vec3 outWorldPos;
|
||||||
|
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
};
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = ubo.projection * ubo.view * ubo.model * inPos;
|
gl_Position = ubo.projection * ubo.view * ubo.model * inPos;
|
||||||
|
|
@ -35,7 +40,7 @@ void main()
|
||||||
|
|
||||||
// Normal in world space
|
// Normal in world space
|
||||||
mat3 mNormal = transpose(inverse(mat3(ubo.model)));
|
mat3 mNormal = transpose(inverse(mat3(ubo.model)));
|
||||||
outNormal = mNormal * normalize(inNormal);
|
outNormal = mNormal * normalize(inNormal);
|
||||||
|
|
||||||
// Currently just vertex color
|
// Currently just vertex color
|
||||||
outColor = inColor;
|
outColor = inColor;
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue