-
Notifications
You must be signed in to change notification settings - Fork 80
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
specify texture format as TEX_FORMAT_R16_SINT #62
Conversation
specify texture format as TEX_FORMAT_R16_SINT the texture may be loaded as TEX_FORMAT_R16_UNORM which is not supported everywhere
This tutorial requires 16-bit UNORM textures. If they are not supported, the sample can't run. Loading R16UNORM as R16SINT will not work |
why wont it work? it seems to render perfectly fine on my device |
Because R16SINT is a signed integer format that can't be filtered. The sample uses filterable texture an it is an error to bind R16SINT texture to such variable.
I would expect the terrain to be at least flat. Otherwise your device may doing its own thing, which is not uncommon for GLES. |
hmmm ok |
in https://www.khronos.org/registry/OpenGL/specs/es/3.0/es_spec_3.0.pdf#subsection.3.8.3 section 3.8.3.2 Encoding of Special Internal Formats the table below specifies what texture formats meet the "texture filterable" requirements and however in GLES
could the texture be converted to |
Yes, it may be possible, but 16-bit floats are a bit tricky. |
because of stuff like 3.4646 instead of 3? |
Mostly because there is no native support in CPUs and programming languages, so the conversion from float32 to float16 has to be done manually. |
fair enough :) |
specify texture format as TEX_FORMAT_R16_SINT
the texture may be loaded as TEX_FORMAT_R16_UNORM which is not supported everywhere, causing a crash on unsupported devices