WebGl Fragment Shader pass array
问题 I know very little about OpenGL or WebGL. I was wondering if it is possible to pass a fragment shader an argument. Specifically, I'd like to pass it a multidimensional array with the colors to set for each pixel, for example: [0][0][0] = 1 would be the red component of the pixel at (0, 0). 回答1: The standard way of doing this is by using a texture rather than passing an array. 回答2: Simon's answer is right on . But took me about 6 hours to actually get it working.Here is my full working code as