-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The problem with the gloss, shaders on cars in TOCA Race Driver 2 (2004) in all versions d3d8to9 #60
Comments
@wetcoder, I have had some problem getting the game to work on Windows 10 and so have not looked into the issue yet. Can you tell me how you got it working on Windows 10? Also can you send me a copy of the log file? |
Thanks, I was able to get the game to run once I patched it to version 1.2. :-) I can reproduce the issue now. |
The reason v1.4.0 and v1.5.0 look different is because of an issue with the CreatePixelShader where the PixelShader failed to compile. The issue was introduced in v1.4.0 with check-in 5d3fb1a line 1756 and was fixed in v1.6.0 with check-in 26f482b line 1699-1700. As far as the missing gloss on cars that has existed in all versions of d3d8to9 as far back as v1.3.0 (probably back to v1.0.0). More work needs to be done to figure out why the gloss is missing. |
The issue is with the very first PixelShader created. It looks like this: ps_1_1
tex t0
tex t1
tex t2
mul r0.xyz, v0, t1
+ mov_sat r0.w, c0.w
mul r0.xyz, t0, r0
+ add_sat r1.w, t0.w, 1-c2.w /* this line has the issue */
mul_x2 r1.xyz, t2, t0
+ mul_sat r1.w, r1.w, v0.w
lrp r0.xyz, r0.w, r1, r0
+ mul r0.w, 1-t0.w, 1-r1.w
lrp_x2 r0.xyz, r1.w, t2, r0
+ mov_sat t3.w, c0.z
lrp r0.w, t3.w, 1-r0.w, t0.w The problem is with the 8th line that says I am not sure why converting to ps_1_4 does not fix this. Below is the converted ps_1_4 code. If anyone sees an issue here let me know. ps_1_4 /* converted */
def c1, 0, 0, 0, 0 /* added line */
phase
texld r2, t2
texld r1, t1
texld r0, t0
mov r3, c2
mul r1.xyz, v0, r1
+ mov_sat r4.w, c0.w
mul r1.xyz, r0, r1
+ add_sat r5.w, r0.w, 1-r3.w
mul_x2 r5.xyz, r2, r0
+ mul_sat r5.w, r5.w, v0.w
lrp r1.xyz, r1.w, r5, r1
+ mul r1.w, 1-r0.w, 1-r5.w
lrp_x2 r1.xyz, r5.w, r2, r1
+ mov_sat r3.w, c0.z
lrp r1.w, r3.w, 1-r1.w, r0.w I created a quick hack for Race Driver 2 by manually hard coding ps_1_1 PixelShaders that work. Below is the patch. However this only fixes the issue for this one game. I need to figure out a better generic solution. Here is the patch for Race Driver 2: d3d8.zip |
@elishacloud Is it possible to somehow disable log file creation when using d3d8tо9.dll? |
Logs don't feel useful for end users at this point, I vote for them to be disabled by default IMO. |
Simply, I run games from compressed images (ISZ - UltraISO compressed ISO image format) in which the log file can not be written. |
Anyway, it is possible to opt-out of logging by defining |
I created a tool called dxwrapper and while it does not have the logs fully disabled it does log less data. Also it has a feature to automatically load the ISO when the game starts and automatically unload the ISO when the game ends. No need to use UltraISO!
Note: this already has the glossy finish fix. As far as the color issue, I don't believe that is related to this fix. The same issue happens with True Crime: New York City, see here. I suspect it has something to do with the |
@elishacloud I do not have installation iso with distributions - I have (ISZ) that I myself create from folders with already installed games in the UltraIso As an option I will use dxwrapper which does not create a log file |
You could try using the new LZX compression in Windows 10. It is not quite as good compression as compressed iso file (ISZ) but much easier to manage and no need for UltraISO.
DxWrapper can run any CLI. So if you have a CLI (or a batch file) that can load UltraISO and then unload it when done, this should work already. |
Intel(R) HD Graphics (Gen7LP) - Intel(R) Atom(TM) CPU Z3795
Microsoft Windows 10 Home (64-bit) v1709 build 10.0.16299.192 (Win10 RS3)
TOCA Race Driver 2 v1.2
this error occurs only in this game, using d3d8to9 in other games (there is no such problem)
please fix this "error" in d3d8to9
The text was updated successfully, but these errors were encountered: