Histopyramid shader optimized.