I would like to save memory and since input data are in range [0,..,255] i don't need 4xFloat but 4xByte is going to be enough. GLSL and gpu don't like bytes so pack and unpack is required. Also no precision loss should occur.
C++ and packing code:
The fastest and simplest solution should be using uint for transfer. GLM has already vector prepared so putting glm::u8vec4(1, 1, 1, 1) into vertex array should be all right. I checked vertex arrays with gDEBugger so i am sure they contains right data. VAP looks like this:
glVertexAttribPointer( 0, 1, // one element GL_UNSIGNED_INT, //transfer data type GL_FALSE, //dont normalize 1 * sizeof(GLuint), // size of one element (void*)0 // offset ); GLSL and unpacking:
layout(location = 0) in uint data; vec4 unpack; unpack.x = float((data & uint(0xff000000)) >> 24); unpack.y = float((data & uint(0x00ff0000)) >> 16); unpack.z = float((data & uint(0x0000ff00)) >> 8); unpack.w = float((data & uint(0x000000ff)) >> 0); Result should provide hint but it's too much mess. 
Edit:
Even tho my solution is pointless, there are two bugs. First as mentioned below i have to use glVertexAttribIPointer. Second in my case shifts were mirrored(X should be shifted by 0, Y by 8,..).
Proper solution looks like this:
glVertexAttribPointer( 0, 4, GL_UNSIGNED_BYTE, GL_FALSE, 4 * sizeof(GLubyte), (void*)0 ); shader: layout(location = 0) in vec4 data;