The red ball is flush with the brown plane (a table).
We'll consider the pixels that are colored by both the table and the ball.
Adjust the transparency of the ball.