[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] webgl canvas compositing into webpage.
- To: public webgl <firstname.lastname@example.org>
- Subject: [Public WebGL] webgl canvas compositing into webpage.
- From: Gregg Tavares <email@example.com>
- Date: Mon, 22 Feb 2010 15:52:11 -0800
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1266882734; bh=51gOSsXuk0TGB3+8Vy+WdsDQAE4=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=Ce/vHlKkYZFnvqonwyQQp7kPJ0ToqhaSLxi03kDQxoU1WpfrhdeDcrmiQGmQ5tzt7 DQVO7kmrbKhoKe+FtW5gA==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:date:message-id:subject:from:to:content-type:x-system-of-record; b=IGqkxBKyVsw5Kth1kUOUQpWDqXK4CkhL8tNinriikapE4n3R/QF/cpJkWxX6FFVi6 oCrvDlrmmS5inFATpDs4A==
- Sender: firstname.lastname@example.org
I just thought I'd mention this to see if anyone thinks it should be specified.
Currently the way the canvas for webgl is composited with the page is different on different browsers.
Some browsers composite with GL_CLAMP_TO_BORDER with the border set to 0,0,0,0
Others composite with GL_CLAMP_TO_EDGE
The difference is seen in the edge pixels of the canvas when the canvas's display size is larger than its backbuffer size.
Note that for 2d canvases this is also not specified and the browsers are different. In that case Opera, Safari and Chrome use the equivalent of CLAMP_TO_EDGE and Firefox uses CLAMP_TO_BORDER.
For 3d canvases, I only tested Minefield, WebKit (ie, Safari) and Chrome. Chrome is using CLAMP_TO_EDGE, Safari and Firefox are using CLAMP_TO_BORDER.
Personally I wish this was specified and I wish it was specified as CLAMP_TO_EDGE on both 2d and 3d canvases. Without it specified you can get situations like this:
(make sure to view it at 100% otherwise your image viewer may hide the issue)
The code to see the issue is here
A full black canvas with a CSS solid black border seems to me like it
should be all black but browsers using CLAMP_TO_BORDER will end up with
an outline as they composite with the background color of the