fixed shader globals update bug; implemented snapping shader