1. A method for rendering an image, the image comprising a plurality of pixels, the method comprising: dedicating a fixed amount of memory to store a data structure for a pixel of the plurality of pixels: building a visibility function using data related to the pixel by performing a read-modify-write operation on locations of the data structure to alter the data at a plurality of nodes of the visibility function, wherein the plurality of nodes corresponds to a plurality of fragments for the pixel; determining a partial color sum for each fragment of the plurality of fragments for the pixel using the read-modify-write operation; and calculating a pixel color using the visibility function and the partial color sum for each fragment of the plurality of fragments.