aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_lightdef.glsl
blob: deaf954084730ec4004ecdcb87a23258aad67db2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef mgl_lightdef_glsl
#define mgl_lightdef_glsl

struct mgl_LightModelParameters {
   vec4 ambient; 
};
struct mgl_LightSourceParameters {
   vec4 ambient; 
   vec4 diffuse; 
   vec4 specular; 
   vec4 position; 
   // vec4 halfVector; // is computed here
   vec3 spotDirection; 
   float spotExponent; 
   float spotCutoff; // (range: [0.0,90.0], 180.0)
   //float spotCosCutoff; // (range: [1.0,0.0],-1.0)
   float constantAttenuation; 
   float linearAttenuation; 
   float quadraticAttenuation; 
};
struct mgl_MaterialParameters {
   vec4 ambient;    
   vec4 diffuse;    
   vec4 specular;   
   vec4 emission;   
   float shininess; 
};

#endif // mgl_lightdef_glsl