parent
4af6419f43
commit
648339bbe6
38 changed files with 4 additions and 67 deletions
Binary file not shown.
|
|
@ -14,11 +14,6 @@ layout (binding = 0) uniform UBO
|
|||
|
||||
layout (location = 0) out vec3 outUV;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
outUV = vec3(inUV.st, gl_InstanceIndex);
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -14,11 +14,6 @@ layout (binding = 0) uniform UBO
|
|||
|
||||
layout (location = 0) out vec2 outUV;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
outUV = inUV;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -23,11 +23,6 @@ layout (location = 2) out vec3 outColor;
|
|||
layout (location = 3) out vec3 outWorldPos;
|
||||
layout (location = 4) out vec3 outTangent;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 tmpPos = inPos + ubo.instancePos[gl_InstanceIndex];
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -16,11 +16,6 @@ layout (binding = 0) uniform UBO
|
|||
|
||||
layout (location = 0) in int inInstanceIndex[];
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 instancedPos = ubo.instancePos[inInstanceIndex[0]];
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -7,11 +7,6 @@ layout (location = 0) in vec4 inPos;
|
|||
|
||||
layout (location = 0) out int outInstanceIndex;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
outInstanceIndex = gl_InstanceIndex;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -1,18 +1,10 @@
|
|||
#version 450
|
||||
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
|
||||
layout (location = 0) in vec3 inPos;
|
||||
layout (location = 1) in vec3 inNormal;
|
||||
|
||||
layout (location = 0) out vec3 outNormal;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main(void)
|
||||
{
|
||||
outNormal = inNormal;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -18,11 +18,6 @@ layout (location = 1) out vec3 outColor;
|
|||
layout (location = 2) out vec3 outViewVec;
|
||||
layout (location = 3) out vec3 outLightVec;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
outNormal = inNormal;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -20,11 +20,6 @@ layout(push_constant) uniform PushConsts {
|
|||
vec3 objPos;
|
||||
} pushConsts;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
outNormal = inNormal;
|
||||
|
|
@ -34,8 +29,8 @@ void main()
|
|||
vec3 worldPos = vec3(ubo.modelview * vec4(inPos + pushConsts.objPos, 1.0));
|
||||
gl_Position = ubo.projection /* ubo.modelview */ * vec4(worldPos, 1.0);
|
||||
|
||||
vec4 pos = ubo.modelview * vec4(worldPos, 1.0);
|
||||
outNormal = mat3(ubo.modelview) * inNormal;
|
||||
outLightVec = ubo.lightPos.xyz - pos.xyz;
|
||||
outViewVec = -pos.xyz;
|
||||
vec4 pos = ubo.modelview * vec4(worldPos, 1.0);
|
||||
outNormal = mat3(ubo.modelview) * inNormal;
|
||||
outLightVec = ubo.lightPos.xyz - pos.xyz;
|
||||
outViewVec = -pos.xyz;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -11,11 +11,6 @@ layout (set = 0, binding = 0) uniform UBO
|
|||
mat4 mvp;
|
||||
} ubo;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = ubo.mvp * vec4(inPos, 1.0);
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -10,11 +10,6 @@ layout (location = 2) in vec2 inUV;
|
|||
layout (location = 0) out vec3 outNormal;
|
||||
layout (location = 1) out vec2 outUV;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vec4(inPos.xyz, 1.0);
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -10,11 +10,6 @@ layout (location = 2) in vec2 inUV;
|
|||
layout (location = 0) out vec3 outNormal;
|
||||
layout (location = 1) out vec2 outUV;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vec4(inPos.xyz, 1.0);
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -7,11 +7,6 @@ layout (location = 2) in vec3 inColor;
|
|||
layout (location = 0) out vec3 outNormal;
|
||||
layout (location = 1) out vec3 outColor;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
outColor = inColor;
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue