Different scene, toon shading and separate parameters for color input attachment
This commit is contained in:
parent
bdb9af7ef7
commit
0fb88d5467
8 changed files with 74 additions and 31 deletions
|
|
@ -1,9 +1,6 @@
|
|||
#version 450
|
||||
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
|
||||
layout (location = 0) in vec4 inPos;
|
||||
layout (location = 0) in vec3 inPos;
|
||||
layout (location = 1) in vec3 inColor;
|
||||
layout (location = 2) in vec3 inNormal;
|
||||
|
||||
|
|
@ -14,6 +11,9 @@ layout (binding = 0) uniform UBO {
|
|||
} ubo;
|
||||
|
||||
layout (location = 0) out vec3 outColor;
|
||||
layout (location = 1) out vec3 outNormal;
|
||||
layout (location = 2) out vec3 outViewVec;
|
||||
layout (location = 3) out vec3 outLightVec;
|
||||
|
||||
out gl_PerVertex {
|
||||
vec4 gl_Position;
|
||||
|
|
@ -21,6 +21,9 @@ out gl_PerVertex {
|
|||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ubo.projection * ubo.view * ubo.model * inPos;
|
||||
gl_Position = ubo.projection * ubo.view * ubo.model * vec4(inPos, 1.0);
|
||||
outColor = inColor;
|
||||
outNormal = inNormal;
|
||||
outLightVec = vec3(0.0f, 5.0f, 15.0f) - inPos;
|
||||
outViewVec = -inPos.xyz;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue