| 1 |
#define FP highp |
| 2 |
|
| 3 |
const int MAX_LIGHTS = 2; // RPi: cannot use more than two as we run out of uniforms |
| 4 |
const int TYPE_POINT = 0; |
| 5 |
const int TYPE_DIRECTIONAL = 1; |
| 6 |
const int TYPE_SPOT = 2; |
| 7 |
struct Light { |
| 8 |
int type; |
| 9 |
FP vec3 position; |
| 10 |
FP vec3 color; |
| 11 |
FP float intensity; |
| 12 |
FP vec3 direction; |
| 13 |
FP float constantAttenuation; |
| 14 |
FP float linearAttenuation; |
| 15 |
FP float quadraticAttenuation; |
| 16 |
FP float cutOffAngle; |
| 17 |
}; |
| 18 |
uniform Light lights[MAX_LIGHTS]; |
| 19 |
uniform int lightCount; |