1 bit per pixel colored PNGs display grayscale in the G3D viewer

41 views
Skip to first unread message

Eric Haines

unread,
Apr 5, 2023, 3:57:25 PM4/5/23
to G3D Users
The G3D viewer improperly displays 1 bit-per-pixel PNG colored images as grayscale.

I may not be using the newest G3D - I last build Feb. 27, 2023. The viewer.exe displays textures on surfaces incorrectly when the texture is a PNG with 1 bit per pixel and has two colors. The G3D viewer seems to assume the texture is grayscale. Here's a picture:
 
bad.jpg

If I load the texture into Irfanview and do Image -> Increase Color Depth to 16 colors (4 BPP), then use this texture, it displays fine:

good.jpg

I have put test files here showing the problem: https://erich.realtimerendering.com/download/g3d_grass_1bbp_bug.zip

The grass.obj file uses the 1 BPP image that shows gray (even though the image itself shows color in Irfanview), grass_bpp4.obj uses the 4 BPP version of the image.

Eric

Morgan McGuire

unread,
Apr 5, 2023, 11:25:37 PM4/5/23
to g3d-...@googlegroups.com
I'm on it, thanks! For obscure reasons, this bug report made my day.

-m


--
You received this message because you are subscribed to the Google Groups "G3D Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to g3d-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/g3d-users/b4f51365-d211-4b2f-af35-94137219f7f9n%40googlegroups.com.

Linwan Song

unread,
Apr 11, 2023, 6:47:20 PM4/11/23
to G3D Users
This has been fixed today in r7220.
Reply all
Reply to author
Forward
0 new messages