

#include "/lib/taa/res_params.glsl"
varying vec4 color;
varying float NdotL;
uniform vec3 atmosphereUp;
flat varying vec3 torch;
varying vec2 lmtexcoord;

uniform sampler2D texture;

#include "/lib/color_transforms.glsl"
#include "/lib/uniforms.glsl"

/* RENDERTARGETS: 1 */
void main() {

    vec4 color = texture(texture, lmtexcoord.xy) * color;
    color.rgb = toLinear(color.rgb) * (sunLight * NdotL + (atmosphereUp * 6.0) + torch);

    gl_FragData[0] = color;

}
