You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll start by saying there might be some slight inaccuracies here as this has been diagnosed with discussion rather than reproduced on my machine, but the gist should be correct.
Some code like this is used to allocate texture storage for a framebuffer:
When _internalFormat is GL_RGB16F, and _sourceType is explicitly GL_HALF_FLOAT, GL4ES creates a GL_RGB16F texture that seems to work as it should. When _sourceType is zero, so GL_UNSIGNED_BYTE is passed as a default, a different internal format is given (I guess GL_RGB8 - it's a normalised integer format, not a half float one).
Based on the spec, as the data argument is a null pointer, and no texture data actually gets uploaded, the format and type arguments aren't supposed to do anything, and we should get a texture with allocated storage and the requested internal format.
From a look at the gl4es_glTexImage2D I'm unsure whether this is because the internal format isn't being converted from GL_RGB16F to something GLES likes (I see that it's a constant in GLES 3, but GLES 2's glTexImage2D documentation doesn't have the internal format table I'm used to from desktop GL), or whether GL4ES is mistakenly thinking we're uploading unsigned byte data and that a half float internal format would be wasted.
Edit: this issue originally discussed GL_R16F, but apparently that doesn't work whether or not the source type is explicitly passed.
The text was updated successfully, but these errors were encountered:
I'll start by saying there might be some slight inaccuracies here as this has been diagnosed with discussion rather than reproduced on my machine, but the gist should be correct.
Some code like this is used to allocate texture storage for a framebuffer:
When
_internalFormat
isGL_RGB16F
, and_sourceType
is explicitlyGL_HALF_FLOAT
, GL4ES creates aGL_RGB16F
texture that seems to work as it should. When_sourceType
is zero, soGL_UNSIGNED_BYTE
is passed as a default, a different internal format is given (I guessGL_RGB8
- it's a normalised integer format, not a half float one).Based on the spec, as the
data
argument is a null pointer, and no texture data actually gets uploaded, theformat
andtype
arguments aren't supposed to do anything, and we should get a texture with allocated storage and the requested internal format.From a look at the
gl4es_glTexImage2D
I'm unsure whether this is because the internal format isn't being converted fromGL_RGB16F
to something GLES likes (I see that it's a constant in GLES 3, but GLES 2'sglTexImage2D
documentation doesn't have the internal format table I'm used to from desktop GL), or whether GL4ES is mistakenly thinking we're uploading unsigned byte data and that a half float internal format would be wasted.Edit: this issue originally discussed
GL_R16F
, but apparently that doesn't work whether or not the source type is explicitly passed.The text was updated successfully, but these errors were encountered: