galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
RenderTextureShader.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_RESOURCE_EMBEDDED_RENDERTEXTURESHADER_HPP_
9#define GALAXY_RESOURCE_EMBEDDED_RENDERTEXTURESHADER_HPP_
10
11namespace galaxy
12{
13 namespace resource
14 {
18 constexpr const auto render_texture_shader_vert = R"(
19 #version 460 core
20 layout(location = 0) in vec2 l_pos;
21 layout(location = 1) in vec2 l_texels;
22
23 out vec2 io_texels;
24
25 uniform mat4 u_projection;
26 uniform mat4 u_transform;
27
28 void main()
29 {
30 gl_Position = u_projection * u_transform * vec4(l_pos, 0.0, 1.0);
31
32 io_texels = l_texels;
33 io_texels.y = 1.0 - io_texels.y;
34 }
35 )";
36
40 constexpr const auto render_texture_shader_frag = R"(
41 #version 460 core
42
43 in vec2 io_texels;
44 out vec4 io_frag_colour;
45
46 uniform sampler2D u_texture;
47
48 void main()
49 {
50 io_frag_colour = texture(u_texture, io_texels);
51 }
52 )";
53 } // namespace resource
54} // namespace galaxy
55
56#endif
constexpr const auto render_texture_shader_frag
Render To Texture fragment shader.
constexpr const auto render_texture_shader_vert
Render To Texture vertex shader.
Timer.hpp galaxy.
Definition Async.hpp:17