qzdoom/wadsrc/static/shaders/glsl/shaderdefs.i
Christoph Oelckers 7ba5acfb35 - added quad drawer interface so that this part can be done without altering a vertex buffer.
So far it's only the framework, the new code is not active yet.
2016-08-22 14:00:25 +02:00

60 lines
1.5 KiB
OpenEdge ABL

// This file contains common data definitions for both vertex and fragment shader
// these settings are actually pointless but there seem to be some old ATI drivers that fail to compile the shader without setting the precision here.
precision highp int;
precision highp float;
uniform vec4 uCameraPos;
uniform int uTextureMode;
uniform float uClipHeight, uClipHeightDirection;
uniform vec2 uClipSplit;
uniform vec4 uClipLine;
uniform float uAlphaThreshold;
// colors
uniform vec4 uObjectColor;
uniform vec4 uDynLightColor;
uniform vec4 uFogColor;
uniform float uDesaturationFactor;
uniform float uInterpolationFactor;
// Fixed colormap stuff
uniform int uFixedColormap; // 0, when no fixed colormap, 1 for a light value, 2 for a color blend, 3 for a fog layer
uniform vec4 uFixedColormapStart;
uniform vec4 uFixedColormapRange;
// Glowing walls stuff
uniform vec4 uGlowTopPlane;
uniform vec4 uGlowTopColor;
uniform vec4 uGlowBottomPlane;
uniform vec4 uGlowBottomColor;
uniform vec4 uSplitTopPlane;
uniform vec4 uSplitBottomPlane;
// Lighting + Fog
uniform vec4 uLightAttr;
#define uLightLevel uLightAttr.a
#define uFogDensity uLightAttr.b
#define uLightFactor uLightAttr.g
#define uLightDist uLightAttr.r
uniform int uFogEnabled;
// dynamic lights
uniform int uLightIndex;
// quad drawer stuff
#ifdef USE_QUAD_DRAWER
uniform mat4 uQuadVertices;
uniform mat4 uQuadTexCoords;
uniform int uQuadMode;
#endif
// matrices
uniform mat4 ProjectionMatrix;
uniform mat4 ViewMatrix;
uniform mat4 ModelMatrix;
uniform mat4 TextureMatrix;