- if (sampler->mag_img_filter == PIPE_TEX_FILTER_LINEAR) {
- /* convert four pass/fail values to an intensity in [0,1] */
- /*
- * XXX this doesn't actually make much sense.
- * We just average the result of four _pixels_ and output the same
- * value for all of the four pixels of the quad.
- * This really needs to work on the _samples_ i.e. inside the img filter.
- */
- val = 0.25F * (k0 + k1 + k2 + k3);
-
- /* XXX returning result for default GL_DEPTH_TEXTURE_MODE = GL_LUMINANCE */
- for (j = 0; j < 4; j++) {
- rgba[0][j] = rgba[1][j] = rgba[2][j] = val;
- rgba[3][j] = 1.0F;
- }
- } else {
- for (j = 0; j < 4; j++) {
- rgba[0][j] = k0;
- rgba[1][j] = k1;
- rgba[2][j] = k2;
- rgba[3][j] = 1.0F;
- }