OldUnreal / UnrealTournamentPatches

Other
970 stars 29 forks source link

[469c-RC3] Major PNG transparency inconsistencies across renderers, compressions and surfaces (complex vs gouraud) #1001

Open Feralidragon opened 2 years ago

Feralidragon commented 2 years ago

Check the following test map: TestPng.zip

In the map above I have imported a high resolution PNG file with transparency (the sun.png also included with the zip), one time using BC3 ( sun_bc3 in MyLevel) and another using BC7 ( sun_bc7 in MyLevel).

On the left you can see BSP sheets, with the top line being BC3, and the one below being BC7. Each column represents a different rendering style, in order: normal, masked, translucent and modulated.

On the right you can see mesh panels, with the exact same arrangement as the left.

The first thing you will notice right away is that there's a rendering inconsistency between BC3 and BC7, despite both being formats that support (and probably store) an alpha channel.

The second thing you will notice is that there's also a rendering inconsistency between BSP surfaces and mesh surfaces.

The third one is when you also try out different renderers, such as OpenGL and XOpenGL, you will also notice inconsistencies between them concerning how the transparency is handled: OpenGL seems to try to render the alpha normally, whereas XOpenGL cuts off at the 0.5 alpha threshold.

D3D9 also differs in rendering these. BC7 renders the same way as BC3 in this one, but that's because D3D9 fallbacks to P8 for BC7, since it doesn't support BC7 at all, but has the same inconsistency issues, especially when it comes to BSP vs Mesh.

Their differences can be spotted below:

png_opengl_bsp png_opengl_mesh png_xopengl_bsp png_xopengl_mesh png_d3d9_bsp png_d3d9_mesh

stijn-volckaert commented 2 years ago

Confirmed and fixed for the final release. UEd wasn't importing the BC7 alpha channel

Feralidragon commented 2 years ago

Nice. :)

What about the other inconsistencies?

SeriousBuggie commented 1 year ago

v469d Preview 10 + reimport texture. TestPng_fix.zip img img img