gosu / ashton

Special graphical effects and other extensions for the Ruby/Gosu game library (⚠️ unmaintained)
MIT License
43 stars 10 forks source link

Alpha/Color issues with Gosu/Ashton #32

Open Aerotune opened 10 years ago

Aerotune commented 10 years ago

I'm having some issues with getting Gosu and Ashton to render clean images.

Without Ashton I've found out that drawing a Gosu::Image on any non-whole position or up/down scaling makes some dark edges appear. It's not noticeable on a blurry picture. screenshot_shader_off

With Ashton a shader that does nothing on the pyramides it messes up the colors and alpha channel. (gl_FragColor = texture2D(in_Texture, var_TexCoord); I'm not opengl savvy, am I doing something wrong?) screenshot_shader_on

I've made a test case project here: https://github.com/Aerotune/ashton_alpha_issue I'm using Gosu 0.7.50, Ashton 0.1.3 and I'm running Mac OS 10.7.5

bil-bas commented 10 years ago

Well, first off, best bug report ever!

You are right in your assumption - the effect should be identical with or without the post-processing shader. Although I haven't looked at Ashton in a long while, I've been doing a lot of work with OpenGL lately, so maybe I can divine a cause.

Note that Ashton 0.1.4 was released a couple of days ago and uses a newer version of OpenGL gem which fixes some things in Ashton (probably not this, though). Also Gosu 0.8, but all that does is move to SDL2 as a backend and I think is still a bit buggy.

Aerotune commented 10 years ago

OK I just tried updating Ashton to 0.1.4 and I still have the same dark edges.

Aerotune commented 10 years ago

Updating to Gosu 0.8.2 doesn't change anything as well.

bil-bas commented 10 years ago

I didn't particularly expect it to, but worth a try.