probably I should add some makefile rule instead.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3958 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
fb214142a3
commit
fceb77d3cb
1 changed files with 88 additions and 0 deletions
88
engine/gl/r_bishaders.h
Normal file
88
engine/gl/r_bishaders.h
Normal file
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
WARNING: THIS FILE IS GENERATED BY 'generatebuiltinsl.c'.
|
||||
YOU SHOULD NOT EDIT THIS FILE BY HAND
|
||||
*/
|
||||
|
||||
#ifdef GLQUAKE
|
||||
{QR_OPENGL, 110, "bloom_blur",
|
||||
//apply gaussian filter
|
||||
|
||||
"varying vec2 tc;\n"
|
||||
|
||||
"#ifdef VERTEX_SHADER\n"
|
||||
"attribute vec2 v_texcoord;\n"
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
"tc = v_texcoord;\n"
|
||||
"gl_Position = ftetransform();\n"
|
||||
"}\n"
|
||||
"#endif\n"
|
||||
"#ifdef FRAGMENT_SHADER\n"
|
||||
/*offset should be 1.2 pixels away from the center*/
|
||||
"uniform vec3 e_glowmod;\n"
|
||||
"uniform sampler2D s_t0;\n"
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
"gl_FragColor =\n"
|
||||
"0.3125 * texture2D(s_t0, tc - e_glowmod.st) +\n"
|
||||
"0.375 * texture2D(s_t0, tc) +\n"
|
||||
"0.3125 * texture2D(s_t0, tc + e_glowmod.st);\n"
|
||||
"}\n"
|
||||
"#endif\n"
|
||||
},
|
||||
#endif
|
||||
#ifdef GLQUAKE
|
||||
{QR_OPENGL, 110, "bloom_filter",
|
||||
//the bloom filter
|
||||
//filter out any texels which are not to bloom
|
||||
|
||||
"varying vec2 tc;\n"
|
||||
|
||||
"#ifdef VERTEX_SHADER\n"
|
||||
"attribute vec2 v_texcoord;\n"
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
"tc = v_texcoord;\n"
|
||||
"gl_Position = ftetransform();\n"
|
||||
"}\n"
|
||||
"#endif\n"
|
||||
"#ifdef FRAGMENT_SHADER\n"
|
||||
"uniform sampler2D s_t0;\n"
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
"gl_FragColor = (texture2D(s_t0, tc) - vec4(0.5, 0.5, 0.5, 0.0)) * vec4(2.0,2.0,2.0,1.0);\n"
|
||||
"}\n"
|
||||
"#endif\n"
|
||||
},
|
||||
#endif
|
||||
#ifdef GLQUAKE
|
||||
{QR_OPENGL, 110, "bloom_final",
|
||||
//add them together
|
||||
//optionally apply tonemapping
|
||||
|
||||
"varying vec2 tc;\n"
|
||||
|
||||
"#ifdef VERTEX_SHADER\n"
|
||||
"attribute vec2 v_texcoord;\n"
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
"tc = v_texcoord;\n"
|
||||
"gl_Position = ftetransform();\n"
|
||||
"}\n"
|
||||
"#endif\n"
|
||||
"#ifdef FRAGMENT_SHADER\n"
|
||||
"uniform sampler2D s_t0;\n"
|
||||
"uniform sampler2D s_t1;\n"
|
||||
"uniform sampler2D s_t2;\n"
|
||||
"uniform sampler2D s_t3;\n"
|
||||
"void main ()\n"
|
||||
"{\n"
|
||||
"gl_FragColor = \n"
|
||||
"texture2D(s_t0, tc) +\n"
|
||||
"texture2D(s_t1, tc) +\n"
|
||||
"texture2D(s_t2, tc) +\n"
|
||||
"texture2D(s_t3, tc) ;\n"
|
||||
"}\n"
|
||||
"#endif\n"
|
||||
},
|
||||
#endif
|
Loading…
Reference in a new issue