// __multiversion__
// This signals the loading code to prepend either #version 100 or #version 300 es as apropriate.

#include "fragmentVersionCentroid.h"

#if __VERSION__ >= 300
	#ifndef BYPASS_PIXEL_SHADER
		#if defined(TEXEL_AA) && defined(TEXEL_AA_FEATURE)
			_centroid in highp vec2 uv0;
			_centroid in highp vec2 uv1;
		#else
			_centroid in vec2 uv0;
			_centroid in vec2 uv1;
		#endif
	#endif
#else
	#ifndef BYPASS_PIXEL_SHADER
		varying vec2 uv0;
		varying vec2 uv1;
	#endif
#endif

varying vec4 color;
varying highp vec3 wpos;
varying highp vec3 posi;

#ifdef FOG
varying vec4 fogColor;
#endif

#include "uniformShaderConstants.h"
#include "util.h"
#include "uniformPerFrameConstants.h"

LAYOUT_BINDING(0) uniform sampler2D TEXTURE_0;
LAYOUT_BINDING(1) uniform sampler2D TEXTURE_1;
LAYOUT_BINDING(2) uniform sampler2D TEXTURE_2;

#include "dect.h"
#include "inform/option.txt"

highp vec2 hash(highp vec2 x)
{
    const highp vec2 k = vec2(0.540,0.690);
    x = x * k + k.yx;
    return 1.0 + 2.0 * fract(19.080 * k * fract(x.x * x.y * (x.x + x.y)));
}

highp float gnoise( in highp vec2 pos)
{
    pos *= vec2(-0.470,-0.700);
    highp vec2 i = floor(pos);
    highp vec2 f = fract(pos);
    highp vec2 u = f * f * (3.0 - 2.0 * f);
    return (mix(mix(dot(hash(i + vec2(0.0,0.0)), f - vec2(0.0,0.0)), dot( hash(i + vec2(1.0,0.0)), f - vec2(1.0,0.0)), u.x), mix( dot( hash(i + vec2(0.0,1.0)), f - vec2(0.0,1.0)), dot( hash(i + vec2(1.0,1.0)), f - vec2(1.0,1.0)), u.x), u.y)) * 0.652;
}

//noise value 2D
highp float random(in highp vec2 pos)
{
    return fract(sin(dot(pos.xy, vec2(-0.600,0.430))) * 43759.057);
}

highp float noise(in highp vec2 st)
{
    highp vec2 i = floor(st);
    highp vec2 f = fract(st);
    highp float a = random(i);
    highp float b = random(i + vec2(1.0,0.0));
    highp float c = random(i + vec2(0.0,1.0));
    highp float d = random(i + vec2(1.0,1.0));
    highp vec2 u = f * f * (3.0 - 2.0 * f);
    return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y;
}

 //noise value 3D 
 highp float hash(highp vec3 p)
 {
    p  = fract(p * 0.3183099 + 0.1);
	p *= 17.0;
    return fract(p.x * p.y * p.z * (p.x + p.y + p.z));
}

highp float noise( in highp vec3 x )
{
    highp vec3 i = floor(x);
    highp vec3 f = fract(x);
    f = f * f * (3.0 - 2.0 * f);
    return mix(mix(mix(hash(i + vec3(0.0,0.0,0.0)), hash(i + vec3(1.0,0.0,0.0)), f.x), mix(hash(i + vec3(0.0,1.0,0.0)), hash(i + vec3(1.0,1.0,0.0)), f.x), f.y), mix(mix(hash(i + vec3(0.0,0.0,1.0)), hash(i + vec3(1.0,0.0,1.0)), f.x), mix(hash(i + vec3(0.0,1.0,1.0)), hash(i + vec3(1.0,1.0,1.0)), f.x), f.y), f.z);
}

highp float fbm (in highp vec2 pos, highp float ch)
{
    highp float v = mix(0.09,-0.3,ch);
    highp float la = 2.396;
    highp float ga = 0.4;
    highp float am = 0.332;
    highp float fr = 1.0;
    for (int i = 0; i < 3; i++) 
    {
        v += am * noise(abs(fr * pos + TIME * 0.05));
        fr *= la;
        am *= ga;
    }
    return v;
}

highp float sun(highp vec2 uv)
{
    return smoothstep(1.0,-0.5,length(uv));
}

