   Interleaved Texture Fetch with GLSL
  I've got a simple shader which ( besides others ) taps N times a single float from a texture in close proximity. Now I would like to have 4 textures from which I fetch N samples. All the fetches go into distinct memory locations. In CPU programming there is the possibility of interleaved calls which help to gain some speed. Can you do something similar in GLSL?So taking this example:vec4 collect1;collect1.x = texture2D( texture1, position1 + off1 ).r;collect1.y = texture2D( texture1, position1 + off2 ).r;collect1.z = texture2D( texture1, position1 + off3 ).r;collect1.w = texture2D( texture1, position1 + off4 ).r;vec4 collect2;collect2.x = texture2D( texture2, position2 + off1 ).r;collect2.y = texture2D( texture2, position2 + off2 ).r;collect2.z = texture2D( texture2, position2 + off3 ).r;collect2.w = texture2D( texture2, position2 + off4 ).r;// etcCan GPUs take advantage of reordering the calls like this?vec4 collect1, collect2, ...;collect1.x = texture2D( texture1, position1 + off1 ).r;collect2.x = texture2D( texture2, position2 + off1 ).r;...collect1.y = texture2D( texture1, position1 + off2 ).r;collect2.y = texture2D( texture2, position2 + off2 ).r;......Simply asking since each texture fetch in each group would use a distinct texture unit and memory location to place the values in.   
  Depending on the size of "off*" the new sampler flavors that actually accept an lookup offset are a good bet. I think the current offset min/max is somewhere in the neighborhood of [-8, 7] or thereabouts.AMD has a "quad sampler" extension that may be of interest to you AMD_texture_texture4;  I see, that's an attempt at turning FETCH4 into an extension. That would be indeed nice and interesting shortcut for 4 single float taps. If though nVidia is going to like this one since they are into PCF is another question though.EDIT: The last part bothers me though:Quote:7)  Can both texture *AND* texture4 built-in functionssample from the same sampler in a shader?    No.Big fat "Why?!". This makes this extensions totally useless.   