1 2// Uniforms which are always available 3#include ":u_projViewTrans" 4#include ":u_worldTrans" 5#include ":u_cameraPosition" 6#include ":u_normalMatrix" 7// Other uniforms 8#include ":u_opacity" 9#include ":u_alphaTest" 10#include ":u_shininess" 11 12#include ":u_diffuseColor" 13#include ":u_diffuseTexture" 14#include ":u_specularColor" 15#include ":u_specularTexture" 16#include ":u_normalTexture" 17 18[u_projViewTrans] 19 uniform mat4 u_projViewTrans; 20 21[u_worldTrans] 22 uniform mat4 u_worldTrans; 23 24[u_cameraPosition] 25 uniform vec4 u_cameraPosition; 26 27[u_normalMatrix] 28 uniform mat3 u_normalMatrix; 29 30[u_opacity] 31#ifdef blendedFlag 32 uniform float u_opacity; 33#else 34 const float u_opacity = 1.0; 35#endif 36 37[u_alphaTest] 38#ifdef alphaTestFlag 39 uniform float u_alphaTest; 40#else 41 const float u_alphaTest = 0.0; 42#endif 43 44[u_shininess] 45#ifdef shininessFlag 46 uniform float u_shininess; 47#else 48 const float u_shininess = 20.0; 49#endif 50 51[u_diffuseColor] 52#ifdef diffuseColorFlag 53 uniform vec4 u_diffuseColor; 54#endif 55 56[u_diffuseTexture] 57#ifdef diffuseTextureFlag 58 uniform sampler2D u_diffuseTexture; 59#endif 60 61[u_specularColor] 62#ifdef specularColorFlag 63 uniform vec4 u_specularColor; 64#endif 65 66[u_specularTexture] 67#ifdef specularTextureFlag 68 uniform sampler2D u_specularTexture; 69#endif 70 71[u_normalTexture] 72#ifdef normalTextureFlag 73 uniform sampler2D u_normalTexture; 74#endif 75