Internal linkage for deferred renderer shaders code

This commit is contained in:
Nikita Lisitsa 2020-10-25 15:43:56 +03:00
parent 25affcc29a
commit 9940dd19a0

View file

@ -13,7 +13,7 @@
namespace psemek::gfx namespace psemek::gfx
{ {
char const g_buffer_pass_common[] = static char const g_buffer_pass_common[] =
R"(#version 330 R"(#version 330
const uint O_UNIFORM_COLOR = 1u << 0; const uint O_UNIFORM_COLOR = 1u << 0;
@ -28,7 +28,7 @@ const uint O_INSTANCED = 1u << 7;
uniform uint u_flag_mask; uniform uint u_flag_mask;
)"; )";
char const g_buffer_pass_vs[] = static char const g_buffer_pass_vs[] =
R"( R"(
uniform mat4 u_camera_transform; uniform mat4 u_camera_transform;
@ -80,7 +80,7 @@ void main()
} }
)"; )";
char const g_buffer_pass_fs[] = static char const g_buffer_pass_fs[] =
R"( R"(
uniform vec4 u_color; uniform vec4 u_color;
@ -124,7 +124,7 @@ void main()
} }
)"; )";
char const fullscreen_vs[] = static char const fullscreen_vs[] =
R"(#version 330 R"(#version 330
const vec4 vertices[6] = vec4[6]( const vec4 vertices[6] = vec4[6](
@ -147,7 +147,7 @@ void main()
} }
)"; )";
char const screen_vs[] = static char const screen_vs[] =
R"(#version 330 R"(#version 330
layout (location = 0) in vec2 in_position; layout (location = 0) in vec2 in_position;
@ -162,7 +162,7 @@ void main()
} }
)"; )";
char const ambient_pass_fs[] = static char const ambient_pass_fs[] =
R"(#version 330 R"(#version 330
uniform sampler2D u_g0; uniform sampler2D u_g0;
@ -193,7 +193,7 @@ void main()
} }
)"; )";
char const directional_light_pass_fs[] = static char const directional_light_pass_fs[] =
R"(#version 330 R"(#version 330
uniform sampler2D u_g0; uniform sampler2D u_g0;
@ -233,7 +233,7 @@ void main()
} }
)"; )";
char const point_light_pass_fs[] = static char const point_light_pass_fs[] =
R"(#version 330 R"(#version 330
uniform sampler2D u_g0; uniform sampler2D u_g0;
@ -279,7 +279,6 @@ void main()
} }
)"; )";
static std::size_t bbox_to_screen_fan(geom::matrix<float, 4, 4> const & camera_transform, geom::box<float, 3> const & b, geom::point<float, 2> * result) static std::size_t bbox_to_screen_fan(geom::matrix<float, 4, 4> const & camera_transform, geom::box<float, 3> const & b, geom::point<float, 2> * result)
{ {
geom::point<float, 2> bbox_corners_screen[8]; geom::point<float, 2> bbox_corners_screen[8];