I E

Sunstone dev log 18: overdraw

I added a command line flag for fragment shader overdraw tracking. When the flag is enabled, an overdraw image is created. Each frame, the image is cleared to 0, and then every fragment shader call atomically increments the fragment’s position in this image. Here’s what I got with MSAA turned off, after some postprocessing in GIMP. Black is 0 fragment shader calls, and the light yellow is 5+ fragment shader calls:

RenderDoc tells me that the overdraw ranges from 0 to 152 (!). And I think GIMP shows that the mean overdraw is 4.

Here’s a mask for every pixel that’s shaded 4+ times:

I’ve been working on a fix, but the accompanying dev log was getting too long so I’ve split it out to publish on another day.

← Sunstone dev log 17: multisampling Newest