// Output a GLSL 3x3 matrix declaration.
std::string output_glsl_mat3(const std::string &name, const Eigen::Matrix3d &m);
+// Calculate where to sample, and with what weight, if one wants to use
+// the GPU's bilinear hardware to sample w1 * x[0] + w2 * x[1].
+void combine_two_samples(float w1, float w2, float *offset, float *total_weight);
+
#ifdef NDEBUG
#define check_error()
#else