highp float WaterPos(highp vec3 v, highp vec3 w, highp vec4 col, float wt)
{
    highp float wap = (length(v)*0.2) / length(v) / length(w);
    if(FOG_CONTROL.x < 0.001){}else{if(wt == 1.0){}else{wap = 0.0;}}
	return wap;
}

highp float Ws(highp vec3 v, highp vec3 w)
{
    highp float wap = mix(0.0, length(v) * 0.4, sun(w.xz * 0.8 + v.xz * 3.0)) / length(w) / length(v);
	return wap;
}

highp float onda(highp vec3 X)
{
    X.x *= 0.5;
    X.z *= 0.916;
    highp float D = abs(sin(noise(vec3(X.x + TIME * 0.524, X.x + X.y + TIME * 0.5, X.x - X.z - TIME * 1.444))));
    return mix(0.592, 1.568, D);
}

highp vec3 WaterMap(highp vec3 pos) {
    highp float H = onda(pos - vec3(1.0,0.0,0.0)) - onda(pos);
    return  1.0 - vec3(-H,1.0,1.0);
}

highp vec4 Cc(highp vec3 pos, highp vec3 ps, highp float fw, highp vec3 mN, highp vec3 nN, highp vec3 mNy, highp vec3 nNy, highp vec2 mnxyt, highp vec3 ct, highp float dia, highp float noite, highp float ch, highp float wt, highp vec4 dif, highp float bl, highp float dsol, highp float dss)
{
    highp float v = 4.8;
    highp vec3 N = vec3(0.0,0.0,0.0);
    //normalize
    N = normalize(vec3(pos.x,pos.y * v,pos.z)) * v;
    if(nN.z > 0.1)N = normalize(vec3(pos.x,pos.y * v,-pos.z)) * v;
    if(mN.x > 0.1)N = normalize(vec3(-pos.x,pos.y * v,pos.z)) * v;
    if(nN.x > 0.1)N = -normalize(vec3(pos.x,pos.y * -v,-pos.z)) * v;
    if(mN.z > 0.1)N = -normalize(vec3(-pos.x,pos.y * -v,pos.z)) * v;
    if(mNy.x > 0.1)N = normalize(vec3(-pos.x,-pos.y * v,pos.z)) * v;
    if(nNy.x > 0.1)N = -normalize(vec3(pos.x,-pos.y * -v,-pos.z)) * v;
    if(nNy.z > 0.1)N = normalize(vec3(pos.x,-pos.y * v,-pos.z)) * v;
    if(mNy.z > 0.1)N = -normalize(vec3(-pos.x,-pos.y * -v,pos.z)) * v;
    highp vec3 nf = N;
    N = mix(N + TIME * 0.0025, mix(vec3(0.0,0.0,0.0),vec3(1.0,1.0,1.0),fw), 0.2);
    highp float vs = 1.2;
    highp vec3 Ns = normalize(vec3(pos.x,pos.y * vs,pos.z)) * vs;
    highp float ws = abs(asin(mix(Ws(-Ns + vec3(1.0,0.0,0.0), mix(vec3(1.0,0.0,0.0), WaterMap(ps.xzy * 5.0), wt)), Ws(Ns + vec3(1.0,0.0,0.0), mix(vec3(1.0,0.0,0.0), WaterMap(ps.xzy * 5.0), wt)), 0.5)));
    highp float wdds = abs(asin(mix(Ws(-Ns + vec3(0.5,0.0,0.0), mix(vec3(1.0,0.0,0.0), WaterMap(ps.xzy * 5.0), wt)), 0.0, dss)));
    highp float clouds = fbm(N.xz * 2.980, ch);
    highp float offset = gnoise(N.xz * 0.376 + TIME * 0.01);
    highp float fC = smoothstep(10.0 - offset,  - offset, clouds) - smoothstep(0.212 - offset, 0.300 - offset, clouds);
    highp float cloudsE = fbm(N.xz * 2.980 - vec2(0.2, 0.0), ch);
    highp vec3 tempo = mix(mix(mix(mix(vec3(0.6,0.6,0.6), vec3(1.0,1.0,1.0), dia), vec3(0.3,0.3,1.0), noite), vec3(FOG_COLOR.r, 0.2 * FOG_COLOR.r, 0.0), dsol),FOG_COLOR.rgb,ch);
    highp vec4 Esc = mix(mix(vec4(vec3(0.475,0.475,0.475)*(1.0-noite),0.5),vec4(0.335,0.335,0.335,0.5), ch), vec4(tempo,1.0), pow(smoothstep(-0.842 - offset, 0.288 -offset, cloudsE),6.584));
    highp vec4 c = mix(vec4(ct, 0.5), Esc, fC);
    c = mix(c, mix(FOG_COLOR, vec4(ct,0.5), 0.5), mix(smoothstep(0.8, 0.9, length(nf.xz * 0.185)), smoothstep(0.0, 0.5, pow(length(nf.xy * 0.185), 0.65)), ch));
    if(mN.y < 1.0)if(mNy.x+nNy.x+mNy.z+nNy.z+mnxyt.x+mnxyt.y < 1.0 )c = mix(vec4(ct,1.0), c, smoothstep(0.0, 1.0, nf.y*0.3));
    return c;
}

