[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Adding internalformat param to all texImage2d variants



On May 19, 2010, at 10:44 AM, Cedric Vivier wrote:

> On Thu, May 20, 2010 at 01:26, Chris Marrin <cmarrin@apple.com> wrote:
>> Nice chart, but I disagree that we should use the red channel for luminance. In all cases I believe doing the standard RGB -> Luminance conversion should be done.
> 
> Such conversion would happen only when a developer specifically
> requires LUMINANCE.
> As such the developer intends to load a 1-channel image OR a grayscale
> RGB image, which conveniently enough will have red equal to green and
> blue by definition.
> I'm not sure it is worth complicating the spec and implementations for
> the specific case where a developer requires LUMINANCE while not
> feeding the system a grayscale image, this most probably mean the
> texture is not prepared for alpha|normal|bump map usage but just for
> display, which can be done in the shaders directly with more
> flexibility.


I don't think specifying an RGB to Luminance conversion complicated the spec significantly. If the implementation happens to know that the image is greyscale, then it is free to use one of the color channels, as long as the result is the same. Arbitrarily choosing one of the color channels for a grayscale image seems like the wrong way to spec conversion functionality.

-----
~Chris
cmarrin@apple.com





-----------------------------------------------------------
You are currently subscribe to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: