 
 	vec4 center_normals_x = vec4(normal_x_00.y, normal_x_10.x, normal_x_11.w, normal_x_01.z);
 
-	score *= vec4(g2(avg_normal_x - center_normals_x.x),
-	              g2(avg_normal_x - center_normals_x.y),
-	              g2(avg_normal_x - center_normals_x.z),
-	              g2(avg_normal_x - center_normals_x.w) );
+	score *= vec4(g1(avg_normal_x - center_normals_x.x),
+	              g1(avg_normal_x - center_normals_x.y),
+	              g1(avg_normal_x - center_normals_x.z),
+	              g1(avg_normal_x - center_normals_x.w) );
 
 
 	vec4 normal_y_00 = textureGather(mat_data_sampler, uv_00, 1);


	vec4 center_depths = vec4(depth_00.y, depth_10.x, depth_11.w, depth_01.z);

	vec4 score = vec4(g3(avg_depth - center_depths.x),
	                  g3(avg_depth - center_depths.y),
	                  g3(avg_depth - center_depths.z),
	                  g3(avg_depth - center_depths.w) );


	vec4 normal_x_00 = textureGather(mat_data_sampler, uv_00, 0);


	out_depth    = texelFetch(depth_sampler,    ivec2(vertex_out.tex_coords * tex_size) + center_offsets[max_index], 0);
	out_mat_data = texelFetch(mat_data_sampler, ivec2(vertex_out.tex_coords * tex_size) + center_offsets[max_index], 0);
}
