-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/mod/fix: buffers: Texture/Image Format Rewrite #331
Conversation
Should the page be renamed to Image Format since that's what OpenGL calls it? |
|
||
The shader loader supports some additional pixel types not directly associated with supported image formats. See the [OpenGL Wiki](https://www.khronos.org/opengl/wiki/Pixel_Transfer#Pixel_type) for more information about these. | ||
|
||
| Pixel Type | | ||
| ---------------------------- | | ||
| `UNSIGNED_BYTE_3_3_2` | | ||
| `UNSIGNED_SHORT_5_6_5` | | ||
| `UNSIGNED_SHORT_4_4_4_4` | | ||
| `UNSIGNED_SHORT_5_5_5_1` | | ||
| `UNSIGNED_INT_8_8_8_8` | | ||
| `UNSIGNED_INT_8_8_8_8_REV` | | ||
| `UNSIGNED_INT_10_10_10_2` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's probably no point in including these if they aren't supported/used by Iris
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's probably no point in including these if they aren't supported/used by Iris
The thing is that they are supported, which not all pixel types are. They can still be used when loading raw custom textures if the raw data is stored with that pixel type afaik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh okay, I would specifically mention they are usable for raw custom textures, otherwise it seems like they don't have a purpose
|
||
Unsigned normalized buffers support values from 0.0 to 1.0 (inclusive). | ||
|
||
| Image Format | Bit Depth | Pixel Format | Pixel Type | Image | Requirements | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be "Texture Format" instead of "Image Format"? Or is Image Format the correct term?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be "Texture Format" instead of "Image Format"? Or is Image Format the correct term?
After quickly reading the OpenGL specification and wiki i think image format is the more correct term
The wiki page most of what i wrote is based on is also called "Image Format"
| RG8 | RG16 | RGB10_A2 | | ||
| RGB8 | RGB16 | | | ||
| RGBA8 | RGBA16 | | | ||
> Cells marked with ~strikethrough~ are currently unsupported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any point in including formats which aren't supported? Or is this because of the discussion of adding support for more formats? Either way, I feel that for now there's not much of a point in documented unsupported formats, they can always be added later if support is increased
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any point in including formats which aren't supported? Or is this because of the discussion of adding support for more formats? Either way, I feel that for now there's not much of a point in documented unsupported formats, they can always be added later if support is increased
I added them both for consistency and clarity (to show which image formats, bit depths, pixel formats and pixel types are associated, even one of them is unsupported).
You can still load custom raw textures with pixel formats and types associated with unsupported image formats, and image formats with unsupported pixel formats can still be used as colortex formats.
It also clearly shows which formats exist in OpenGL but aren't supported by Iris and makes it very easy to mark them as supported if they ever get added. I feel it would be less clear if we were to write items associated with unsupported items in a separate table or leave cells of unsupported items empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay that makes sense, I would make sure to describe at least some of that then, because it wasn't clear to me at first glance.
For consistency with the OpenGL documentation
R3_G3_B2