6 #include "VectorMathDecl.h"
7 #include "FogShaderUniforms.h"
17 EFFECT_ATTRIB_INVALID = 0xffffffff,
19 EFFECT_ATTRIB_VERTEX = 0,
26 EFFECT_ATTRIB_BONE_WEIGHT,
27 EFFECT_ATTRIB_BONE_INDEX,
35 EFFECT_UNIFORM_INVALID = 0xffffffff,
37 EFFECT_UNIFORM_MATRIX44_MODELVIEWPROJECTION = 0,
38 EFFECT_UNIFORM_MATRIX44_MODELVIEW,
39 EFFECT_UNIFORM_VECTOR4_MODELWORLDOFFSET,
40 EFFECT_UNIFORM_VECTOR3_LIGHTDIR,
41 EFFECT_UNIFORM_VECTOR3_LIGHTCOL,
42 EFFECT_UNIFORM_VECTOR3_LIGHTAMBIENT,
43 EFFECT_UNIFORM_VECTOR3_EYEPOSITION,
44 EFFECT_UNIFORM_TEXTURE0,
45 EFFECT_UNIFORM_TEXTURE1,
46 EFFECT_UNIFORM_NORMALMAP,
47 EFFECT_UNIFORM_REFLECTIONMAP,
48 EFFECT_UNIFORM_MATRIX44_LIGHTDIR,
49 EFFECT_UNIFORM_MATRIX44_LIGHTCOL,
50 EFFECT_UNIFORM_FLOAT_SCALE,
52 EFFECT_UNIFORM_MATRIX44_BONE_LIST,
54 EFFECT_UNIFORM_VECTOR4_ANIMUV,
56 EFFECT_UNIFORM_FLOAT_SHADOWEXTRUDEDHEIGHTADJUST,
58 EFFECT_UNIFORM_FLOAT_ALPHA,
67 s32 m_uniforms[NUM_UNIFORMS];
71 bool LinkProgram (s32 prog);
78 void LoadEffect (std::string& vertShaderSource,
79 std::string& fragShaderSource,
80 EFFECT_ATTRIB* attribList,
82 EFFECT_UNIFORM* uniformList,
91 bool IsUniformValid (EFFECT_UNIFORM uniform);
93 void SetInt (EFFECT_UNIFORM uniform,
int val);
94 void SetFloat (EFFECT_UNIFORM uniform,
float val);
95 void SetVector2 (EFFECT_UNIFORM uniform,
const Eegeo::v2* vector);
96 void SetVector3 (EFFECT_UNIFORM uniform,
const Eegeo::v3* vector);
97 void SetVector4 (EFFECT_UNIFORM uniform,
const Eegeo::v4* vector);
98 void SetMatrix33 (EFFECT_UNIFORM uniform,
const Eegeo::m33* matrix);
99 void SetMatrix44 (EFFECT_UNIFORM uniform,
const Eegeo::m44* matrix);
100 void SetMatrix44List(EFFECT_UNIFORM uniform,
const Eegeo::m44* matrix, u32 numMatrices);
103 void SetPerModelFogState(
const Eegeo::v3& cameraRelativeModelOrigin);