Hello there,
As some may know i'm a lot involved in "configurators" projects, where i render a lot of PNG rgba files to let the final user choose colors for a product
http://configurateur.billard-toulet.com/As you may have noticed, in some color cases, dark on dark, or light on light, for ex. we get an awfull contour, due to the arbitrary 128grey choice for the background (best fit for all-case solution)...
Let me show you some quick tests :
dark on dark effect - 128grey background
light on light effect - 128grey background
What would be great is to be able to "render" transparent pixels... Sort of premultiplied alpha, but not during the saving picture process (it already exists when PNG is used for ex.),
but the Photoshop-way :
Screenshot of the photoshop "draw - onto - transparent pixels"...
... and pasted onto my background picture...
Now let's speak about coding this one : i'm not a coder guy, but my logical think about it would be :
I'm the CPU, i'm rendering the picture... For that pixel being rendering, what's about alpha : is it black or is it white ? (or grey)...
If the alpha is white, ok then i go on rendering it...
If the alpha is 100% black, ok i ignore it and set this pixel to transparent... Really transparent, not letting the 3D background / direct visibility override color...
If the alpha is somewhere in between, ok i write the premultiplied alpha value onto it, again not on the background / direct visibility color, but on transparent way...
Just like Photoshop does when we draw on empty layer...
That would prevent contour, and more than that, that would maybe speed up the rendering of the scene, because black-alpha-ed pixels would be ignored...
What do you think of that ? Is it possible ?