Blending is now much sharper and cleaner..

This commit is contained in:
Nicole Dresselhaus 2014-04-22 10:51:10 +02:00
parent 5d36bb5156
commit ae304ddc5c

View File

@ -42,12 +42,12 @@ void main()
fogDist = gl_Position.z;
//COLOR-BLENDING
vec4 c0 = sqrt(gl_TessCoord.x) * tcColor[0];
vec4 c1 = sqrt(gl_TessCoord.y) * tcColor[1];
vec4 c2 = sqrt(gl_TessCoord.z) * tcColor[2];
teColor = (c0 + c1 + c2)/(sqrt(gl_TessCoord.x)+sqrt(gl_TessCoord.y)+sqrt(gl_TessCoord.z));
vec4 c0 = (1-exp(gl_TessCoord.x)) * tcColor[0];
vec4 c1 = (1-exp(gl_TessCoord.y)) * tcColor[1];
vec4 c2 = (1-exp(gl_TessCoord.z)) * tcColor[2];
teColor = (c0 + c1 + c2)/((1-exp(gl_TessCoord.x))+(1-exp(gl_TessCoord.y))+(1-exp(gl_TessCoord.z)));
//mix gravel based on incline (sin (normal,up))
gmix = length(cross(tessNormal, vec3(0,1,0)));
}
}