#ifndef LIGHTSCOMMON_SH
#define LIGHTSCOMMON_SH

#include "idioms.sh"

#ifdef _SHADERC_PRESET
    #define NUM_LIHGT_INTANCES 8
    #define SHADER_HINT_NICE_QUALITY 0
    #define BATCH_LIGHTS_DRAWCALL   1
#endif

// For now, we only support punctual light type: point light and spot light
// Pack ruler:
// (float4, color)
// (float4, distanceAndSpotAttenuation)
// (float4 spotDirection)

#if !BATCH_LIGHTS_DRAWCALL
    uniform float4x4 LightsBuffer;
#else
uniform LightsBufferUniform {
    float4x4 data[NUM_LIHGT_INTANCES];
} LightsBuffer;
#endif

#endif /* LIGHTSCOMMON_SH */
