aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host_shaders/opengl_present.frag
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-08-23 21:28:15 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-08-23 21:37:20 -0300
commit91df2beee394afc17f379511007a7b26b911278f (patch)
tree2e6889d84dc52af54f81ebafaf089620c25503eb /src/video_core/host_shaders/opengl_present.frag
parent0eaf7e1daafb6789d40fd760cc022f3ec91301c4 (diff)
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.
Diffstat (limited to 'src/video_core/host_shaders/opengl_present.frag')
-rw-r--r--src/video_core/host_shaders/opengl_present.frag10
1 files changed, 10 insertions, 0 deletions
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);
+}