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

Re: [Public WebGL] webgl canvas compositing into webpage.

CLAMP_TO_BORDER is not supported on OGL ES. Therefore WebGL needs to
specified CLAMP_TO_EDGE or you won't be able to implement on top of true
OpenGL ES.



On 23/02/2010 08:52, Gregg Tavares wrote:
> 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
> 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:
> See screenshots
> https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/extra/canvas-compositing-test.png
> (make sure to view it at 100% otherwise your image viewer may hide the
> issue)
> The code to see the issue is here
> https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/extra/canvas-compositing-test.html
> 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 page/canvas
fn:Mark Callow
org:HI Corporation;Graphics Lab, Research & Development
adr:Higashiyama 1-4-4, Meguro-ku;;Meguro Higashiyama Bldg 5F;Tokyo;;153-0043;Japan
title:Chief Architect
tel;work:+81 3 3710 9367 x228
tel;fax:+81 3 5773 8660
url:http://www.hicorp.co.jp,  http://www.mascotcapsule.com