Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to Texture2D.FromStream on Windows DirectX #5712

Merged
merged 2 commits into from
May 16, 2017

Conversation

tomspilman
Copy link
Member

@tomspilman tomspilman commented May 16, 2017

This PR fixes two bugs in Texture2D.FromStream() under Windows DirectX.

First is that it was premultiplying the color data on load which XNA does not do.

Second XNA blacks out the color data on any pixel with zero alpha.

I added two unit tests to verify this fix.

Fixes #5529.
Fixes #4820.

@tomspilman tomspilman added this to the 3.7 Release milestone May 16, 2017
@KonajuGames
Copy link
Contributor

So it was really just one letter difference between premultiplied and non-premultiplied in one parameter to fconv.Initialize(). Looks good to me. Merging.

@tomspilman
Copy link
Member Author

Thanks @KonajuGames !

Yep.... That and the black out of pixels makes this behave the same as XNA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SpriteBatch AlphaBlend doesn't look the same on OpenGL vs DirectX Texture2D.FromStream Test
2 participants