firstname.lastname@example.org [mailto:email@example.com] On
Behalf Of Mark Barnes
Sent: Thursday, April 22, 2010 4:07 AM
Subject: Re: [3D Web] Re: [Public WebGL] Geometry instancing support
If it's good for WebGL then is
it also good for GLES 2? Some due diligence is implied here.
If so then I recommend making it a proper extension so that both specs can
ps: likewise for other divergences.
Sr Software Architect, Biodroid
Khronos COLLADA work group chairman
On Wed, Apr 21, 2010 at 5:42 PM, Arun Ranganathan <firstname.lastname@example.org> wrote:
On 3/11/10 10:57 AM, Cedric Vivier wrote:
On Fri, Mar 12, 2010 at 2:21 AM, Cedric Vivier<email@example.com>
The addition of the possible usage of gl_InstanceID in
shaders would be a
paragraph in the "Differences between WebGL and OpenGL ES 2.0"
E.g / proposal :
void drawArraysInstanced(in GLenum mode, in GLint first, in GLsizei count,
in GLsizei primcount) raises(DOMException);
void drawElementsInstanced(in GLenum mode, in GLsizei count, in GLenum type,
in GLsizeiptr offset, in GLsizei primcount) raises(DOMException);
drawArraysInstanced(mode, first, count, primcount) (EXT_draw_instanced man
drawElementsInstanced(mode, count, type, offset, primcount)
(EXT_draw_instanced man page)
Draw given primcount instances using the currently bound index array. The
given offset is in bytes, and must be a valid multiple of the size of the
given type or an INVALID_VALUE error will be raised. Shader variable
gl_InstanceID is incremented for each instance, from 0 inclusive to
6.2 Geometry instancing
WebGL adds instanced draw calls drawArraysInstanced and
drawElementsInstanced, consequently gl_InstanceID is a valid vertex shader
input variable that holds the integer index of the current primitive in an
instanced draw call. If the current primitive does not come from an
instanced draw call, the value of gl_InstanceID is zero.
I'm in favor of adding these changes to WebGL 1.0.
On our conference call, we discussed whether or not this should be done via
extension or directly as part of WebGL.
On the one hand, we're always hesitant to increase the delta between OpenGL ES
2.0 and WebGL. But on the other hand, I *really* like the performance
gains by doing this. I think doing this as part of the specification
makes sense. Such an inclusion isn't the norm, however. It *is*
important to "feature freeze" especially as we approach 1.0.
Here, however, I'm certainly prepared to make an exception and include
this in the specification.
I'm ok with Cedric's text for inclusion in the spec. Does anyone strongly