Weird brightness with alpha

edited November 2014 in How To...

WeirdAlphaWhiteness

See the above image. The button on the left is inserted with Photoshop by pasting the contents of the PNG I am using, and the right side shows what Processing displays.

I am using the OpenGL mode, and I am using floating point positions, so it might not be aligned exactly at a pixel boundary. I haven't had these kinds of issues when I program OpenGL directly myself, so I'm not sure what's going on.

If I use P2D instead, it looks good, but the game becomes slow at 1920x1200, which is the resolution of the computer it will be running on (a Linux computer in an arcade machine cabinet at my university).

If I truncate the positions by casting to integers, it also looks good. I don't really want to have to truncate, but it's not a big issue. I would have to do truncation in multiple locations, though, due to using a translate earlier with variable positions depending on the number of players. I would appreciate a solution that simply changes the filtering or something to get better results.

Sign In or Register to comment.