Fix #2298. The AST has two precisions, an operation precision and a result precision. Actual use of GLSL with mediump samplers wants the result precision, so pick that up instead of the operation precision.