I transfer unsigned bytes into vertex shader, and then forward them into fragment shader as outputs. Because I want to save these unsigned bytes into the render buffer COLOR_ATTACHMENT0, such that I could read them in host program later.

I tried various ways, and found only the following method is effective.

I have to normalize these unsigned bytes to [0-1], either by OpenGL or manually to divide them by 255 in fragment shader. Then I could successfully get the unsigned byte values in my program.

Does fragment shader only output values that must be normalized between 0 and 1?