protonscr

[d3d9] Halo: CE some shaders not drawing with Ubershader

dxvkclosed appid 2003d3d9
doitsujin/dxvk#5291 · opened 2025-10-24 by Cambidd · updated 2025-10-27 · 6 comments · github · game page · search this game
CCambidd 2025-10-24 github

A number of shaders such as shadows for dynamic objects, jackal shields, covenant deployable cover, pelican thrusters, probably more, are failing to draw on the latest master.

Image

2.7.1
Image

Image

2.7.1
Image

Software information

Halo: CE (2003), Max setting.

System information

  • GPU: AMD 5700XT
  • Driver: Mesa radv 25.1.9
  • Wine version: wine-10.15 (Staging)
  • DXVK version: v2.7.1-195-g2f930978

Apitrace file(s)

https://drive.google.com/file/d/1FmVzG58W9klQWSBF-TV0wV7woEDTQOq6/view?usp=drive_link

Log files

halo_d3d9.log

BBlisto91 2025-10-24 github

Thank you for the well made issue report.
While the missing shadows in the apitrace does indeed reappear when disabling ubershader the missing ship thruster effect seem to be a separate issue. I have bisected that one to commit https://github.com/doitsujin/dxvk/commit/3d2ee752b457fc79ff91f195975395e886f91d2a

KK0bin maintainer 2025-10-25 github

This will need some testing:

  • VS FF, PS shader: Read color1 value with specular enabled and disabled. Is it 0,0,0,0? Is it the color1 value of the vertex?
  • VS shader, FF PS: Write color1 value with specular disabled, Write no color1 value with specular enabled
  • VS FF: Use color0/color1 as source but vertex doesn't have it. We do 1,1,1,1 for color0 and 0,0,0,0 for color1. Docs say it should use the material color.
  • Why do we only add the rgb values of the specular color to the final color and not alpha as well?
KK0bin maintainer 2025-10-26 github

SPECULAR_ENABLE controls whether the specular value is added to the final color in the pixel shader. This also happens if color1 comes from a programmable vertex shader. If the PS uses a color that either the FF VS or a programmable VS doesnt output, it gets 0,0,0,1, regardless of whether its color0 or color1.

It also controls whether the FF vertex shader actually calculates a specular color as part of the lighting calculation or just passes the vertex specular color (color1) along (default is 0,0,0,1).

The D3DTA_CONSTANT default is 0.

Setting the material source to a vertex color that doesnt exist in the vertex declaration makes it use the material color instead (like the documentation says).

KK0bin maintainer 2025-10-26 github

As an update for @Cambidd because those last two comments were notes for myself more than anything else:

There's PRs up that fix both the thrusters and the missing shadows, so the game will be returned to all its glory. I expect them to get merged next week or maybe the one after that.

KK0bin maintainer 2025-10-26 github

Fixed

CCambidd 2025-10-27 github

Many thanks. Much appreciated.

Nothing extracted yet.