opengl es - Passing int array to fragment shader -


i'm attempting plot iterative function in opengl es. array of ints being updated how given pixel hit iterative function. i'd pass density array fragment shader , use plot result on simple quad covering whole screen.

my question is: can pass array directly shader uniform , generate pixels using gl_fragcoord density given position

or

should rather use array create texture 1 channel using gl_luminance , pass shader?

you have limited number of uniforms available, , indexing might troubling since not gpus support non-constant indexing. 2d nx1 texture doesn't have of these issues return values [0, 1] range. can scale values obtain original integer , use it.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -