 		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);
+		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);
	Surface result;

	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) {
			result = suf;
			b = c;
			break;
		} else {

	result.type = suf.high_type;
	result.is_underground = false;

	if (suf.delta != 0.0 && b.z < suf.low_alt + suf.delta) {
		// continue the cast underground
		a = b; b = c;
		suf = cast_ray_impl(a, b, false, 6, 3);
