X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=splat.frag;h=7b6875a131164f89d159b8417b4aa98bbd52e657;hb=00bab4b054427daa31563486c3a98e0d9aa02b3f;hp=c06667b1b41a9c7fc67bb633607d6826efd1e403;hpb=a19f7e1c7efbea4b9fbf631156e3de51d62ac477;p=nageru diff --git a/splat.frag b/splat.frag index c06667b..7b6875a 100644 --- a/splat.frag +++ b/splat.frag @@ -16,5 +16,5 @@ void main() vec3 I_0 = texture(image0_tex, image_pos + I_0_check_offset).rgb; vec3 I_1 = texture(image1_tex, image_pos + I_1_check_offset).rgb; vec3 diff = abs(I_1 - I_0); - gl_FragDepth = diff.x + diff.y + diff.z; + gl_FragDepth = 0.125 * (diff.x + diff.y + diff.z); // Make sure we stay well under the 1.0 maximum. }