I know if set the format qualifier rgba32f,when call imageLoad(),I get a vec4. If I set format qualifier r16ui, what will I get? Wiki specifies the funcion still returns a four component value, what exactly each component of the value is?
I know if set the format qualifier rgba32f,when call imageLoad(),I get a vec4. If I set format qualifier r16ui, what will I get? Wiki specifies the funcion still returns a four component value, what exactly each component of the value is?
You'll get 0,0,1 for the other three components.
This is what the spec says:
Texture Image Loads and Stores
... Loads always return a value as a
vec4,ivec4, oruvec4, ... Data are converted to/from the specified format according to the process described for a TexImage2D or GetTexImage command ... Unused components are filled in with (0,0,0,1) (where 0 and 1 are either floating-point or integer values, depending on the format).