move shader logic to shader cache