Finished depth buffer
This commit is contained in:
BIN
Shaders/frag.spv
BIN
Shaders/frag.spv
Binary file not shown.
@@ -1,9 +1,13 @@
|
||||
#version 450
|
||||
|
||||
layout(location = 0) in vec3 fragColor;
|
||||
layout(location = 1) in vec2 fragTextureCoordinates;
|
||||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
|
||||
layout(binding = 1) uniform sampler2D textureSampler;
|
||||
|
||||
void main() {
|
||||
outColor = vec4(fragColor, 1.0);
|
||||
}
|
||||
outColor = texture(textureSampler, fragTextureCoordinates);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@ layout(binding = 0) uniform UniformBufferObject {
|
||||
mat4 proj;
|
||||
} ubo;
|
||||
|
||||
layout(location = 0) in vec2 inPosition;
|
||||
layout(location = 0) in vec3 inPosition;
|
||||
layout(location = 1) in vec3 inColor;
|
||||
layout(location = 2) in vec2 inTextureCoordinates;
|
||||
|
||||
layout(location = 0) out vec3 fragColor;
|
||||
layout(location = 1) out vec2 fragTextureCoordinates;
|
||||
|
||||
void main() {
|
||||
gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 0.0, 1.0);
|
||||
gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);
|
||||
fragColor = inColor;
|
||||
fragTextureCoordinates = inTextureCoordinates;
|
||||
}
|
||||
|
||||
BIN
Shaders/vert.spv
BIN
Shaders/vert.spv
Binary file not shown.
Reference in New Issue
Block a user