 			other.pos = b;
 			other.type = suf.high_type;
 			other.tex_coord = suf.tex_coord;
-			other.is_shadowed = suf.is_shadowed;
-			frag_color += c_ReflectionPower * evaluate_color(other);
+			//other.is_shadowed = suf.is_shadowed;
+			frag_color += c_ReflectionPower * evaluate_color(other, 0.8);
 		}
 	}
 	Target0 = frag_color;

	uint type;
	vec3 tex_coord;
	bool is_underground;
	bool is_shadowed;
};

CastPoint cast_ray_to_map(vec3 base, vec3 dir) {

	//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;
	return result;
}

vec4 evaluate_color(CastPoint pt, float lit_factor) {
	float terrain = float(pt.type) + 0.5;
	float diff = textureOffset(t_Height, pt.tex_coord, ivec2(1, 0)).x -
				 textureOffset(t_Height, pt.tex_coord, ivec2(-1, 0)).x;
	float light_clr = texture(t_Table, vec3(0.5 * diff + 0.5, 0.25, terrain)).x;
	float tmp = light_clr - c_HorFactor * (1.0 - pt.pos.z / u_TextureScale.z);
	float color_id = texture(t_Table, vec3(0.5 * lit_factor * tmp + 0.5, 0.75, terrain)).x;
	return texture(t_Palette, color_id);
}

