|
i'm making a game that relies on a shader to run. It works fine on desktop, laptop and one 5 year old phone. I want to test it on a newer phone with higher resolution, so i get the phone and load it up. nothing. many hours of testing, android debugging and searching eventually leads me to the culprit - a single line in the vertex shader: - a simple texture lookup, that is getting the value of a pixel from a texture in memory. the problem is that because that line is in the Vertex shader, not the Fragmet shader, it just doesn't work. why? more searching reveals that its because the gpu on that phone can't do a Vertex Texture Fetch due to how it is constructed. having identified the problem i try to get an idea of what phones/gpus i could run my thing on. Turns out that spec sheets and documentation for phones and their gpus is pretty bad. Trying to find out which gpu is in a phone can be a bit of work, finding out if the gpu can do a VTF is almost impossible. so after a load of effort all i know is that my thing will work on some adreno gpus and not on some mali ones. beyond that i have no idea and i'm not buying one of every phone to test it on. in summary: mobile phones and their gpus suck.
|
# ¿ Oct 3, 2017 10:58 |
|
|
# ¿ May 22, 2024 07:25 |
|
Doc Block posted:you can check via opengl whether or not the GPU supports texture fetch in the vertex shader. of course, we're talking about android, so the driver might lie, but still. I forget the exact enum, but it's something like GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS. yeah but the problem is you need to check on the device itself, so either test all gpus yourself or let users download and check if it works on their device. building a list of compatible devices before releasing a commercial product seems pretty essential, but is practically very hard to do. i'm also just annoyed that something so basic as a texture lookup can make a program just not work at all on a proportion of devices.
|
# ¿ Oct 4, 2017 01:10 |