texture loading and depth buffer
This commit is contained in:
parent
0137d21406
commit
f6276bfdf6
14 changed files with 695 additions and 159 deletions
|
@ -1,3 +1,2 @@
|
|||
C:/VulkanSDK/1.3.280.0/Bin/glslc.exe shaders/shader.vert -o shaders/vert.spv
|
||||
C:/VulkanSDK/1.3.280.0/Bin/glslc.exe shaders/shader.frag -o shaders/frag.spv
|
||||
pause
|
||||
C:/VulkanSDK/1.3.280.0/Bin/glslc.exe shaders/shader.frag -o shaders/frag.spv
|
BIN
shaders/frag.spv
BIN
shaders/frag.spv
Binary file not shown.
|
@ -1,9 +1,11 @@
|
|||
#version 450
|
||||
|
||||
layout(location = 0) in vec3 fragColor;
|
||||
layout(location = 1) in vec2 fragTexCoord;
|
||||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
layout(binding = 1) uniform sampler2D texSampler;
|
||||
|
||||
void main() {
|
||||
outColor = vec4(fragColor, 1.0);
|
||||
outColor = texture(texSampler, fragTexCoord);
|
||||
}
|
|
@ -7,12 +7,15 @@ layout(binding = 0) uniform UniformBufferObject {
|
|||
} ubo;
|
||||
|
||||
|
||||
layout(location = 0) in vec2 inPosition;
|
||||
layout(location = 0) in vec3 inPosition;
|
||||
layout(location = 1) in vec3 inColor;
|
||||
layout(location = 2) in vec2 inTexCoord;
|
||||
|
||||
layout(location = 0) out vec3 fragColor;
|
||||
layout(location = 1) out vec2 fragTexCoord;
|
||||
|
||||
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;
|
||||
fragTexCoord = inTexCoord;
|
||||
}
|
BIN
shaders/vert.spv
BIN
shaders/vert.spv
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue