-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
NVIDIAGameWorks/dxvk-remix
#61Labels
Description
Describe the bug
As of version 0.4.1, calculateSceneRight is implemented as:
Vector3 SceneManager::calculateSceneRight() {
return cross(getSceneForward(), getSceneUp());
}
This assumes a right hand coordinate system, i.e. with forward = {0,0,1} and up = {0,1,0} it returns {-1,0,0}. The function is currently only used in the terrain baking, and it means that the view matrix for the baking is computed incorrectly for games that use a left handed coordinate system.
A simple fix would be to expose the coordinate system of the game as a config option and change it along of the lines of:
Vector3 SceneManager::calculateSceneRight() {
return isRHCoordinateSystem ? cross(getSceneForward(), getSceneUp()) : cross(getSceneUp(), getSceneForward());
}
I tested this fix out for 'Star Wars Galaxies' and the result was the terrain baking worked correctly. Perhaps there is a smarter way to infer the coordinate system without needing user input though.
Reactions are currently unavailable