- float tc_scale[] = { float(width) / float(texture_width), float(height) / float(texture_height) };
- set_uniform_vec2(glsl_program_num, prefix, "tc_scale", tc_scale);
+ uniform_tc_scale[0] = float(width) / float(texture_width);
+ uniform_tc_scale[1] = float(height) / float(texture_height);
+
+ // Used if the shader needs to do explicit rounding.
+ int round_fac = (1 << num_bits) - 1;
+ uniform_round_fac = round_fac;
+ uniform_inv_round_fac = 1.0f / round_fac;