We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2806

Summary: SOFT RENDERER: SDL_RenderCopy problems when alpha = 255
Product: SDL Reporter: ponce <aliloko>
Component: renderAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: mna.bakker
Version: 2.0.3   
Hardware: x86_64   
OS: Windows 7   

Description ponce 2014-12-06 14:44:33 UTC
I'm drawing textures with an alpha channel with a SDL renderer.

With the hardwarer renderer (Windows) everything is fine.

With the software renderer, I see garbage in place of some textures.
Investigating, I've found than the problem was when alpha = 255.
If clamping the value to 254 on each call to SDL_SetTextureAlphaMod, then everything is fine again.

SDL_SetTextureBlendMode wasn't called (left to default).
Comment 1 Marcel Bakker 2015-11-02 11:28:36 UTC
I have been using this fix(clamping alpha to 254) for some time now.

More people with this problem(with picture):
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2015-June/098418.html

Upgrading to the latest version fixed this bug for me.
Comment 2 Sam Lantinga 2016-10-07 22:18:01 UTC
I believe this is fixed in the latest SDL build:
http://www.libsdl.org/tmp/SDL-2.0.zip

Please reopen this bug if that's not the case.