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 - SOFT RENDERER: SDL_RenderCopy problems when alpha = 255
Summary: SOFT RENDERER: SDL_RenderCopy problems when alpha = 255
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: 2.0.3
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-06 14:44 UTC by ponce
Modified: 2016-10-07 22:18 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.