los-cocos / cocos-testcmp

0 stars 1 forks source link

better handling comparison with different alpha channel #10

Open ccanepa opened 1 year ago

ccanepa commented 1 year ago

While testing for cocos 0.6.10 it was spotted that

As a consequence the comparison report is of little use

Taking a (win11 + AMD APU) machine and an (win7 + nvidia discrete gpu) and running do_test.py on both, at same python + pyglet + cocos, the difference holds.

Same if a test is manually run, snapshots taken by ctrl + S and inspected with irfanview.

Thinking maybe not pyglet nor cocos were setting the glClearColor, and thus a trivial difference on the driver layer was bubling up, I added after the director.init in test_acceldeccel.py the line from pyglet import gl; gl.glClearColor(255, 0, 0, 255)

This one worked nearly as expected in both systems, solid red background seen in the cocos screen and in the snapshots (alpha == 255 over al alpha in nvidia, same except the grossini contour in AMD)

Changing the color to (0, 0, 0, 0) gets transparent background on amd but still constant alpha == 255 in nvidia.

With (0, 0, 0, 255) alpha == 255 on nvidia and same on amd except the countour of grossini.

Things that could be investigated as the root of the difference

On the practical side, to make comparisons better now, snapshots could be converted to RGB and then compared.

ccanepa commented 1 year ago

for cocos 0.6.10 I ran the comparisons on a third machine, win10 + nvidia