gl_PerVertex outputs
This commit is contained in:
parent
fe2aa7ff92
commit
28fee1fe6c
6 changed files with 16 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue