From ae304ddc5c3121babfde45aedc40fe09da613a54 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Tue, 22 Apr 2014 10:51:10 +0200 Subject: [PATCH] Blending is now much sharper and cleaner.. --- shaders/map/tessEval.shader | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shaders/map/tessEval.shader b/shaders/map/tessEval.shader index 11feec1..dcc2727 100644 --- a/shaders/map/tessEval.shader +++ b/shaders/map/tessEval.shader @@ -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))); -} \ No newline at end of file +}