https://bugs.freedesktop.org/show_bug.cgi?id=46631
Kurt Roeckx <k...@roeckx.be> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |k...@roeckx.be --- Comment #7 from Kurt Roeckx <k...@roeckx.be> 2012-02-26 11:52:37 PST --- (In reply to comment #6) > > This seems wrong. If you specify luminance as 1 and read back luminance, you > should receive 1. That makes sense to me too. > If you're reading GL_LUMINANCE from an RGB texture, adding the values L = R + > G > + B is certainly conformant I understand things it should do: Y = (R*RedScale+RedBias)+(G*GreenScale+GreenBias)+(B*BlueScale+BlueBias) Where you would normally want to set the scales to something sane, like 0.299, 0.587, 0.114. Settings like 1/3 for the scales don't make sense to me if you really want luminance, but would clearly be better than the default of 1. With a scale of 1 you would have a problem with the clamping to [0,1]. > If you supply RGB values to TexImage, you would have to supply (for instance) > R > = G = B = 1/3 to achieve luminance 1, and adding those 3 * 1/3 back together > ... it's a bug in mesa. No, you set R, G and B to 1, and set the scales with glPixelTransferf() to get the desired effect. Kurt -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev