filename | src/pvr2/shaders.glsl |
changeset | 1130:5f56fc931112 |
next | 1140:7dc1c71ece76 |
author | nkeynes |
date | Sun Oct 24 15:22:59 2010 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Eliminate GL_REPLACE tex mode in favour of GL_MODULATE (by setting colour values to 1.0) - one less case for shaders to care about later |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/src/pvr2/shaders.glsl Sun Oct 24 15:22:59 2010 +10001.3 @@ -0,0 +1,42 @@1.4 +/**1.5 + * $Id$1.6 + *1.7 + * Assorted shader definitions (optionally) used by the PVR2 rendering1.8 + * engine.1.9 + *1.10 + * This file is preprocessed by genglsl to produce shaders.c and shaders.h.1.11 + *1.12 + * Copyright (c) 2007-2010 Nathan Keynes.1.13 + *1.14 + * This program is free software; you can redistribute it and/or modify1.15 + * it under the terms of the GNU General Public License as published by1.16 + * the Free Software Foundation; either version 2 of the License, or1.17 + * (at your option) any later version.1.18 + *1.19 + * This program is distributed in the hope that it will be useful,1.20 + * but WITHOUT ANY WARRANTY; without even the implied warranty of1.21 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1.22 + * GNU General Public License for more details.1.23 + */1.24 +1.25 +#vertex DEFAULT_VERTEX_SHADER1.26 +void main()1.27 +{1.28 + vec4 tmp = ftransform();1.29 + float w = gl_Vertex.z;1.30 + gl_Position = tmp * w;1.31 + gl_FrontColor = gl_Color;1.32 + gl_FrontSecondaryColor = gl_SecondaryColor;1.33 + gl_TexCoord[0] = gl_MultiTexCoord0;1.34 + gl_FogFragCoord = gl_FogCoord;1.35 +}1.36 +1.37 +#fragment DEFAULT_FRAGMENT_SHADER1.38 +void main()1.39 +{1.40 + gl_FragColor = gl_Color;1.41 + gl_FragDepth = gl_FragCoord.z;1.42 +}1.43 +1.44 +#program DEFAULT_PROGRAM = DEFAULT_VERTEX_SHADER1.45 +
.