gameserver optimisations
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / scene_override.h
index 602cda4d88053c4127c72b19910acff6cac1b9f4..0d7515b8c7616b864160cdbdb3bde784925962e5 100644 (file)
@@ -479,7 +479,11 @@ static struct vg_shader _shader_scene_override = {
 "   float dither = fract( vDither.g / 71.0 ) - 0.5;\n"
 "\n"
 "   float dcam = (-8.0+distance( aCo, uCamera ))/4.0;\n"
-"   if( min(aCo.y*0.5 + dither, dcam + dither) < 0.51 ) discard;\n"
+"   float dy0 = aCo.y - uMapInfo.x;\n"
+"   float dy1 = uMapInfo.y - aCo.y;\n"
+"\n"
+"   if( min(min(dy0,dy1)*0.5, dcam) + dither < 0.51 ) \n"
+"      discard;\n"
 "\n"
 "   compute_motion_vectors();\n"
 "\n"