From 91df2beee394afc17f379511007a7b26b911278f Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 23 Aug 2020 21:28:15 -0300 Subject: video_core/host_shaders: Add CMake integration for string shaders Add the necessary CMake code to copy the contents in a string source shader (GLSL or GLASM) to a header file then consumed by video_core files. This allows editting GLSL in its own files without having to maintain them in source files. For now, only OpenGL presentation shaders are moved, but we can add GLASM presentation shaders and static SPIR-V generation through glslangValidator in the future. --- src/video_core/host_shaders/opengl_present.frag | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/video_core/host_shaders/opengl_present.frag (limited to 'src/video_core/host_shaders/opengl_present.frag') diff --git a/src/video_core/host_shaders/opengl_present.frag b/src/video_core/host_shaders/opengl_present.frag new file mode 100644 index 000000000..8a4cb024b --- /dev/null +++ b/src/video_core/host_shaders/opengl_present.frag @@ -0,0 +1,10 @@ +#version 430 core + +layout (location = 0) in vec2 frag_tex_coord; +layout (location = 0) out vec4 color; + +layout (binding = 0) uniform sampler2D color_texture; + +void main() { + color = vec4(texture(color_texture, frag_tex_coord).rgb, 1.0f); +} -- cgit v1.2.3