On Tue, 13 Mar 2012 19:09:57 +0000, VelociChicken wrote:
> So I can lookup into a texture using integer numbers in pixels?
Yes. The GLSL texelFetch() function retrieves a texel using integer
coordinates and an explicit mipmap level. No filtering or wrapping is
performed.
But, in general, you should use the appropriate data type. Integers are
unlikely to be faster than floats, and there are reasons why they may be
slower. In particular, integer calculations must be exact, whereas
floating-point calculations can be approximated based upon the usage of
the result (e.g. a float which is stored in the framebuffer only needs to
be accurate to within the precision of the framebuffer).