Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

shaders.h

Go to the documentation of this file.
00001 /*
00002 ===========================================================================
00003 Copyright (C) 1999-2005 Id Software, Inc.
00004 
00005 This file is part of Quake III Arena source code.
00006 
00007 Quake III Arena source code is free software; you can redistribute it
00008 and/or modify it under the terms of the GNU General Public License as
00009 published by the Free Software Foundation; either version 2 of the License,
00010 or (at your option) any later version.
00011 
00012 Quake III Arena source code is distributed in the hope that it will be
00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Foobar; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 ===========================================================================
00021 */
00022 
00023 
00024 typedef struct shaderInfo_s {
00025     char        shader[MAX_QPATH];
00026     int         surfaceFlags;
00027     int         contents;
00028     int         value;
00029 
00030     char        backShader[MAX_QPATH];  // for surfaces that generate different front and back passes
00031     char        flareShader[MAX_QPATH]; // for light flares
00032 
00033     float       subdivisions;           // from a "tesssize xxx"
00034     float       backsplashFraction;     // floating point value, usually 0.05
00035     float       backsplashDistance;     // default 16
00036     float       lightSubdivide;         // default 120
00037     int         lightmapSampleSize;     // lightmap sample size
00038 
00039     qboolean    hasPasses;              // false if the shader doesn't define any rendering passes
00040 
00041     qboolean    globalTexture;          // don't normalize texture repeats
00042 
00043     qboolean    twoSided;               // cull none
00044     qboolean    autosprite;             // autosprite shaders will become point lights
00045                                         // instead of area lights
00046     qboolean    lightFilter;            // light rays that cross surfaces of this type
00047                                         // should test against the filter image
00048     qboolean    forceTraceLight;        // always use -light for this surface
00049     qboolean    forceVLight;            // always use -vlight for this surface
00050     qboolean    patchShadows;           // have patches casting shadows when using -light for this surface
00051     qboolean    vertexShadows;          // shadows will be casted at this surface even when vertex lit
00052     qboolean    noVertexShadows;        // no shadows will be casted at this surface in vertex lighting
00053     qboolean    forceSunLight;          // force sun light at this surface even tho we might not calculate shadows in vertex lighting
00054     qboolean    notjunc;                // don't use this surface for tjunction fixing
00055     float       vertexScale;            // vertex light scale
00056 
00057     char        editorimage[MAX_QPATH]; // use this image to generate texture coordinates
00058     char        lightimage[MAX_QPATH];  // use this image to generate color / averageColor
00059     vec3_t      color;                  // colorNormalized
00060     vec3_t      averageColor;
00061 
00062     int         width, height;
00063     byte        *pixels;
00064 
00065     vec3_t      sunLight;
00066     vec3_t      sunDirection;
00067 } shaderInfo_t;
00068 
00069 void LoadShaderInfo( void );
00070 shaderInfo_t    *ShaderInfoForShader( const char *shader );
00071 

Generated on Thu Aug 25 12:38:22 2005 for Quake III Arena by  doxygen 1.3.9.1