use srb2´s sky shader
also its finally a defined shader now + move default fragment shader to the top
This commit is contained in:
1 parent
910e20b542
commit
39489fc6f1
1 file changed
+17
-9
@@ -687,6 +687,17 @@ static float shader_leveltime = 0;
|
||||
// Fragment shader macros
|
||||
// ========================
|
||||
|
||||
//
|
||||
// GLSL generic fragment shader
|
||||
//
|
||||
|
||||
#define GLSL_DEFAULT_FRAGMENT_SHADER \
|
||||
"uniform sampler2D tex;\n" \
|
||||
"uniform vec4 poly_color;\n" \
|
||||
"void main(void) {\n" \
|
||||
"gl_FragColor = texture2D(tex, gl_TexCoord[0].st) * poly_color;\n" \
|
||||
"}\0"
|
||||
|
||||
//
|
||||
// GLSL Software fragment shader
|
||||
//
|
||||
@@ -919,14 +930,14 @@ static float shader_leveltime = 0;
|
||||
"}\0"
|
||||
|
||||
//
|
||||
// GLSL generic fragment shader
|
||||
//
|
||||
|
||||
#define GLSL_DEFAULT_FRAGMENT_SHADER \
|
||||
// Sky fragment shader
|
||||
// Modulates poly_color with gl_Color
|
||||
//
|
||||
#define GLSL_SKY_FRAGMENT_SHADER \
|
||||
"uniform sampler2D tex;\n" \
|
||||
"uniform vec4 poly_color;\n" \
|
||||
"void main(void) {\n" \
|
||||
"gl_FragColor = texture2D(tex, gl_TexCoord[0].st) * poly_color;\n" \
|
||||
"gl_FragColor = texture2D(tex, gl_TexCoord[0].st) * gl_Color * poly_color;\n" \
|
||||
"}\0"
|
||||
|
||||
static const char *fragment_shaders[] = {
|
||||
@@ -952,10 +963,7 @@ static const char *fragment_shaders[] = {
|
||||
GLSL_FOG_FRAGMENT_SHADER,
|
||||
|
||||
// Sky fragment shader
|
||||
"uniform sampler2D tex;\n"
|
||||
"void main(void) {\n"
|
||||
"gl_FragColor = texture2D(tex, gl_TexCoord[0].st);\n"
|
||||
"}\0",
|
||||
GLSL_SKY_FRAGMENT_SHADER,
|
||||
|
||||
// Palette fragment shader
|
||||
GLSL_PALETTE_FRAGMENT_SHADER,
|
||||
|
||||
Reference in new issue
Block a user