Closed PatrickvL closed 6 years ago
The following vertex shader assembly line fails :
mad oFog /* removed swizzle */, -r3, c150.z, c150.w
It can be fixed by adding this regexp to Direct3DDevice8::CreateVertexShader() :
SourceCode = std::regex_replace(SourceCode, std::regex("mad (oFog|oPts)(.*), (-?)([crv][0-9]+(?![\\.0-9])), (.+)\\n"), "mad $1$2, $3$4.x /* select single component */, $5\n");
The result is :
mad oFog /* removed swizzle */, -r3.x /* select single component */, c150.z, c150.w
..which succesfully compiles. (Not sure if the .x component is the right choice.)
.x
Test-case : Cxbx-Reloaded, running Morrowind.
Do you want to make this into a pull request?
No time, I'm sorry
You neither it seems ;)
? It's fixed in https://github.com/crosire/d3d8to9/commit/52a32ef4d8f569ec299bcad13f1a531ce12504c1?
The following vertex shader assembly line fails :
It can be fixed by adding this regexp to Direct3DDevice8::CreateVertexShader() :
The result is :
..which succesfully compiles. (Not sure if the
.x
component is the right choice.)Test-case : Cxbx-Reloaded, running Morrowind.