Skip to content

Duke Nukem 3D

EDuke32

Black Textures in Polymer and Polymost with texture filtering

I experienced black textures (or shadows) running Duke Nukem 3D in EDuke32 on my Linux system. It's most noticeable in The Abyss, where the entire level is almost black, but even in the first level of LA Meltdown, the entrance to the cinema under the canopy is completely black.

Black canopy

For reference, my system configuration is:

  • Pop!_OS 22.04
  • AMD Radeon RX 7800XT
  • EDuke32 from Pop!_Shop (as a Flatpak) - r10578-30deaa520
  • also tried building from source (2024-06-20)
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon RX 7800 XT (radeonsi, navi32, LLVM 15.0.7, DRM 3.57, 6.9.3-76060903-generic) (0x747e)
    Version: 24.0.3
    Accelerated: yes
    Video memory: 16384MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 14563 MB, largest block: 14563 MB
    VBO free aux. memory - total: 31732 MB, largest block: 31732 MB
    Texture free memory - total: 14563 MB, largest block: 14563 MB
    Texture free aux. memory - total: 31732 MB, largest block: 31732 MB
    Renderbuffer free memory - total: 14563 MB, largest block: 14563 MB
    Renderbuffer free aux. memory - total: 31732 MB, largest block: 31732 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 16384 MB
    Total available memory: 48485 MB
    Currently available dedicated video memory: 14563 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 7800 XT (radeonsi, navi32, LLVM 15.0.7, DRM 3.57, 6.9.3-76060903-generic)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.0.3-1pop1~1711635559~22.04~7a9f319

Troubleshooting

The problem can be worked around by turning off the texture filtering (e.g. Bilinear filtering), or running with the Classic renderer. Some people may prefer the blocky unfiltered textures, but filtering can look nice.

You may be aware that there is a command console which can be turned on in-game. By default, this is mapped to the back-tick ` key.

The command console has auto-complete, and so if you type r followed by the TAB key, you will see the renderer-related options.

Of interest was r_usenewshading. Typing that followed by ENTER displays the current value and some help about the possible values.

The possible settings are: - 0: Orig Polymost - 1: 07/2011 - 2: Linear 12/2012 - 3: No Neg. Start 03/2014 - 4: Base Constant on Shade Table 11/2017

You can change them by typing r_usenewshading followed by the number, e.g. r_usenewshading 2

Play around with the values and see what works for you, but I found that any of 0, 1, 2, or 3 looked fine, with 2 being the best looking to me. Note that lighting effects differ between the modes.

Setting Permanently

You will want the setting to take effect every time you launch the game, so put an entry into settings.cfg in your EDuke32 directory.

Add the following line to the file (substitute your preferred value):

r_usenewshading "2"

r_usenewshading 2