[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Adding internalformat param to all texImage2d variants
On 18 May 2010, at 18:21, Chris Marrin wrote:
> On May 16, 2010, at 1:11 PM, Johannes Behr wrote:
>>>> This can be easily done during runtime as part of your standard-shader
>>>> but we just have to know it upfront.
>>> Yes, this is the original discussion. But you only need to know the original format because that's how X3D defines it today.
>> Right. We only need to know. Can be RGB or RGBA or anything we understand at the end.
>>> In fact X3D is deficient in that, if you have an RGB image and want to use it as an alpha channel you can't.
>> Correct for the standard lighting model. But you can use the shader component and your are free to do whatever you want.
>>> X3D has no property to indicate that the image should be stored in texture memory in the requested format.
>>> My proposal would change the rules of the X3D ImageTexture. You'd have to add a format property, where you specify what format you want the texture to be. There might be some incompatibilities in a small amount of X3D content, but I think you'd have a better ImageTexture spec.
>> I don't agree. Putting a extra "format" parameter to the ImageTexture spec would not lead to a better ImageTexture interface:
>> - What should this format be if you use the ImageTexture e.g. as shader property ?
>> - Source of confusion if the image and format do not match. What should happen if somebody changes the url during runtime ?
>> - You can not reuse the ImageTexture with a different format.
> If I have an image that is 2 channels (LA) and my shader expects it to be RGB, I won't get reasonable results, right? If so I don't think having the format automatically set is very useful.
Used with the standard material setup or explicit shader ?
Dr. Johannes Behr
Leiter Projektbereich VR
Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5 | 64283 Darmstadt | Germany
Tel +49 6151 155-510 | Fax +49 6151 155-196
firstname.lastname@example.org | www.igd.fraunhofer.de
You are currently subscribe to email@example.com.
To unsubscribe, send an email to firstname.lastname@example.org with
the following command in the body of your email: