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

Custom textures sometimes render oddly #2474

Closed
robrohan opened this issue Nov 30, 2018 · 0 comments
Closed

Custom textures sometimes render oddly #2474

robrohan opened this issue Nov 30, 2018 · 0 comments
Assignees
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems

Comments

@robrohan
Copy link

System Information

TrenchBroom v2.0.2-205-ged565c15d - on Mac OS 10.13.6

Expected Behavior

Textures to render in 3d, texture browser, face view as other textures do.

Steps to Reproduce

I've attached an example image. Use this 1024x1024 PNG image on any brush - you'll see it has artefacts on the brush, the face window, and in the Texture browser.

I've also attached the same image after having run through an image optimising utility. The optimised version works fine.

Workaround is to optimise the images :)

broken

working

Thank you very much!

@ericwa ericwa self-assigned this Dec 1, 2018
@ericwa ericwa added Type:Bug Errors and problems Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Area:IO labels Dec 1, 2018
ericwa added a commit that referenced this issue Dec 1, 2018
The main one was not calling FreeImage_ConvertTo24Bits() on 32-bit
input images, but the std::memcpy() was also wrong.

Fixes #2474
@ghost ghost added the Status:In Progress label Dec 1, 2018
ericwa added a commit that referenced this issue Dec 7, 2018
…2475)

* 2474: Fix FreeImage texture loader bugs, add test of image contents

The main one was not calling FreeImage_ConvertTo24Bits() on 32-bit
input images, but the std::memcpy() was also wrong.

Fixes #2474

* 2474: forgot to commit test image

* 2474: fix warning

* 2474: handle corrupt textures in FreeImageTextureReader instead of crashing

* 2474: add masked transparency support for FreeImage while I'm at it

* 2474: Use FreeImage_ConvertToRawBits, let OpenGL generate the mips

* 2474: avoid msvc extension

* 2474: fix implicit conversion warning
@ghost ghost removed the Status:In Progress label Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems
Projects
None yet
Development

No branches or pull requests

2 participants