These functions sample multiple RGBA pixels but return only a single component. OpenGL: https://www.opengl.org/sdk/docs/man/html/textureGather.xhtml DirectX: https://msdn.microsoft.com/en-us/library/windows/desktop/ff471525(v=vs.85).aspx

If you were to use this on an RGBA texture, and only gathering the red component, would the texture cache get loaded with the RGBA values, or would it only load the R values?

I'm curious because not all cards in use today support A8 textures (or other single channel 8 bit textures), and a workaround would be to store the data in 1/4 as many pixels by using RGBA and only grabbing the channel needed.

If this sounds obscure, a down to earth practical usage case is distance field textures.

Trying to see if using these functions would be a good alternative to cards that don't support A8.


  • \$\begingroup\$ Since posting I've realized the same cards that don't support a8 likely don't support the dx and gl versions needed to use these, but still curious if anyone knows (: \$\endgroup\$ – Alan Wolfe Jul 14 '15 at 3:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.