 		result.is_underground = true;
 	}
 
-	//float t = a.z > a.w + 0.1 ? (b.w - a.w - b.z + a.z) / (a.z - a.w) : 0.5;
 	result.pos = b;
 	result.tex_coord = suf.tex_coord;
 	//result.is_shadowed = suf.is_shadowed;

		vec3 outside = cast_ray_to_plane(u_TextureScale.z, a, light_vec);
		vec3 b = outside;

		Surface suf = cast_ray_impl(a, b, true, 4, 4);
		lit_factor = b == outside ? 1.0 : 0.5;
	}


	bool high, int num_forward, int num_binary
) {
	vec3 step = (1.0 / float(num_forward + 1)) * (b - a);

	for (int i = 0; i < num_forward; ++i) {
		vec3 c = a + step;
		Surface suf = get_surface(c.xy);

		float height = mix(suf.low_alt, suf.high_alt, high);
		if (c.z <= height) {
			b = c;
			break;
		} else {
