1 2#ifndef mgl_uniform_glsl 3#define mgl_uniform_glsl 4 5#include es_precision.glsl 6 7#include mgl_const.glsl 8 9uniform mat4 mgl_PMVMatrix[4]; // P, Mv, Mvi and Mvit (transpose(inverse(ModelView)) == normalMatrix) 10uniform LOWP int mgl_ColorEnabled; 11uniform vec4 mgl_ColorStatic; 12uniform LOWP int mgl_AlphaTestFunc; 13uniform float mgl_AlphaTestRef; 14 15// [0].rgba: size, smooth, attnMinSz, attnMaxSz 16// [1].rgba: attnCoeff(3), attnFadeTs 17uniform MEDIUMP vec4 mgl_PointParams[2]; 18 19#define pointSize (mgl_PointParams[0].r) 20#define pointSmooth (mgl_PointParams[0].g) 21#define pointSizeMin (mgl_PointParams[0].b) 22#define pointSizeMax (mgl_PointParams[0].a) 23#define pointDistanceConstantAtten (mgl_PointParams[1].r) 24#define pointDistanceLinearAtten (mgl_PointParams[1].g) 25#define pointDistanceQuadraticAtten (mgl_PointParams[1].b) 26#define pointFadeThresholdSize (mgl_PointParams[1].a) 27 28// uniform LOWP int mgl_CullFace; // ES2 supports CullFace implicit .. 29#if MAX_TEXTURE_UNITS > 0 30uniform LOWP int mgl_TextureEnabled[MAX_TEXTURE_UNITS]; 31uniform LOWP int mgl_TexCoordEnabled[MAX_TEXTURE_UNITS]; 32uniform LOWP int mgl_TexEnvMode[MAX_TEXTURE_UNITS]; 33uniform LOWP int mgl_TexFormat[MAX_TEXTURE_UNITS]; 34#if MAX_TEXTURE_UNITS >= 2 35uniform sampler2D mgl_Texture0; 36uniform sampler2D mgl_Texture1; 37#endif 38#if MAX_TEXTURE_UNITS >= 4 39uniform sampler2D mgl_Texture2; 40uniform sampler2D mgl_Texture3; 41#endif 42#if MAX_TEXTURE_UNITS >= 8 43uniform sampler2D mgl_Texture4; 44uniform sampler2D mgl_Texture5; 45uniform sampler2D mgl_Texture6; 46uniform sampler2D mgl_Texture7; 47#endif 48#endif 49 50#endif // mgl_uniform_glsl 51