summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders/scale_fs_gl.inc
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-08 13:34:49 +0100
committeraap <aap@papnet.eu>2021-01-08 13:34:49 +0100
commit37a58a04f2895a37fd961ee6e3ff7df80d22f110 (patch)
tree3483ae7a0de117b9f34b0481368dfe3d13d12e0e /src/extras/shaders/scale_fs_gl.inc
parentfirst commit for LCS (diff)
downloadre3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar
re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.gz
re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.bz2
re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.lz
re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.xz
re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.zst
re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.zip
Diffstat (limited to 'src/extras/shaders/scale_fs_gl.inc')
-rw-r--r--src/extras/shaders/scale_fs_gl.inc20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/extras/shaders/scale_fs_gl.inc b/src/extras/shaders/scale_fs_gl.inc
new file mode 100644
index 00000000..8d9563e2
--- /dev/null
+++ b/src/extras/shaders/scale_fs_gl.inc
@@ -0,0 +1,20 @@
+const char *scale_frag_src =
+"uniform sampler2D tex0;\n"
+"uniform vec4 u_colorscale;\n"
+
+"FSIN vec4 v_color;\n"
+"FSIN vec2 v_tex0;\n"
+"FSIN float v_fog;\n"
+
+"void\n"
+"main(void)\n"
+"{\n"
+" vec4 color;\n"
+" color = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y))*u_colorscale;\n"
+" color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog);\n"
+" DoAlphaTest(color.a);\n"
+
+" FRAGCOLOR(color);\n"
+"}\n"
+
+;