
Originally Posted by
menzel
If this array would not be too large, a UBO would work (i think 64k is the minimum size limit), you can also update a UBO with MapBuffer/UnmapBuffer. If the data gets larger, texture would also work. There are performance differences here depending on the access pattern (afaik texture access is slower than UBO access in general, but if you have a lot of texture cache hits that can be as fast as UBOs.
You could fetch your information in a geometry shader, so you only have to fetch it once per primitive instead of once per fragment.