43 lines
1.3 KiB
GLSL
43 lines
1.3 KiB
GLSL
|
|
/*
|
|
* VulkZample
|
|
* Copyright (C) 2024 Rebekah Rowe
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#version 450
|
|
|
|
layout(binding = 1) uniform UniformBufferObject {
|
|
mat4 model;
|
|
mat4 view;
|
|
mat4 proj;
|
|
} ubo;
|
|
|
|
layout(location = 0) in vec3 in_position;
|
|
layout(location = 2) in vec4 in_color;
|
|
layout(location = 4) in vec2 in_texture_coordinate;
|
|
layout(location = 6) in uint in_drawmode;
|
|
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 1) out vec2 frag_texture_coordinate;
|
|
layout(location = 2) flat out uint frag_draw_mode;
|
|
|
|
void main() {
|
|
gl_Position = ubo.proj * ubo.view * ubo.model * vec4(in_position, 1.0);
|
|
frag_color = in_color;
|
|
frag_texture_coordinate = in_texture_coordinate;
|
|
frag_draw_mode = in_drawmode;
|
|
}
|