highp vec3 light(highp vec3 di, highp vec3 d, highp vec3 L, highp vec2 u1, highp float dia, highp float ch, highp float dss) {
	highp vec3 col = d;
	col +=  L * 1.5-0.5+col*smoothstep(0.75,1.0,pow(u1.x,1.));
	highp float ti = mix(0.0,mix(0.0,mix(1.0,0.0,ch),dia),u1.y*1.1);
	highp float temp = mix(0.0,1.5,pow(u1.x,3.0));
	temp = mix(temp,0.0,ti);
	col = mix(di,col,temp);
return col;
}

void main()
{
#ifdef BYPASS_PIXEL_SHADER
	gl_FragColor = vec4(0, 0, 0, 0);
	return;
#else 

#if USE_TEXEL_AA
	vec4 diffuse = texture2D_AA(TEXTURE_0, uv0);
#else
	vec4 diffuse = texture2D(TEXTURE_0, uv0);
	highp vec4 tex = texture2D(TEXTURE_0, uv0);
    
#endif

    highp vec4 tep = FOG_COLOR;
	highp vec4 temp = texture2D(TEXTURE_1, vec2(0.0, 1.0));
    highp float chuva = Rain(FOG_CONTROL);
    highp float dia = pow(max(min(tep.r * 1.5, 1.0), 0.0), 1.2);
    highp float diat = pow(max(min(temp.r * 1.5, 1.0), 0.0), 1.2);
    highp float noite =  mix(0.0, 2.5, pow(max(min(1.0 - temp.r * 1.5, 1.0), 0.0), 1.2));
    highp float dsol = 0.5 - abs(0.5 - (1.0 - max(0.0, min(1.0, (temp.r - 0.46) * 2.0))));
             dsol = mix(dsol,0.0,chuva);
    highp float dss = mix(mix( 0.0, 2.5, clamp((1.0 - max(0.0, min( 1.0, (temp.r - 0.48) * 2.0)) * (1.5 + chuva)) * 2.5, 0.0, 1.0) * clamp((temp.r - 0.15) * 1.0, 0.0, 1.0)), 0.5, mix(0.0, 5.0, pow(max(min(1.0 - temp.r * 1.5, 1.0), 0.0), 1.2)));
//normal
    highp vec3 N = -normalize(cross(dFdx(posi.xyz), dFdy(posi.xyz)));
    highp float mx = 0.0;float nx = 0.0;float mz = 0.0;float nz = 0.0;float my = 0.0;float ny = 0.0;float mxy = 0.0;float nxy = 0.0;float mzy = 0.0;float nzy = 0.0;float myx = 0.0;float nyx = 0.0;float myz = 0.0;float nyz = 0.0;float mxyt = 0.0;float nxyt = 0.0;
//sombra bias
    highp float SC = mix(mix(0.8, 0.4, diat), 1.0, chuva);
    SC = mix(SC, 0.7, mix(0.0,4.0,dsol));
    highp float biasY = 0.88;
    highp float biasX = 0.67;
    highp float shdX = color.g;
    highp float shdY = uv1.y;
//tempo cor
	highp vec3 DC = vec3(1.4,1.4,1.4)*1.2;
    highp vec3 CC = vec3(FOG_COLOR.rgb);
//luz
    highp vec3 La = vec3(0.5,0.2,-0.3);
    highp vec3 Lb = vec3(0.5,0.2,-0.3) * 0.5;
    highp float pisc = 0.2 * cos(TIME * 0.3 * cos(0.3 * TIME));
    highp vec3 L = mix(La, Lb, mix(pisc * (1.0 - 1.0 * diat * uv1.y),0.0,mix(0.0,1.,pow(uv1.x,1.4))));
    highp vec3 AGL = vec3(0.5,0.5,0.5);
    
//-X
if(-N.x > 0.1){if((-N.y > 0.1)||(N.y > 0.1)){}else{mx = 1.0;}}
//+X
if(N.x > 0.1){if((-N.y > 0.1)||(N.y > 0.1)){}else{nx = 1.0;}}
//-Z
if(-N.z > 0.1){if((-N.y > 0.1)||(N.y > 0.1)){}else{mz = 1.0;}}
//+Z
if(N.z > 0.1){if((-N.y > 0.1)||(N.y > 0.1)){}else{nz = 1.0;}}
//+Y
if(-N.y > 0.1){if((-N.x > 0.1)||(N.x > 0.1)||(-N.z > 0.1)||(N.z > 0.1)){}else{my = 1.0;}}
//-Y
if(N.y > 0.1){if((-N.x > 0.1)||(N.x > 0.1)||(-N.z > 0.1)||(N.z > 0.1)){}else{ny = 1.0;}}
//+XY
if((-N.x > 0.1) && (-N.y > 0.1)){if((N.z < 0.1)||(N.y > 0.1)){mxy = 1.0;}}
//-XY
if((N.x > 0.1) && (-N.y > 0.1)){if((-N.z > 0.1)||(N.y > 0.1)){}else{nxy = 1.0;}}
//+ZY
if((-N.z > 0.1) && (-N.y > 0.1)){if((N.x < 0.1)||(N.y > 0.1)){mzy = 1.0;}}
//-ZY
if((N.z > 0.1) && (-N.y > 0.1)){if((-N.x < 0.1)||(N.y > 0.1)){nzy = 1.0;}}
//+YX
if((N.y > 0.1) && (-N.x > 0.1)){if((N.z > 0.1)||(N.x > 0.1)){}else{myx = 1.0;}}
//-YX
if((N.y > 0.1) && (N.x > 0.1)){if((-N.z > 0.1)||(-N.x > 0.1)){}else{nyx = 1.0;}}
//+YZ
if((N.y > 0.1) && (-N.z > 0.1)){if((N.z > 0.1)||(-N.x > 0.1)){}else{myz = 1.0;}}
//-YZ
if((N.y > 0.1) && (N.z > 0.1)){if((-N.z > 0.1)||(N.x > 0.1)){}else{nyz = 1.0;}}
//+XYT
if((-N.x > 0.1) && (-N.y > 0.1)){if((N.z < 0.1)||(N.y > 0.1)){}else{mxyt = 1.0;}}
//-XYT
if((N.x > 0.1) && (-N.y > 0.1)){if((-N.z > 0.1)||(N.y > 0.1)){nxyt = 1.0;}}
highp vec3 mN = vec3(mx,my,mz);
highp vec3 nN = vec3(nx,ny,nz);
highp vec3 mNy = vec3(mxy,0.0,mzy);
highp vec3 nNy = vec3(nxy,0.0,nzy);
highp vec3 mYN = vec3(myx,0.0,myz);
highp vec3 nYN = vec3(nyx,0.0,nyz);
highp vec2 mnxyt = vec2(mxyt,nxyt);
//false
highp float wt = 0.0;
highp float BL = 0.0;
//water false
#ifdef BLEND
if(color.b > color.r){ wt = 1.0; }
    BL = 1.0;
#endif
#ifdef SEASONS_FAR
	diffuse.a = 1.0;
#endif

#if USE_ALPHA_TEST
	#ifdef ALPHA_TO_COVERAGE
	#define ALPHA_THRESHOLD 0.05
	#else
	#define ALPHA_THRESHOLD 0.5
	#endif
	if(diffuse.a < ALPHA_THRESHOLD)
		discard;
#endif
	
vec4 inColor = color;

#if defined(BLEND)
	diffuse.a *= inColor.a;
#endif

#if !defined(ALWAYS_LIT)
	highp vec2 uu = uv1;
           uu.x -= uv1.x;
    highp vec4 NC = min(texture2D(TEXTURE_1, uu),mix(mix(vec4(0.0,0.0,0.0,color.a), vec4(1.0,1.0,1.0,color.a),pow(uv1.y,2.0)),mix(vec4(0.0,0.0,0.0,color.a),vec4(0.5,0.5,0.5,color.a),pow(uv1.y,2.0)),chuva));
    highp vec4 NCn = mix(mix(NC*0.3,max(texture2D(TEXTURE_1, uu),vec4(0.0,0.0,1.2,color.a)),pow(uv1.y,2.0)),NC*0.3,chuva);
              NCn *= NCn;
#endif

#ifndef SEASONS
	#if !USE_ALPHA_TEST && !defined(BLEND)
		diffuse.a = inColor.a;
	#endif
	
	 if(Underwater(FOG_CONTROL)){}else{
		diffuse.rgb = mix(tex.rgb, diffuse.rgb, noite);
		diffuse.rgb *= inColor.rgb;
    }
	
#else
	vec2 uv = inColor.xy;
	diffuse.rgb *= mix(vec3(1.0,1.0,1.0), texture2D( TEXTURE_2, uv).rgb*2.0, inColor.b);
	diffuse.rgb *= inColor.aaa;
	diffuse.a = 1.0;
#endif

//ender
if(End(FOG_COLOR)){
    
    diffuse.rgb *= vec3(0.511,0.362,0.985);
    diffuse.rgb += diffuse.rgb * vec3(0.511,0.362,0.985)*1.2 * pow(uv1.x, 2.0);
}else{
//nether
if(Nether(FOG_CONTROL)){
    //nether do fumaça
    diffuse.rgb += mix(vec3(0.0,0.0,0.0), mix(La * 2.5, La * 6.0, pow(uv1.x,0.8)), clamp(FOG_COLOR.x - 0.1, 0.0, 1.0));
    //nether gases de azul
    diffuse.rgb *= mix(diffuse.rgb ,vec3(-0.2,-0.2,4.0), clamp(FOG_COLOR.y - (FOG_COLOR.x - 0.1), 0.0, 1.0));
    diffuse.rgb += mix(vec3(0.0,0.0,0.0) ,(vec3(0.0,0.0,diffuse.b) * 15.0) * pow(uv1.x,5.0), clamp(FOG_COLOR.y - (FOG_COLOR.x - 0.1), 0.0, 1.0));
    diffuse.rgb += mix(diffuse.rgb , mix(-vec3(0.0,0.1,0.1) * 3.5, La * 5.0, pow(uv1.x,3.0)), clamp(FOG_CONTROL.x - FOG_COLOR.y, 0.0, 1.0));
}else{
//arvores
if(color.a == 0.0){
    diffuse.rgb *= 1.15;
    shdX = color.g * 1.3;
    shdY = uv1.y*1.3;
}
if(color.b > color.r*2.0){
    shdX = 1.0;
    biasY = 0.9158;
}

//ref water
    highp float Fimwater = 0.0;
    #ifdef WATER_REAL
    Fimwater = abs(asin(WaterPos(wpos.xzy, WaterMap(posi.xzy * 5.0), color, wt)));
    #else
    Fimwater = abs(asin(WaterPos(wpos.xzy, diffuse.rgb, color, wt)));
    #endif
    highp float vs = 1.2;
    highp vec3 Ns = vec3(0.0,0.0,0.0);
    Ns = normalize(vec3(wpos.x,wpos.y * vs,wpos.z)) * vs;
    highp vec3 ctemp =  mix(mix(mix(mix( vec3(0.001,0.018,0.105), vec3(0.1,0.4,0.7) * 0.5 * FOG_COLOR.rgb, diat), color.rgb, noite), FOG_COLOR.rgb * 0.5, dss),FOG_COLOR.rgb,chuva);
               ctemp = mix(diffuse.rgb,ctemp,BL);
    highp float Wdi = mix(mix(mix(1.0, 0.8, diat),0.6,mix(0.0,4.0,dsol)), 1.0, length(-wpos) / FAR_CHUNKS_DISTANCE * 1.1);
    highp float posc = length(wpos * 0.009);
    highp vec4 cou = Cc(wpos / 9.0, posi.xyz, Fimwater, mN, nN, mNy, nNy, mnxyt, ctemp, dia, noite, chuva, wt, diffuse, BL, dsol, dss);
    cou = mix(cou, vec4(0.7,0.8,0.9,1.0) * FOG_COLOR, mix(smoothstep(0.0, 2.0, posc), smoothstep(0.0, 0.5, pow(posc, 0.65)), chuva));
    cou = mix(cou, mix(vec4(ctemp,1.0), diffuse, mix(BL, 0.0, wt)), min(100.0 * smoothstep(uv1.y - biasY, 0.1, 0.0), 1.0));
    highp vec4 w;
    w = mix(cou * vec4(1.0,1.0,1.0,Wdi), mix(mix(vec4(1.0,1.0,1.0,1.0), vec4(1.0,1.0,1.0,1.0), diat), vec4(ctemp,1.0), smoothstep(-0.584, 2.0, length(wpos.xzy) / FAR_CHUNKS_DISTANCE * 1.1)), Fimwater);

//sombra gram
#ifdef ALPHA_TEST 

if(color.a == 0.0){}else{
shdX = min(1.0, N.z-N.y);
}
#endif



if(Underwater(FOG_CONTROL)){
    diffuse.rgb *= texture2D(TEXTURE_1, uv1).rgb;
    diffuse.rgb *= inColor.rgb;
    diffuse.r *= 0.3;
    diffuse = mix(diffuse, mix(vec4(0.0,0.0,0.0,0.6),vec4(0.2,0.4,0.4,0.6),diat), wt);
    diffuse.rgb += diffuse.rgb * mix(vec3(0.0,0.0,1.0), AGL, pow(uv1.x, 1.0));
    highp vec3 wl = diffuse.rgb;
    highp vec3 lw = mix(mix(diffuse.rgb * 0.3, diffuse.rgb * 0.6, uv1.y * 3.0), diffuse.rgb *1.5, mix(mix(Fimwater, 0.5, nN.y), Fimwater, wt) * uv1.y*3.0 );
    diffuse.rgb = mix(diffuse.rgb, lw, mix(min(100.0 * smoothstep(uv1.y - 0.873, 0.1, 0.0), 1.0), 1.0, wt));
    diffuse.rgb = mix(diffuse.rgb,wl,uv1.x);
    
}else{
   
    diffuse = mix(diffuse,mix(vec4(ctemp,1.0),w,BL),wt);
    highp vec4 d_l = diffuse;
    diffuse.rgb *= mix(mix(vec3(1.0,1.0,1.0),mix(DC, CC, chuva ),uv1.y*1.1), vec3(1.0,1.0,1.0), wt);
    
    diffuse.rgb = mix(diffuse.rgb*NC.rgb,diffuse.rgb*NCn.rgb, noite);

    diffuse.rgb *= mix(vec3(1.0,1.0,1.0), vec3(1.0,0.7,0.0), mix(0.0,dss, uv1.y*1.1));
	//sombra
  diffuse.rgb *= mix(1.0, SC, min(100.0 * mix(smoothstep(uv1.y - biasY, 0.1, 0.0),smoothstep(shdX - biasX, 0.7, 0.0),0.5), 1.0));
    
   highp vec3 dt = tex.rgb*inColor.rgb;
   diffuse.rgb = light(diffuse.rgb, d_l.rgb, L, uv1,diat,chuva,dss);
}
   
   diffuse.rgb = mix(diffuse.rgb, mix(vec3(0.5,0.5,0.5),FOG_COLOR.rgb, noite), length(-wpos * 0.55) / FAR_CHUNKS_DISTANCE * chuva * uv1.y);
   highp vec3 fogt = vec3(0.0,0.0,0.0);
   fogt = mix(diffuse.rgb, FOG_COLOR.rgb * vec3(0.9,0.95,1.3), (length(-wpos * 0.55) / FAR_CHUNKS_DISTANCE * 0.55) * diat * uv1.y);
   fogt = mix(fogt, diffuse.rgb, chuva);
   diffuse.rgb = mix(fogt, diffuse.rgb, wt);
}}


#ifdef FOG
	diffuse.rgb = mix( diffuse.rgb, fogColor.rgb, fogColor.a );
#endif

	gl_FragColor = diffuse;
	
#endif // BYPASS_PIXEL_SHADER
}
