[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] NPOT (non-power-of-two) textures
- To: Chris Marrin <email@example.com>
- Subject: Re: [Public WebGL] NPOT (non-power-of-two) textures
- From: Kenneth Russell <firstname.lastname@example.org>
- Date: Thu, 14 Jan 2010 11:52:07 -0800
- Cc: public webgl <email@example.com>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1263498730; bh=sfkhKuTdcTTzXARoM62sOo5Sik0=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type:Content-Transfer-Encoding; b=cIQhpi+47V/5AFK+M3fLudFL6Oo0+0koV5d7HgeJvOOLNGo/9+Lw5hBxP8zOACefy 8hJy3/ZUhA7Oa5DDX8uug==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:content-transfer-encoding:x-system-of-record; b=jrVC9RmFOxxIMkyNqB5mXmJAuVObqHSF8fY7jJGrIOestEboGkr6BoV8ooNxz9aZF xeogC8nbNkOFszw1qIPTg==
- In-reply-to: <04D39C27-99BD-433E-B1CA-AD15D7ECDC42@apple.com>
- References: <04D39C27-99BD-433E-B1CA-AD15D7ECDC42@apple.com>
- Sender: firstname.lastname@example.org
On Thu, Jan 14, 2010 at 10:48 AM, Chris Marrin <email@example.com> wrote:
> OpenGL supports NPOT textures in two ways. The first is called "Rectangle Textures" (RT), which can be any size, but can't be repeating, mip-mapped or have borders. And rather than using 0-1 texture coordinates, they use 0-w, 0-h. OpenGL Also supports true NPOT textures, which have similar constraints to RT, but which use the normal 0-1 texture coordinates.
> The issue is that some older hardware (and when I say "older" I mean hardware from 2005) only supports RT, not true NPOT. It's not possible to emulate NPOT when you just have RT support because in GLSL you use a different sampler for RT (sampler2DRect vs sampler2D).
> OpenGL ES only supports NPOT, not RT. So does that mean we leave these older cards in the cold? The only options I see are:
> 1) Add optional support (as some sort of queryable extension) for RT (ick!)
> 2) Remove support for any type of NPOT from WebGL (double ick!)
> 3) Leave these older cards in the dust.
> Now, I can say that using NPOT on a Mac with one of these older cards still works, it just uses software rendering and is therefore much slower.
A WebGL implementation can scale up NPOT texture data to the next
highest power of two dimension during texImage2D and texSubImage2D
calls. This wouldn't involve any API changes. O3D does this in some
cases as proof that the technique can work without the end user
knowing. I think it would be a bad idea to expose rectangular textures
in the WebGL API; they are definitely not the path forward.
You are currently subscribe to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: