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

[Public WebGL] Platform and browser inconsistencies rendering to 3D textures

Hi all,

I've noticed some sharp inconsistencies in how rendering to 3D textures works across platforms and browsers. I've tested Chrome 62/Firefox 57 on Ubuntu 16.04/Quadro M1000 and Windows 10/GT 750m using the following scenes:
  1. Render to TEXTURE_2D color attachment/TEXTURE_2D depth: https://tsherif.github.io/webgl2bugs/unknown/render-to-texture2D.html
  2. Render to TEXTURE_3D color attachment/TEXTURE_2D depth: https://tsherif.github.io/webgl2bugs/unknown/render-to-texture3D.html
  3. Render to TEXTURE_3D color attachment/TEXTURE_2D_ARRAY depth: https://tsherif.github.io/webgl2bugs/unknown/render-to-texture3D-array-depth.html
The first works everywhere and demonstrates what the scene should look like:
The second works in both browsers on Ubuntu, but fails in both on Windows. Chrome reports FRAMEBUFFER_UNSUPPORTED as the framebuffer status. Firefox reports no errors, and seems to do the clear (gray), but doesn't draw.

The third works in both browsers on Ubuntu and fixes things in Chrome on Windows. Firefox behaves the same as for the previous example.

I was tipped off to trying the third setup by the following language from the OpenGL 4.6 spec (section 9.4.2): "If any framebuffer attachment is layered, all populated attachments must be layered. Additionally, all populated color attachments must be from textures of the same target (three-dimensional, one- or two-dimensional array, cube map, or cube map array textures)."

However, neither the ES 3.0, nor the WebGL 2 spec mention any such restriction. Shannon Woods brought it to my attention that it does appear in section 9.4.2 of the ES 3.2 spec.

So the first question would be: should this restriction be formally added to the WebGL 2 spec?