Drawing a textured quad
Added new assets Loaded all texture assets into game state Loaded the basic pipeline Setup a hard-coded quad to test drawing Created a very jank vertex struct Added ReadEntireFile for filesystem Added getting file size from file handle Added a descriptor pool to each in flight frame Changed Vk_BufferCreate to handle multiple uses Added shader building to the windows.bat build script
This commit is contained in:
12
code/vulkan/shaders/basic.frag
Normal file
12
code/vulkan/shaders/basic.frag
Normal file
@@ -0,0 +1,12 @@
|
||||
#version 460 core
|
||||
|
||||
layout(location = 0) in vec2 frag_uv;
|
||||
layout(location = 1) in vec4 frag_c;
|
||||
|
||||
layout(location = 0) out vec4 framebuffer;
|
||||
|
||||
layout(binding = 1) uniform sampler2D u_image;
|
||||
|
||||
void main() {
|
||||
framebuffer = frag_c * texture(u_image, frag_uv);
|
||||
}
|
||||
Reference in New Issue
Block a user