1D textures


I use the OpenGL | ES 2.0 emulator from Imagination and currently try to use 1D textures by setting the hight to one in the glTexImage2D texture uploader. This is the supported way to do one-dimensional texturing in Open GL ES 2.0 i have learned. It seems to be working allright at first, but then all kinds of bugs happens, the float variable inside the shader seem to be corrupted in some way by reading from the texture memory yielding a seemingly correct value that is not interpreted correct in calculations and comparisons. By seemingly correct i mean that if the values are written as colors to the screen, they seem to have the correct intensities. But when they are used in calculations or comparisons they are interpreted as something else. I use the GL_LUMINANCE format when uploading the texture. The texture-lookups are performed in a small loop, where filtering of a small neighborhood takes place. I haven’t had any problems with quadratic two dimensional textures.

Best Regards, Mikael

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.