Texture storage

Given that we have specified “GL_UNSIGNED_BYTE” type when we created the texture.

When we access a texture in a fragment shader, glsl return a float value. However, how is texture stored in memory ? As a byte or as a float ?

In graphic memory the texture is stored as unsigned byte. If you use shader an do a texture lockup the GPU converts the texture sample to a floating point value.

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