Hi - yes its'a always best to do a clean install. I believe bo3b provides an "uninstall.bat" file to get rid of the old files so it's east enough.
Thanks for the SLI bits - we can put that in our release notes.
[quote="vaelo"]Sorry for not getting back to you guys yet, last night got busy (I do have 4 kids!)
I will try to make sure I test these things for you later this evening
Thanks again for working on this[/quote]No problem. Be sure to try adjusting the convergence a bit before doing too much work here, as shadows can be off at first. (Profile problem) If that fixes the problem, please let us know.
vaelo said:Sorry for not getting back to you guys yet, last night got busy (I do have 4 kids!)
I will try to make sure I test these things for you later this evening
Thanks again for working on this
No problem. Be sure to try adjusting the convergence a bit before doing too much work here, as shadows can be off at first. (Profile problem) If that fixes the problem, please let us know.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
Thanks bo3b
I always adjust the depth or convergence when starting as noted in the OP.
Bad news - I cycled through all pixel shaders numerous times (which provided some technical entertainment I might add) during one "night cycle" and could not turn off the broken lighting effects, so does this mean they are vertex shaders? (sorry I know little of rendering)
I saw 4 and 5 keys are supposed to cycle those but you said previously that it's pixel shaders only right now?
I always adjust the depth or convergence when starting as noted in the OP.
Bad news - I cycled through all pixel shaders numerous times (which provided some technical entertainment I might add) during one "night cycle" and could not turn off the broken lighting effects, so does this mean they are vertex shaders? (sorry I know little of rendering)
I saw 4 and 5 keys are supposed to cycle those but you said previously that it's pixel shaders only right now?
Yeah, that's why I encouraged you to take a look with hunting, because it's really interesting how the games are constructed, and this gives you a peek behind the curtain.
Interesting result. You should have been able to see the lights flicker out. It's in a ring, so you should be able to see when you've cycled all the way around.
The vertex shaders could be related, but the pixel shaders are more interesting and usually where the problem lies nowadays. Also, you can't have an output without a pixel shader, so I can't explain why you didn't see anything happen.
We should probably hand this off to Mike's higher expertise, so if you can find a save game where you have the problem, Mike can look directly. If you don't have storage anywhere, you can send the file to me at <3dmigoto@bo3b.net>. Thanks for looking.
Yeah, that's why I encouraged you to take a look with hunting, because it's really interesting how the games are constructed, and this gives you a peek behind the curtain.
Interesting result. You should have been able to see the lights flicker out. It's in a ring, so you should be able to see when you've cycled all the way around.
The vertex shaders could be related, but the pixel shaders are more interesting and usually where the problem lies nowadays. Also, you can't have an output without a pixel shader, so I can't explain why you didn't see anything happen.
We should probably hand this off to Mike's higher expertise, so if you can find a save game where you have the problem, Mike can look directly. If you don't have storage anywhere, you can send the file to me at <3dmigoto@bo3b.net>. Thanks for looking.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
Yes, it was an interesting thing seeing slightly into the bones of the game!
I did see the lights themselves (the sources) go out, but the effects related to them that are problematic never did go out! I cycled at least 3 times through the entire shader set to make sure.
The problem with save games is that the time of day doesn't seem to be preserved - for example, when I posted last night on this forum I'd exited the game in the night time; the game having saved moments before due to a cut scene. Upon login today the same save was now mid-day. I've noticed this before in AC4 and I've not seen that being the case in a game before. But for whatever reason, logout "game time" doesn't seem to bring you back necessarily to the same time-of-day in game when starting the game again.
My only advice is to fast travel to Nassau (though I suspect this is a global issue), and eat some sushi whilst waiting for night time. Then all light sources go south. They render light in opposite directions so it crossed my mind that it might me due to the aforementioned reflection issues; perhaps this will be fixed already by the incoming modifications.
In any event, I please let me know if I can help further (despite being renderingly-challenged)
Cheers
Yes, it was an interesting thing seeing slightly into the bones of the game!
I did see the lights themselves (the sources) go out, but the effects related to them that are problematic never did go out! I cycled at least 3 times through the entire shader set to make sure.
The problem with save games is that the time of day doesn't seem to be preserved - for example, when I posted last night on this forum I'd exited the game in the night time; the game having saved moments before due to a cut scene. Upon login today the same save was now mid-day. I've noticed this before in AC4 and I've not seen that being the case in a game before. But for whatever reason, logout "game time" doesn't seem to bring you back necessarily to the same time-of-day in game when starting the game again.
My only advice is to fast travel to Nassau (though I suspect this is a global issue), and eat some sushi whilst waiting for night time. Then all light sources go south. They render light in opposite directions so it crossed my mind that it might me due to the aforementioned reflection issues; perhaps this will be fixed already by the incoming modifications.
In any event, I please let me know if I can help further (despite being renderingly-challenged)
[quote="mike_ar69"]Someone asked about Liberations HD. No idea if that works, try it out and let me know. The reviews are bad, so I'm not going to buy it.[/quote]
First of all I want to thank You again so much for Your great fixes for AC3 and AC4 - the reason for me to finally buy AC4 now :)
I'm the one who asked about a fix for AC Liberations. I've tried the game on Win 7 with single 560Ti. When using 337.50 and Your fixes for AC3 and AC4 the game crashes at start. With 320.49 the game starts but the fixes don't seem to have any effects (shadows still broken, etc.). I've tried hunting=1 in d3dx.ini and used the num keys but also couldn't see any effects although this should deactivate shaders (?). The folders ShaderFromGame and ShaderCache are created, also log files when I use calls=1. I've tried both fixes (AC3 and AC4). AC Liberations is said to use the AC3 engine...
I understand that You personally are not interested in the game so I don't expect You to waste Your time with supporting the game. But maybe You have an idea what I could try to get 3Dmigoto work with ACL ...?
mike_ar69 said:Someone asked about Liberations HD. No idea if that works, try it out and let me know. The reviews are bad, so I'm not going to buy it.
First of all I want to thank You again so much for Your great fixes for AC3 and AC4 - the reason for me to finally buy AC4 now :)
I'm the one who asked about a fix for AC Liberations. I've tried the game on Win 7 with single 560Ti. When using 337.50 and Your fixes for AC3 and AC4 the game crashes at start. With 320.49 the game starts but the fixes don't seem to have any effects (shadows still broken, etc.). I've tried hunting=1 in d3dx.ini and used the num keys but also couldn't see any effects although this should deactivate shaders (?). The folders ShaderFromGame and ShaderCache are created, also log files when I use calls=1. I've tried both fixes (AC3 and AC4). AC Liberations is said to use the AC3 engine...
I understand that You personally are not interested in the game so I don't expect You to waste Your time with supporting the game. But maybe You have an idea what I could try to get 3Dmigoto work with ACL ...?
My original display name is 3d4dd - for some reason Nvidia changed it..?!
[quote="vaelo"]Thanks bo3b
I always adjust the depth or convergence when starting as noted in the OP.
Bad news - I cycled through all pixel shaders numerous times (which provided some technical entertainment I might add) during one "night cycle" and could not turn off the broken lighting effects, so does this mean they are vertex shaders? (sorry I know little of rendering)
I saw 4 and 5 keys are supposed to cycle those but you said previously that it's pixel shaders only right now?[/quote]
Hi - you need to cylce through with keys 1 and 2, then save a shader with 3.
Also, don't worry about the time of day with a save game, its the *location* that is important - we can get there and hang around until it gets dark.
[quote="3d4dd"][quote="mike_ar69"]Someone asked about Liberations HD. No idea if that works, try it out and let me know. The reviews are bad, so I'm not going to buy it.[/quote]
First of all I want to thank You again so much for Your great fixes for AC3 and AC4 - the reason for me to finally buy AC4 now :)
I'm the one who asked about a fix for AC Liberations. I've tried the game on Win 7 with single 560Ti. When using 337.50 and Your fixes for AC3 and AC4 the game crashes at start. With 320.49 the game starts but the fixes don't seem to have any effects (shadows still broken, etc.). I've tried hunting=1 in d3dx.ini and used the num keys but also couldn't see any effects although this should deactivate shaders (?). The folders ShaderFromGame and ShaderCache are created, also log files when I use calls=1. I've tried both fixes (AC3 and AC4). AC Liberations is said to use the AC3 engine...
I understand that You personally are not interested in the game so I don't expect You to waste Your time with supporting the game. But maybe You have an idea what I could try to get 3Dmigoto work with ACL ...?[/quote]
If I understand you correctly, you tried the specific AC3 and AC4 fixes with the game Liberations HD? If so, then I would not have expected it to work actually, I am certain that specific shaders will be different/have different CRCs. That being said, the 'content' of the shaders is almost certainly going to be the same method as AC3 and AC4, so if you want to tackle the game, look in my shaders (Pixel Shaders mostly), look at the headers and search for similar headers in the Liberations ShaderFixes folder - in particular focus on the Float4x4 matrices, things like g_ViewToWorld, and g_ViewToWorld, and also the float4 g_ReverseProjectionParams is important. There are two main types of PS that need fixing, one that fixes the View coord, one that fixes the World coord:
1. World Coord Correction
You will see code like this at the top of the shader:
r0.xy = v1.xy / v1.ww;
r0.xy = r0.xy * g_ViewportScaleOffset.xy + g_ViewportScaleOffset.zw;
g_TextureDepthDX11_MSAA.GetDimensions(r0.z, r0.w, bitmask.x);
r0.zw = r0.zw;
r0.zw = r0.xy * r0.zw;
r1.xy = (int2)r0.zw;
r1.zw = float2(0.000000e+000,0.000000e+000);
r0.z = g_TextureDepthDX11_MSAA.Load(r1.xyz,v4.x).x;
r0.z = g_ReverseProjectionParams.z + r0.z;
r0.z = g_ReverseProjectionParams.w / r0.z;
r1.xyz = v2.xyz * r0.zzz + v3.xyz;
One of the main characteristics of these shaders is that the g_WorldToVoew and g_ViewToWorld transformations are *not* used in the default shader code. You need to fix r1, as follows:
//Mike_ar69 - Stereo Shift
float4 stereoParams = StereoParams.Load(0);
float4 r21, r22;
r21.xyz = r1.xyz;
r21.w = 1.000000000e+000;
r22.x = dot(r21.xyzw, g_WorldToView._m00_m10_m20_m30);
r22.y = dot(r21.xyzw, g_WorldToView._m01_m11_m21_m31);
r22.z = dot(r21.xyzw, g_WorldToView._m02_m12_m22_m32);
r22.w = dot(r21.xyzw, g_WorldToView._m03_m13_m23_m33);
r22.x += stereoParams.x * (-r22.z - stereoParams.y ) * g_ReverseProjectionParams.x;
r21.x = dot(r22.xyzw, g_ViewToWorld._m00_m10_m20_m30);
r21.y = dot(r22.xyzw, g_ViewToWorld._m01_m11_m21_m31);
r21.z = dot(r22.xyzw, g_ViewToWorld._m02_m12_m22_m32);
r1.xyz = r21.xyz;
2. View Coord Correction
The main identifying characteristic of these shaders is that g_ViewToWorld is used in the shader. You will see code like the following:
r0.xy = v1.xy / v1.ww;
r0.zw = g_ReverseProjectionParams2.xy + r0.xy;
r0.xy = r0.xy * g_ViewportScaleOffset.xy + g_ViewportScaleOffset.zw;
r0.zw = g_ReverseProjectionParams.xy * r0.zw;
g_TextureDepthDX11_MSAA.GetDimensions(r1.x, r1.y, bitmask.x);
r1.xy = r1.xy;
r1.xy = r1.xy * r0.xy;
r1.xy = (int2)r1.xy;
r1.zw = float2(0.000000e+000,0.000000e+000);
r1.x = g_TextureDepthDX11_MSAA.Load(r1.xyz,0.000000000e+000).x;
r1.x = g_ReverseProjectionParams.z + r1.x;
r1.z = g_ReverseProjectionParams.w / r1.x;
r1.xy = r1.zz * r0.zw;
r1.w = 1.000000000e+000;
r2.x = dot(r1.xyzw, g_ViewToWorld._m00_m10_m20_m30);
r2.y = dot(r1.xyzw, g_ViewToWorld._m01_m11_m21_m31);
r2.z = dot(r1.xyzw, g_ViewToWorld._m02_m12_m22_m32);
which needs correcting to:
r0.xy = v1.xy / v1.ww;
r0.zw = g_ReverseProjectionParams2.xy + r0.xy;
r0.xy = r0.xy * g_ViewportScaleOffset.xy + g_ViewportScaleOffset.zw;
r0.zw = g_ReverseProjectionParams.xy * r0.zw;
g_TextureDepthDX11_MSAA.GetDimensions(r1.x, r1.y, bitmask.x);
r1.xy = r1.xy;
r1.xy = r1.xy * r0.xy;
r1.xy = (int2)r1.xy;
r1.zw = float2(0.000000e+000,0.000000e+000);
r1.x = g_TextureDepthDX11_MSAA.Load(r1.xyz,0.000000000e+000).x;
r1.x = g_ReverseProjectionParams.z + r1.x;
r1.z = g_ReverseProjectionParams.w / r1.x;
r1.xy = r1.zz * r0.zw;
r1.w = 1.000000000e+000;
//Stereo Shift
float4 stereoParams = StereoParams.Load(0);
r1.x += stereoParams.x * (-r1.z - stereoParams.y) * g_ReverseProjectionParams.x;
r2.x = dot(r1.xyzw, g_ViewToWorld._m00_m10_m20_m30);
r2.y = dot(r1.xyzw, g_ViewToWorld._m01_m11_m21_m31);
r2.z = dot(r1.xyzw, g_ViewToWorld._m02_m12_m22_m32);
There are of course lots of other PS for different things (water caustics, some lighting etc), and the VS for HUD and stuff are all identified in the AC4 VS file headers.
Hope this helps.
I always adjust the depth or convergence when starting as noted in the OP.
Bad news - I cycled through all pixel shaders numerous times (which provided some technical entertainment I might add) during one "night cycle" and could not turn off the broken lighting effects, so does this mean they are vertex shaders? (sorry I know little of rendering)
I saw 4 and 5 keys are supposed to cycle those but you said previously that it's pixel shaders only right now?
Hi - you need to cylce through with keys 1 and 2, then save a shader with 3.
Also, don't worry about the time of day with a save game, its the *location* that is important - we can get there and hang around until it gets dark.
3d4dd said:
mike_ar69 said:Someone asked about Liberations HD. No idea if that works, try it out and let me know. The reviews are bad, so I'm not going to buy it.
First of all I want to thank You again so much for Your great fixes for AC3 and AC4 - the reason for me to finally buy AC4 now :)
I'm the one who asked about a fix for AC Liberations. I've tried the game on Win 7 with single 560Ti. When using 337.50 and Your fixes for AC3 and AC4 the game crashes at start. With 320.49 the game starts but the fixes don't seem to have any effects (shadows still broken, etc.). I've tried hunting=1 in d3dx.ini and used the num keys but also couldn't see any effects although this should deactivate shaders (?). The folders ShaderFromGame and ShaderCache are created, also log files when I use calls=1. I've tried both fixes (AC3 and AC4). AC Liberations is said to use the AC3 engine...
I understand that You personally are not interested in the game so I don't expect You to waste Your time with supporting the game. But maybe You have an idea what I could try to get 3Dmigoto work with ACL ...?
If I understand you correctly, you tried the specific AC3 and AC4 fixes with the game Liberations HD? If so, then I would not have expected it to work actually, I am certain that specific shaders will be different/have different CRCs. That being said, the 'content' of the shaders is almost certainly going to be the same method as AC3 and AC4, so if you want to tackle the game, look in my shaders (Pixel Shaders mostly), look at the headers and search for similar headers in the Liberations ShaderFixes folder - in particular focus on the Float4x4 matrices, things like g_ViewToWorld, and g_ViewToWorld, and also the float4 g_ReverseProjectionParams is important. There are two main types of PS that need fixing, one that fixes the View coord, one that fixes the World coord:
1. World Coord Correction
You will see code like this at the top of the shader:
One of the main characteristics of these shaders is that the g_WorldToVoew and g_ViewToWorld transformations are *not* used in the default shader code. You need to fix r1, as follows:
2. View Coord Correction
The main identifying characteristic of these shaders is that g_ViewToWorld is used in the shader. You will see code like the following:
There are of course lots of other PS for different things (water caustics, some lighting etc), and the VS for HUD and stuff are all identified in the AC4 VS file headers.
Thanks a lot for the AC4 fix, now I only need a Steam sale to get it stupidly cheap :)
All hail 3d modders DHR, MasterOtaku, Losti, Necropants, Helifax, bo3b, mike_ar69, Flugan, DarkStarSword, 4everAwake, 3d4dd and so many more helping to keep the 3d dream alive, find their 3d fixes at http://helixmod.blogspot.com/ Also check my site for spanish VR and mobile gaming news: www.gamermovil.com
@mike_ar69:
Thank You for Your hints! But as I'm a noob regarding shaders I'm already stuck. I've downloaded the release build 0.58-alpha and used it on ACL. Unfortunately cycling through the shaders doesn't work with ACL. I've tried the same build and the same d3dx.ini with AC3 and it worked there (shaders flickering and marked) but not with ACL. So can't isolate the shaders for the broken shadows. I've dumped all the shaders (export_shaders=1, export_hlsl=1). Now I've got hundreds PS and want to find those that have to be corrected. What do I have to look for exactly when I want to find "code like this at the top of the shader"? I couldn't find the same code You have posted above... Are there certain keywords or lines I can use for a search?
@mike_ar69:
Thank You for Your hints! But as I'm a noob regarding shaders I'm already stuck. I've downloaded the release build 0.58-alpha and used it on ACL. Unfortunately cycling through the shaders doesn't work with ACL. I've tried the same build and the same d3dx.ini with AC3 and it worked there (shaders flickering and marked) but not with ACL. So can't isolate the shaders for the broken shadows. I've dumped all the shaders (export_shaders=1, export_hlsl=1). Now I've got hundreds PS and want to find those that have to be corrected. What do I have to look for exactly when I want to find "code like this at the top of the shader"? I couldn't find the same code You have posted above... Are there certain keywords or lines I can use for a search?
My original display name is 3d4dd - for some reason Nvidia changed it..?!
@3d4dd: Sorry, my bad here. The older versions of the actual code are pretty busted. The 0.58 version is specifically busted on AC4 for shader hunting, I had to create a new mechanism. The working on AC3, but not on Liberations suggests strongly that Liberations uses the AC4 engine.
Do this instead:
1) download the very latest version, 0.62 for AC4, even though we know the shaders will be wrong.
2) Make sure your Liberations exe folder is clean of migoto-ness, use the uninstall.bat and also delete the 3 shader folders.
3) Extract [i]only[/i] the DLLs from the 0.62, skip the ShaderFixes folder. This will give you the best code we've got.
4) Edit the newly extracted d3dx.ini file, and change calls=1, hunting=1, export_hlsl=1, cache_shaders=0. That puts it into 'hunting' mode, and creates a dump of all shaders in ShaderCache.
That should give you viable dumped shaders. Their numbers/CRCs (the 029d8ae3f8a stuff in front of ps.txt) will be different than AC4, but the contents should be very similar.
When running the game, find a target pixel shader. Start with a screen depth shadow because it will match Mike's fix above. (Shadows cannot be set to Soft-Shadows) Cycle through with Num 1,2. When you find one, mark it with Num 3. Quit the game, and find the CRC number for the shader in question. Look for 'marked'.
Find that CRC in the ShaderCache folder, and open the txt file with any editor.
Look for the patterns Mike talked about above, and try to edit the file to match. This part will be a little hard, but you can do it, it's basically pattern matching.
When next you run the game, same spot, the new shader should load, and fix the flaw.
Please let us know what you see and if you get stuck. Both Mike and I are super, super happy to help other people do their own fixes and learn how it works, and we will walk you through any problems you see.
@3d4dd: Sorry, my bad here. The older versions of the actual code are pretty busted. The 0.58 version is specifically busted on AC4 for shader hunting, I had to create a new mechanism. The working on AC3, but not on Liberations suggests strongly that Liberations uses the AC4 engine.
Do this instead:
1) download the very latest version, 0.62 for AC4, even though we know the shaders will be wrong.
2) Make sure your Liberations exe folder is clean of migoto-ness, use the uninstall.bat and also delete the 3 shader folders.
3) Extract only the DLLs from the 0.62, skip the ShaderFixes folder. This will give you the best code we've got.
4) Edit the newly extracted d3dx.ini file, and change calls=1, hunting=1, export_hlsl=1, cache_shaders=0. That puts it into 'hunting' mode, and creates a dump of all shaders in ShaderCache.
That should give you viable dumped shaders. Their numbers/CRCs (the 029d8ae3f8a stuff in front of ps.txt) will be different than AC4, but the contents should be very similar.
When running the game, find a target pixel shader. Start with a screen depth shadow because it will match Mike's fix above. (Shadows cannot be set to Soft-Shadows) Cycle through with Num 1,2. When you find one, mark it with Num 3. Quit the game, and find the CRC number for the shader in question. Look for 'marked'.
Find that CRC in the ShaderCache folder, and open the txt file with any editor.
Look for the patterns Mike talked about above, and try to edit the file to match. This part will be a little hard, but you can do it, it's basically pattern matching.
When next you run the game, same spot, the new shader should load, and fix the flaw.
Please let us know what you see and if you get stuck. Both Mike and I are super, super happy to help other people do their own fixes and learn how it works, and we will walk you through any problems you see.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
I wanted to test this for you guys, but I just loaded it up, and I think I'm getting the 3D compatibility mode. 3D is flattish and shallow, HUD is glitchy, and there are haloes on everything. Also, the green text at the start says "excellent".
I know that the latest beta driver would let me disable the 3Dcompatibility mode, but I don't want to install it because of the large amount of serious issues people have been having with it.
I guess my only other option would be to roll back my driver to pre-3Dcompatilibty mode, right?
I wanted to test this for you guys, but I just loaded it up, and I think I'm getting the 3D compatibility mode. 3D is flattish and shallow, HUD is glitchy, and there are haloes on everything. Also, the green text at the start says "excellent".
I know that the latest beta driver would let me disable the 3Dcompatibility mode, but I don't want to install it because of the large amount of serious issues people have been having with it.
I guess my only other option would be to roll back my driver to pre-3Dcompatilibty mode, right?
[quote="Volnaiskra"]I don't want to install it because of the large amount of serious issues people have been having with it.[/quote]
What issues? I've not seen anything.
@bo3b and mike_ar69: ...and I'm super super happy for Your help :) Sorry for my delayed answer but playing AC4 with Your excellent fix was such a huge temptation ;)
I did some tests on AC Liberation today. Good news: with the AC4 dll files shader hunting works now in ACL!
BTW the hotkey settings for a German keyboards must be:
Input=Tastatur
and "Num 1" is "1 (ZEHNERTASTATUR)" etc.
Bad news: the PS I have marked have nothing in common with the code mike_ar69 posted above. Just to be completely sure: I press Num 2 until the shadows start flickering. Then I press Num 3 for marking the shader. And so on until I have cycled through all shaders. In d3d11_log.txt I search for "marked" and when I find
"Pixel shader marked: pixel shader hash = 2ee193264b7bee72" I will check 2ee193264b7bee72-ps_replace.txt in the folder ShaderCache, and so on for the other marked entries. The entries with "visited index buffer hash = ..." are not relevant, are they?
As mentioned before the marked shader are (to me) very different from the code for fixing shadows :( I've uploaded them here: [url]http://www.file-upload.net/download-8902994/marked-shaders.zip.html[/url]
Then I've tried to find the code patterns in all of the PS in ShaderCache. I couldn't find exactly the same code. Now my problem is that I'm a noob regarding shader code so I don't know what are the keywords or phrases I have to search for to find the pattern. I've uploaded the PS in the cache here: [url]http://www.file-upload.net/download-8903067/PS-in-the-cache.zip.html[/url] I really don't exspect You to look at them Yourself!!! Only if You have nothing more important to do ;) But maybe You have another hint for me...?
Your AC4 fix works great for me. The only issues I have noticed are the stars that are to close.
@bo3b and mike_ar69: ...and I'm super super happy for Your help :) Sorry for my delayed answer but playing AC4 with Your excellent fix was such a huge temptation ;)
I did some tests on AC Liberation today. Good news: with the AC4 dll files shader hunting works now in ACL!
BTW the hotkey settings for a German keyboards must be:
Input=Tastatur
and "Num 1" is "1 (ZEHNERTASTATUR)" etc.
Bad news: the PS I have marked have nothing in common with the code mike_ar69 posted above. Just to be completely sure: I press Num 2 until the shadows start flickering. Then I press Num 3 for marking the shader. And so on until I have cycled through all shaders. In d3d11_log.txt I search for "marked" and when I find
"Pixel shader marked: pixel shader hash = 2ee193264b7bee72" I will check 2ee193264b7bee72-ps_replace.txt in the folder ShaderCache, and so on for the other marked entries. The entries with "visited index buffer hash = ..." are not relevant, are they?
As mentioned before the marked shader are (to me) very different from the code for fixing shadows :( I've uploaded them here: http://www.file-upload.net/download-8902994/marked-shaders.zip.html
Then I've tried to find the code patterns in all of the PS in ShaderCache. I couldn't find exactly the same code. Now my problem is that I'm a noob regarding shader code so I don't know what are the keywords or phrases I have to search for to find the pattern. I've uploaded the PS in the cache here: http://www.file-upload.net/download-8903067/PS-in-the-cache.zip.html I really don't exspect You to look at them Yourself!!! Only if You have nothing more important to do ;) But maybe You have another hint for me...?
Your AC4 fix works great for me. The only issues I have noticed are the stars that are to close.
My original display name is 3d4dd - for some reason Nvidia changed it..?!
Thanks for the SLI bits - we can put that in our release notes.
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
I always adjust the depth or convergence when starting as noted in the OP.
Bad news - I cycled through all pixel shaders numerous times (which provided some technical entertainment I might add) during one "night cycle" and could not turn off the broken lighting effects, so does this mean they are vertex shaders? (sorry I know little of rendering)
I saw 4 and 5 keys are supposed to cycle those but you said previously that it's pixel shaders only right now?
Core i7 920 @ 3.6Ghz, 6GB 3 Channel, SLi GTX670 2GB, SSD
Interesting result. You should have been able to see the lights flicker out. It's in a ring, so you should be able to see when you've cycled all the way around.
The vertex shaders could be related, but the pixel shaders are more interesting and usually where the problem lies nowadays. Also, you can't have an output without a pixel shader, so I can't explain why you didn't see anything happen.
We should probably hand this off to Mike's higher expertise, so if you can find a save game where you have the problem, Mike can look directly. If you don't have storage anywhere, you can send the file to me at <3dmigoto@bo3b.net>. Thanks for looking.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
I did see the lights themselves (the sources) go out, but the effects related to them that are problematic never did go out! I cycled at least 3 times through the entire shader set to make sure.
The problem with save games is that the time of day doesn't seem to be preserved - for example, when I posted last night on this forum I'd exited the game in the night time; the game having saved moments before due to a cut scene. Upon login today the same save was now mid-day. I've noticed this before in AC4 and I've not seen that being the case in a game before. But for whatever reason, logout "game time" doesn't seem to bring you back necessarily to the same time-of-day in game when starting the game again.
My only advice is to fast travel to Nassau (though I suspect this is a global issue), and eat some sushi whilst waiting for night time. Then all light sources go south. They render light in opposite directions so it crossed my mind that it might me due to the aforementioned reflection issues; perhaps this will be fixed already by the incoming modifications.
In any event, I please let me know if I can help further (despite being renderingly-challenged)
Cheers
Core i7 920 @ 3.6Ghz, 6GB 3 Channel, SLi GTX670 2GB, SSD
First of all I want to thank You again so much for Your great fixes for AC3 and AC4 - the reason for me to finally buy AC4 now :)
I'm the one who asked about a fix for AC Liberations. I've tried the game on Win 7 with single 560Ti. When using 337.50 and Your fixes for AC3 and AC4 the game crashes at start. With 320.49 the game starts but the fixes don't seem to have any effects (shadows still broken, etc.). I've tried hunting=1 in d3dx.ini and used the num keys but also couldn't see any effects although this should deactivate shaders (?). The folders ShaderFromGame and ShaderCache are created, also log files when I use calls=1. I've tried both fixes (AC3 and AC4). AC Liberations is said to use the AC3 engine...
I understand that You personally are not interested in the game so I don't expect You to waste Your time with supporting the game. But maybe You have an idea what I could try to get 3Dmigoto work with ACL ...?
My original display name is 3d4dd - for some reason Nvidia changed it..?!
Hi - you need to cylce through with keys 1 and 2, then save a shader with 3.
Also, don't worry about the time of day with a save game, its the *location* that is important - we can get there and hang around until it gets dark.
If I understand you correctly, you tried the specific AC3 and AC4 fixes with the game Liberations HD? If so, then I would not have expected it to work actually, I am certain that specific shaders will be different/have different CRCs. That being said, the 'content' of the shaders is almost certainly going to be the same method as AC3 and AC4, so if you want to tackle the game, look in my shaders (Pixel Shaders mostly), look at the headers and search for similar headers in the Liberations ShaderFixes folder - in particular focus on the Float4x4 matrices, things like g_ViewToWorld, and g_ViewToWorld, and also the float4 g_ReverseProjectionParams is important. There are two main types of PS that need fixing, one that fixes the View coord, one that fixes the World coord:
1. World Coord Correction
You will see code like this at the top of the shader:
r0.xy = v1.xy / v1.ww;
r0.xy = r0.xy * g_ViewportScaleOffset.xy + g_ViewportScaleOffset.zw;
g_TextureDepthDX11_MSAA.GetDimensions(r0.z, r0.w, bitmask.x);
r0.zw = r0.zw;
r0.zw = r0.xy * r0.zw;
r1.xy = (int2)r0.zw;
r1.zw = float2(0.000000e+000,0.000000e+000);
r0.z = g_TextureDepthDX11_MSAA.Load(r1.xyz,v4.x).x;
r0.z = g_ReverseProjectionParams.z + r0.z;
r0.z = g_ReverseProjectionParams.w / r0.z;
r1.xyz = v2.xyz * r0.zzz + v3.xyz;
One of the main characteristics of these shaders is that the g_WorldToVoew and g_ViewToWorld transformations are *not* used in the default shader code. You need to fix r1, as follows:
//Mike_ar69 - Stereo Shift
float4 stereoParams = StereoParams.Load(0);
float4 r21, r22;
r21.xyz = r1.xyz;
r21.w = 1.000000000e+000;
r22.x = dot(r21.xyzw, g_WorldToView._m00_m10_m20_m30);
r22.y = dot(r21.xyzw, g_WorldToView._m01_m11_m21_m31);
r22.z = dot(r21.xyzw, g_WorldToView._m02_m12_m22_m32);
r22.w = dot(r21.xyzw, g_WorldToView._m03_m13_m23_m33);
r22.x += stereoParams.x * (-r22.z - stereoParams.y ) * g_ReverseProjectionParams.x;
r21.x = dot(r22.xyzw, g_ViewToWorld._m00_m10_m20_m30);
r21.y = dot(r22.xyzw, g_ViewToWorld._m01_m11_m21_m31);
r21.z = dot(r22.xyzw, g_ViewToWorld._m02_m12_m22_m32);
r1.xyz = r21.xyz;
2. View Coord Correction
The main identifying characteristic of these shaders is that g_ViewToWorld is used in the shader. You will see code like the following:
r0.xy = v1.xy / v1.ww;
r0.zw = g_ReverseProjectionParams2.xy + r0.xy;
r0.xy = r0.xy * g_ViewportScaleOffset.xy + g_ViewportScaleOffset.zw;
r0.zw = g_ReverseProjectionParams.xy * r0.zw;
g_TextureDepthDX11_MSAA.GetDimensions(r1.x, r1.y, bitmask.x);
r1.xy = r1.xy;
r1.xy = r1.xy * r0.xy;
r1.xy = (int2)r1.xy;
r1.zw = float2(0.000000e+000,0.000000e+000);
r1.x = g_TextureDepthDX11_MSAA.Load(r1.xyz,0.000000000e+000).x;
r1.x = g_ReverseProjectionParams.z + r1.x;
r1.z = g_ReverseProjectionParams.w / r1.x;
r1.xy = r1.zz * r0.zw;
r1.w = 1.000000000e+000;
r2.x = dot(r1.xyzw, g_ViewToWorld._m00_m10_m20_m30);
r2.y = dot(r1.xyzw, g_ViewToWorld._m01_m11_m21_m31);
r2.z = dot(r1.xyzw, g_ViewToWorld._m02_m12_m22_m32);
which needs correcting to:
r0.xy = v1.xy / v1.ww;
r0.zw = g_ReverseProjectionParams2.xy + r0.xy;
r0.xy = r0.xy * g_ViewportScaleOffset.xy + g_ViewportScaleOffset.zw;
r0.zw = g_ReverseProjectionParams.xy * r0.zw;
g_TextureDepthDX11_MSAA.GetDimensions(r1.x, r1.y, bitmask.x);
r1.xy = r1.xy;
r1.xy = r1.xy * r0.xy;
r1.xy = (int2)r1.xy;
r1.zw = float2(0.000000e+000,0.000000e+000);
r1.x = g_TextureDepthDX11_MSAA.Load(r1.xyz,0.000000000e+000).x;
r1.x = g_ReverseProjectionParams.z + r1.x;
r1.z = g_ReverseProjectionParams.w / r1.x;
r1.xy = r1.zz * r0.zw;
r1.w = 1.000000000e+000;
//Stereo Shift
float4 stereoParams = StereoParams.Load(0);
r1.x += stereoParams.x * (-r1.z - stereoParams.y) * g_ReverseProjectionParams.x;
r2.x = dot(r1.xyzw, g_ViewToWorld._m00_m10_m20_m30);
r2.y = dot(r1.xyzw, g_ViewToWorld._m01_m11_m21_m31);
r2.z = dot(r1.xyzw, g_ViewToWorld._m02_m12_m22_m32);
There are of course lots of other PS for different things (water caustics, some lighting etc), and the VS for HUD and stuff are all identified in the AC4 VS file headers.
Hope this helps.
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
All hail 3d modders DHR, MasterOtaku, Losti, Necropants, Helifax, bo3b, mike_ar69, Flugan, DarkStarSword, 4everAwake, 3d4dd and so many more helping to keep the 3d dream alive, find their 3d fixes at http://helixmod.blogspot.com/ Also check my site for spanish VR and mobile gaming news: www.gamermovil.com
Thank You for Your hints! But as I'm a noob regarding shaders I'm already stuck. I've downloaded the release build 0.58-alpha and used it on ACL. Unfortunately cycling through the shaders doesn't work with ACL. I've tried the same build and the same d3dx.ini with AC3 and it worked there (shaders flickering and marked) but not with ACL. So can't isolate the shaders for the broken shadows. I've dumped all the shaders (export_shaders=1, export_hlsl=1). Now I've got hundreds PS and want to find those that have to be corrected. What do I have to look for exactly when I want to find "code like this at the top of the shader"? I couldn't find the same code You have posted above... Are there certain keywords or lines I can use for a search?
My original display name is 3d4dd - for some reason Nvidia changed it..?!
Do this instead:
1) download the very latest version, 0.62 for AC4, even though we know the shaders will be wrong.
2) Make sure your Liberations exe folder is clean of migoto-ness, use the uninstall.bat and also delete the 3 shader folders.
3) Extract only the DLLs from the 0.62, skip the ShaderFixes folder. This will give you the best code we've got.
4) Edit the newly extracted d3dx.ini file, and change calls=1, hunting=1, export_hlsl=1, cache_shaders=0. That puts it into 'hunting' mode, and creates a dump of all shaders in ShaderCache.
That should give you viable dumped shaders. Their numbers/CRCs (the 029d8ae3f8a stuff in front of ps.txt) will be different than AC4, but the contents should be very similar.
When running the game, find a target pixel shader. Start with a screen depth shadow because it will match Mike's fix above. (Shadows cannot be set to Soft-Shadows) Cycle through with Num 1,2. When you find one, mark it with Num 3. Quit the game, and find the CRC number for the shader in question. Look for 'marked'.
Find that CRC in the ShaderCache folder, and open the txt file with any editor.
Look for the patterns Mike talked about above, and try to edit the file to match. This part will be a little hard, but you can do it, it's basically pattern matching.
When next you run the game, same spot, the new shader should load, and fix the flaw.
Please let us know what you see and if you get stuck. Both Mike and I are super, super happy to help other people do their own fixes and learn how it works, and we will walk you through any problems you see.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
I know that the latest beta driver would let me disable the 3Dcompatibility mode, but I don't want to install it because of the large amount of serious issues people have been having with it.
I guess my only other option would be to roll back my driver to pre-3Dcompatilibty mode, right?
What issues? I've not seen anything.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
I did some tests on AC Liberation today. Good news: with the AC4 dll files shader hunting works now in ACL!
BTW the hotkey settings for a German keyboards must be:
Input=Tastatur
and "Num 1" is "1 (ZEHNERTASTATUR)" etc.
Bad news: the PS I have marked have nothing in common with the code mike_ar69 posted above. Just to be completely sure: I press Num 2 until the shadows start flickering. Then I press Num 3 for marking the shader. And so on until I have cycled through all shaders. In d3d11_log.txt I search for "marked" and when I find
"Pixel shader marked: pixel shader hash = 2ee193264b7bee72" I will check 2ee193264b7bee72-ps_replace.txt in the folder ShaderCache, and so on for the other marked entries. The entries with "visited index buffer hash = ..." are not relevant, are they?
As mentioned before the marked shader are (to me) very different from the code for fixing shadows :( I've uploaded them here: http://www.file-upload.net/download-8902994/marked-shaders.zip.html
Then I've tried to find the code patterns in all of the PS in ShaderCache. I couldn't find exactly the same code. Now my problem is that I'm a noob regarding shader code so I don't know what are the keywords or phrases I have to search for to find the pattern. I've uploaded the PS in the cache here: http://www.file-upload.net/download-8903067/PS-in-the-cache.zip.html I really don't exspect You to look at them Yourself!!! Only if You have nothing more important to do ;) But maybe You have another hint for me...?
Your AC4 fix works great for me. The only issues I have noticed are the stars that are to close.
My original display name is 3d4dd - for some reason Nvidia changed it..?!
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278