wren
Vulkan-based game engine
Toggle main menu visibility
Loading...
Searching...
No Matches
mesh.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <string_view>
4
5
namespace
wren::shaders
{
6
7
const
std::string_view
kMeshVertShader
= R
"(
8
#version 450
9
10
layout(location = 0) in vec3 in_position;
11
layout(location = 1) in vec3 in_color;
12
13
layout(binding = 0) uniform GLOBALS {
14
mat4 view;
15
mat4 proj;
16
} globals;
17
18
layout(binding = 1) uniform LOCALS {
19
mat4 model;
20
} locals;
21
22
layout(location = 0) out vec3 out_color;
23
24
void main() {
25
gl_Position = globals.proj * globals.view * locals.model * vec4(in_position, 1.0);
26
out_color = in_color;
27
}
28
)";
29
30
const
std::string_view
kMeshFragShader
= R
"(
31
#version 450
32
33
layout(location = 0) in vec3 in_color;
34
35
layout(location = 0) out vec4 out_color;
36
37
void main() {
38
out_color = vec4(in_color, 1.0);
39
}
40
41
)";
42
43
}
// namespace wren::shaders
wren::shaders
Definition
editor_scene.hpp:5
wren::shaders::kMeshFragShader
const std::string_view kMeshFragShader
Definition
mesh.hpp:30
wren::shaders::kMeshVertShader
const std::string_view kMeshVertShader
Definition
mesh.hpp:7
wren
include
wren
shaders
mesh.hpp
Generated by
1.17.0