Fragment Shaders in Roblox!

so, just last night i found out about the new “EditableImage” class, its pretty cool.
naturally, i had to make a CPU fragment shader system.

how does this work?

the system is a simple 3 part mixture, a dispatcher, draw threads, and the shader itself of course.

the dispatcher chops up the image into squares (fragments), and sends the top left and bottom right corners of each square to the draw threads, which get put into their queues for later processing.

next, the parallel phase: running as many times as possible without exhausting the execution time limit i set (or until it runs out of work to do) the thread pops a task off of the queue and executes the shader for each pixel in the fragment, building an array of floats (r,g,b,a) as it goes along. which then gets queued for drawing.

the following serial phase works on the same basic principle as the parallel phase, popping elements off its queue and using WritePixels to send the final output.


any ideas as to what shaders i should try next?
currently, other than the mandelbrot zoom, i have also done a perlin noise scroll, which looks pretty interesting too.


These fragment shaders look good! Nice job on them!


Can you maybe make this open source?

1 Like

nice job dude have a like definatly!!! but how did you get the data from the image? or did you convert it to pure data outside of roblox?