wren
Vulkan-based game engine
Loading...
Searching...
No Matches
shader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string_view>
4
5namespace wren::gui {
6
7constexpr std::string_view VERTEX_SHADER = R"(
8#version 450
9
10layout(location = 0) in vec2 in_position;
11layout(location = 1) in vec4 in_colour;
12
13layout(binding = 0) uniform UBO {
14 mat4 proj;
15} ubo;
16
17layout(location = 0) out vec4 out_colour;
18
19void main () {
20 gl_Position = ubo.proj * vec4(in_position, 0.0, 1.0);
21 out_colour = in_colour;
22}
23)";
24
25constexpr std::string_view FRAGMENT_SHADER = R"(
26#version 450
27
28layout(location = 0) in vec4 in_colour;
29
30layout(location = 0) out vec4 out_colour;
31
32void main() {
33 out_colour = in_colour;
34}
35)";
36
37} // namespace wren::gui
Definition instance.hpp:10
constexpr std::string_view VERTEX_SHADER
Definition shader.hpp:7
constexpr std::string_view FRAGMENT_SHADER
Definition shader.hpp:25