--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/CAMYvS2fTv36kLcDmQhQqKpUUE_NAUAU8EGW%2BYyCvEDMODozFSA%40mail.gmail.com.
Hi Ken,From luma.gl/deck.gl perspective, without thinking through things too deeply, this could be potentially useful extensions as we continue to improve our filtering support for instanced tables.About your question concerning the new GLSL variables, we currently use instance ids in shaders primarily for our color based picking where we do a separate render pass - we "RGBA color code" instances into our "picking texture", and then determine the instance under the pixel by decoding the color in the selected pixel(s).Having the base offsets available in the shader would be convenient, but as you say it is not hard to work around, adding it as a uniform, or offsetting the result on the CPU after read back doesn't seem very onerous.In fact, we are already in effect emulating vertex instances with a separate attribute array (needed on WebGL 1), so we are already going through some ugly hoops.
PS - What we would really love would be to be able to specify a counterpart to the ELEMENT buffer (indices) for the instance array so that we could cheaply "filter" instances but I assume GPUs don't support that...
On Thursday, April 22, 2021 at 4:52:04 PM UTC-7 Philip Taylor wrote:I personally have trouble understanding where I could use these particular calls, or at least where they eliminate some limitations in WebGL today." The baseVertex functionality could effectively help reduce CPU overhead with static batching and text rendering in game engine implementations."
I can imagine some mesh font atlas where we can draw each letter by specifying its first vertex, and draw the number of elements for that letter.We get the same ability now with multi-draw, but a lot more versatile, so I'm not sure what this adds.Maybe someone can enlighten me...
--On Thu., Apr. 22, 2021, 3:48 p.m. 'Ken Russell' via WebGL Dev List, <webgl-d...@googlegroups.com> wrote:Dear WebGL community,The browser implementers are finishing these two extensions, which provide control over the BaseVertex and BaseInstance for instanced draw calls:There's one outstanding question: how important are the gl_BaseVertex and gl_BaseInstance vertex shader variables for your use cases?These can be easily emulated at the application level - just create two uniform variables and set them before issuing the draw or multi-draw call. These extensions can likely be shipped more quickly if we split off the gl_BaseVertex and gl_BaseInstance shader builtins into a separate extension, or just don't include them in WebGL's version of these extensions at all.Thanks,-Ken--I support flexible work schedules, and I’m sending this email now because it is within the hours I’m working today. Please do not feel obliged to reply straight away - I understand that you will reply during the hours you work, which may not match mine. (credit: jparent@)--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/CAMYvS2fTv36kLcDmQhQqKpUUE_NAUAU8EGW%2BYyCvEDMODozFSA%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/0fe5f0a8-351a-42cd-bf02-2d569e8d9307n%40googlegroups.com.