fixed downsampleStencil