summaryrefslogtreecommitdiffstats
path: root/basicsuite/advancedcustommaterial/shaders/es2/light.inc.frag
blob: 167ff306e758cc3061b14f9586fde9a2b5b7aaca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#define FP highp

const int MAX_LIGHTS = 8;
const int TYPE_POINT = 0;
const int TYPE_DIRECTIONAL = 1;
const int TYPE_SPOT = 2;
struct Light {
    int type;
    FP vec3 position;
    FP vec3 color;
    FP float intensity;
    FP vec3 direction;
    FP vec3 attenuation;
    FP float cutOffAngle;
};
uniform Light lights[MAX_LIGHTS];
uniform int lightCount;