Is there a way to draw a pixel from fragment shared at X,Y coordinates.
I iterate thorough the texture that contains the coordinates in R and G and i will sue those numbers to draw a point in the screen. For now i use 0-255 then once i solve this problem i can move on to another level using floats or using R and G for 16 bit precision.
A fragment shader cannot modify gl_FragCoord, and cannot affect framebuffer pixels other than the one for which it is invoked (whose position is stored in gl_FragCoord).
It can modify arbitrary pixels in an image via imageStore().
Or you could just do the conversion from a “sparse texture” to a regular texture on the CPU and upload it. It’d almost certainly be faster than doing potentially hundreds if not thousands of texture fetches every frame.
This is for a prototype in Data Viz class but this seems a research question that the professor has for such a long time and it is a hard problem as he already mentioned.