Verified Commit 88a96f50 authored by insert's avatar insert

Use sampler array.

parent bdef4dc7
......@@ -2,7 +2,6 @@ in vec4 fPosLightSpace;
uniform vec3 viewPos;
uniform float far_plane;
uniform sampler2D shadowMap;
struct DirectionalLight {
vec3 direction;
......@@ -24,10 +23,11 @@ struct PointLight {
vec3 ambient;
vec3 diffuse;
vec3 specular;
uniform samplerCube shadowMap;
};
#define NR_POINT_LIGHTS {{ lighting.point_lights }}
uniform PointLight pointLights[NR_POINT_LIGHTS];
uniform int activePointLights;
\ No newline at end of file
uniform int activePointLights;
uniform sampler2D shadowMap;
uniform samplerCube pointShadowMap[NR_POINT_LIGHTS];
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment