Skip to content

Skybox position, scale, and orientation incorrect and variable when using d3d9.shaderModel = 0 #4625

@BinqAdams

Description

@BinqAdams

Description of the issue

When using d3d9.shaderModel = 0;
The skybox (hemisphere) is rendered too small, and changes position / orientation / scale seemingly randomly as the camera position and orientation changes.
This does not occur in the stock base game's fixed function pipeline running without DXVK.

Replication

Run Painkiller Black Edition with d3d9.shaderModel = 0 set in dxvk.conf.
Load a level which uses a skybox (level 1 for example).
Observe the skybox in the incorrect scale and location.
Move around and change viewing angle to see the skybox occasionally teleport to a different location/orientation/scale

Software information

Game: Painkiller Black Edition
Settings: Doesn't matter, as long as the skybox is not disabled in settings

System information

  • GPU: RTX 3080 10GB
  • Driver: Latest 566.36
  • Wine version: Using windows
  • DXVK version: 2.5.3

API Trace

I only seem to be able to run apitrace without dxvk, replacing the dxvk d3d9.dll with the apitrace d3d9.dll.
I tried the method with the command line as such:

  • apitrace trace --api d3d9 F:\SteamLibrary\steamapps\common\Painkiller Black Edition\Bin\Painkiller.exe
  • apitrace trace --api dxgi F:\SteamLibrary\steamapps\common\Painkiller Black Edition\Bin\Painkiller.exe

However with --api d3d9 I received the message:
"\lib\wrappers\d3d9.dll was never used: application probably does not use this API"
With --api dxgi I received no message and no trace was generated.

Here are two screenshots, the first shows the issue clearly, and the second shows the skybox smaller and off in the distance when altering the viewing angle.

Image

Image

As I was unable to find another wrapper which could force the Pain engine into fixed function mode, I used a patched .dll to force the engine to use the fixed function path without using any wrappers - the issue did not occur and the sky rendered correctly in the "stock" fixed function path without DXVK.

Log

Painkiller_d3d9.log

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions