This isn't a question but thought it would fit in the general coding section.
I came up with an idea that may be useful..... or not, i dunno so anyway here it is:
At the moment I'm considering doing my software rendering in stages, the first stage only writing to the depth buffer and nothing else which is not uncommon or anything new but will enable me to use some optimisations that I have in mind.
Another part of the reason is I may use stencil shadows again and I thought it would be possible to use the colour buffer to do that with then when doing the texturing and shading I can read from the colour buffer to get the stencil value and use that in the shading calcs, my thinking being that using the colour buffer for both may be better on the cache (I don't really know though, anyone got any opinion on that?)
Then I thought that without the shadows something similar could be done using the depth buffer, only fill the colour buffer with the fp depth values in the first stage then when doing texturing/shading you can read the depth value from the colour buffer, if the depth test is equal then it is overwritten with the colour from texture/shading.
This has some drawbacks, after rendering you no longer have any depth information so alpha surfaces are out and probably lots of other things too but it got me thinking that maybe some other platforms with limited memory, maybe like some mobile devices, could make use of something like this idea.
And that's about it for my ramblings for the day.
Fryer.