filename | src/pvr2/shaders.glsl |
changeset | 1130:5f56fc931112 |
next | 1140:7dc1c71ece76 |
author | nkeynes |
date | Sun Oct 24 13:40:52 2010 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Change forced-depth-function lists (autosort, punchout) to just set the depth once at the start of the list Remove unused parameter from render_set_tsp_context |
view | annotate | diff | log | raw |
1 /**
2 * $Id$
3 *
4 * Assorted shader definitions (optionally) used by the PVR2 rendering
5 * engine.
6 *
7 * This file is preprocessed by genglsl to produce shaders.c and shaders.h.
8 *
9 * Copyright (c) 2007-2010 Nathan Keynes.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 */
22 #vertex DEFAULT_VERTEX_SHADER
23 void main()
24 {
25 vec4 tmp = ftransform();
26 float w = gl_Vertex.z;
27 gl_Position = tmp * w;
28 gl_FrontColor = gl_Color;
29 gl_FrontSecondaryColor = gl_SecondaryColor;
30 gl_TexCoord[0] = gl_MultiTexCoord0;
31 gl_FogFragCoord = gl_FogCoord;
32 }
34 #fragment DEFAULT_FRAGMENT_SHADER
35 void main()
36 {
37 gl_FragColor = gl_Color;
38 gl_FragDepth = gl_FragCoord.z;
39 }
41 #program DEFAULT_PROGRAM = DEFAULT_VERTEX_SHADER
.