Acheron
Loading...
Searching...
No Matches
basic.hpp
1#pragma once
2
3namespace acheron::renderer::shaders {
7 struct BasicShader {
8 static constexpr const char* vertex = R"(
9#version 410 core
10layout (location = 0) in vec3 aPos;
11
12uniform mat4 u_Model;
13uniform mat4 u_ViewProj;
14
15void main() {
16 gl_Position = u_ViewProj * u_Model * vec4(aPos, 1.0);
17}
18 )";
19
20 static constexpr const char* fragment = R"(
21#version 410 core
22out vec4 FragColor;
23
24uniform vec4 u_Color;
25
26void main() {
27 FragColor = u_Color;
28}
29 )";
30 };
31}
Basic shader for rendering meshes.
Definition basic.hpp:7