I'm trying to make a shader that draws pixels at positions that are defined in an array (I don't really know how to describe it well but its basically an array that has a value for every pixel on the screen, like 1 if its gonna be a pixel at the position and 0 if not), but I don't know how to actually make it (mainly because I don't know much about shaders).
If you have data for every pixel, you would want buffer_set_surface, not a shader.
Furthermore, if you want to pass in a large number of colors into a shader, the input would usually be a texture (sampler2D
) rather than an array - there are limits to how much data you can pass in via a uniform and shaders cannot accept variable-sized arrays.
For learning shaders in general, you can start with this tutorial.