Search
lxdream.org :: lxdream/src/pvr2/shaders.glsl
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/shaders.glsl
changeset 1130:5f56fc931112
next1140:7dc1c71ece76
author nkeynes
date Sun Oct 24 15:22:59 2010 +1000 (11 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
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
.