#version 120

#include "lib/defines.glsl"

uniform ivec2 eyeBrightnessSmooth;

varying float eyeAdjust; //How much brighter to make the world
varying vec2 texcoord;

void main() {
	texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
	gl_Position = ftransform();

	float eyeBlocklight = eyeBrightnessSmooth.x / 240.0;
	float eyeSkylight = eyeBrightnessSmooth.y / 240.0;
	eyeAdjust = mix(EYE_ADJUST_TF_DARK, EYE_ADJUST_TF_LIGHT, max(eyeBlocklight, eyeSkylight));
}