
#include "lighting.sdr"

in vec4 vertPosition;

layout (std140) uniform matrixData {
	mat4 modelViewMatrix;
	mat4 projMatrix;
};

layout (std140) uniform lightData {
	vec3 diffuseLightColor;
	float coneAngle;

	vec3 lightDir;
	float coneInnerAngle;

	vec3 coneDir;
	bool dualCone;

	vec3 scale;
	float lightRadius;

	int lightType;
	bool enable_shadows;

	float sourceRadius;
};

void main()
{
	if (lightType == LT_DIRECTIONAL || lightType == LT_AMBIENT) {
		gl_Position = vec4(vertPosition.xyz, 1.0);
	} else {
		gl_Position = projMatrix * modelViewMatrix * vec4(vertPosition.xyz * scale, 1.0);
	}
}
