Updates shader and threshold.