3Dmigoto now open-source...
  113 / 143    
[quote]With the first example you show, would it be like this, with no need for anything else?:[/quote]Yes, that's right - though again, whether that will work or not depends on the bind flags the game used to create the depth buffer, so if it doesn't work or causes some weird glitches, or you get some weird bug reports (no idea if there is any GPU/Driver/OS specific quirks with the bind flags, but I have observed that sometimes things still seem to still kind of work when they are wrong) switch to the second method, which is safer. [quote]Then how do I go about loading that inside the HUD vertex shader and the mouse vertex shader? It has been a long time since I tried something like that and I lost the files. I may have ideas about how to load it, but it's faster if I ask :p. [/quote]Tutorial is here - this replaces step 1: https://github.com/bo3b/3Dmigoto/wiki/Auto-Crosshair (Hmm, I should update that - I have a superior option to step 5 nowadays if you have access to the projection matrix, and I should probably add a list of existing variants of the crosshair shader for different engines)
With the first example you show, would it be like this, with no need for anything else?:
Yes, that's right - though again, whether that will work or not depends on the bind flags the game used to create the depth buffer, so if it doesn't work or causes some weird glitches, or you get some weird bug reports (no idea if there is any GPU/Driver/OS specific quirks with the bind flags, but I have observed that sometimes things still seem to still kind of work when they are wrong) switch to the second method, which is safer.

Then how do I go about loading that inside the HUD vertex shader and the mouse vertex shader? It has been a long time since I tried something like that and I lost the files. I may have ideas about how to load it, but it's faster if I ask :p.
Tutorial is here - this replaces step 1: https://github.com/bo3b/3Dmigoto/wiki/Auto-Crosshair

(Hmm, I should update that - I have a superior option to step 5 nowadays if you have access to the projection matrix, and I should probably add a list of existing variants of the crosshair shader for different engines)

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 10/30/2017 08:51 AM   
Thanks again. I had forgotten where that page was and I sometimes was looking for it.
Thanks again. I had forgotten where that page was and I sometimes was looking for it.

CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: MSI GeForce RTX 2080Ti Gaming X Trio
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com

Posted 10/30/2017 08:54 AM   
Thanks DSS for the update!! i will test the presets with SBS custom shader. i will test the new approach for automatic crosshair in others UE4 games...problably will work also. Thanks!!
Thanks DSS for the update!!
i will test the presets with SBS custom shader.

i will test the new approach for automatic crosshair in others UE4 games...problably will work also. Thanks!!

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

Like my fixes? you can donate to Paypal: dhr.donation@gmail.com

Posted 10/30/2017 01:37 PM   
Preset with SBS custom shader fixed! Thanks DSS!! @DSS, I have another question related to ShaderRegex, how can i insert a fixing code in between a search pattern?? Or i need to skip the ${0} in the replace part and create all the code again including the fixing line? [u]Pattern:[/u] Line1 --> here i need to grab r4.w Line2 --> Matrix Multiplication Line3 --> Matrix Multiplication and grab r0.x Line4 --> Matrix Multiplication Line5 --> Matrix Multiplication [u]Replace.pattern:[/u] Line1 -------FIXING CODE that use r0.x and r4.w -------- Line2 Line3 Line4 Line5 Thanks!!
Preset with SBS custom shader fixed! Thanks DSS!!

@DSS, I have another question related to ShaderRegex, how can i insert a fixing code in between a search pattern??
Or i need to skip the ${0} in the replace part and create all the code again including the fixing line?

Pattern:
Line1 --> here i need to grab r4.w
Line2 --> Matrix Multiplication
Line3 --> Matrix Multiplication and grab r0.x
Line4 --> Matrix Multiplication
Line5 --> Matrix Multiplication

Replace.pattern:
Line1
-------FIXING CODE that use r0.x and r4.w --------
Line2
Line3
Line4
Line5

Thanks!!

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

Like my fixes? you can donate to Paypal: dhr.donation@gmail.com

Posted 10/30/2017 03:00 PM   
Just use multiple capture groups to grab the chunks you need to insert between, like [code] (?P<line1> ... line1 pattern including (?P<reg1>\d+\.[xyzw]{4}) ...\n ) (?P<matrix_multiply> ... line2 pattern ...\n ... line3 pattern including (?P<reg2>\d+\.[xyzw]{4}) ...\n ... line4 pattern ...\n ... line5 pattern ...\n ) [/code] Then in the replace section you can specify where the capture groups go and insert your code between them: [code] ${line1} ... fixing code using ${reg1} and ${reg2} ...\n ${matrix_multiply} [/code] This is pretty close to what I did in the second example in the release notes
Just use multiple capture groups to grab the chunks you need to insert between, like

(?P<line1>
... line1 pattern including (?P<reg1>\d+\.[xyzw]{4}) ...\n
)
(?P<matrix_multiply>
... line2 pattern ...\n
... line3 pattern including (?P<reg2>\d+\.[xyzw]{4}) ...\n
... line4 pattern ...\n
... line5 pattern ...\n
)

Then in the replace section you can specify where the capture groups go and insert your code between them:

${line1}

... fixing code using ${reg1} and ${reg2} ...\n

${matrix_multiply}

This is pretty close to what I did in the second example in the release notes

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 10/30/2017 03:54 PM   
Thanks DSS!! I was not sure if you separate the pattern in 2, will be matching ?P<line1> AND ?P<matrix_multiply Because if is "OR" the ?P<line1> will be matching others shaders i don't need changing. will test today!
Thanks DSS!!
I was not sure if you separate the pattern in 2, will be matching ?P<line1> AND ?P<matrix_multiply
Because if is "OR" the ?P<line1> will be matching others shaders i don't need changing.

will test today!

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

Like my fixes? you can donate to Paypal: dhr.donation@gmail.com

Posted 10/30/2017 05:21 PM   
Hi guys, I know 3DMigoto has the ability to export shaders, both HLSL and ASM "as sent to the game". However, I was wondering is there a way to export the shaders that are "used" in a scene? The overlay knows which shaders are "active". I was wondering if there is a way, I could only dump those;) Any idea? Many thanks!
Hi guys,

I know 3DMigoto has the ability to export shaders, both HLSL and ASM "as sent to the game".

However, I was wondering is there a way to export the shaders that are "used" in a scene? The overlay knows which shaders are "active". I was wondering if there is a way, I could only dump those;)

Any idea?

Many thanks!

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 11/02/2017 12:51 AM   
@Helifax...i think that configuration don't exist...because when you start a game, some common shaders are exported and then the game start to export more shaders when load more scenes, so you always will have more shaders dumped. This will be possible with pressing a Key and dump in another folder. BUT, you can do a FrameAnalysis (default FA settings from the ini) and see the hashes in the log and search in the ShaderCache. FrameAnalysis catch the ones and only in the scene. hope this help!!!
@Helifax...i think that configuration don't exist...because when you start a game, some common shaders are exported and then the game start to export more shaders when load more scenes, so you always will have more shaders dumped. This will be possible with pressing a Key and dump in another folder.

BUT, you can do a FrameAnalysis (default FA settings from the ini) and see the hashes in the log and search in the ShaderCache. FrameAnalysis catch the ones and only in the scene. hope this help!!!

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

Like my fixes? you can donate to Paypal: dhr.donation@gmail.com

Posted 11/02/2017 11:19 AM   
[quote="DHR"]@Helifax...i think that configuration don't exist...because when you start a game, some common shaders are exported and then the game start to export more shaders when load more scenes, so you always will have more shaders dumped. This will be possible with pressing a Key and dump in another folder. BUT, you can do a FrameAnalysis (default FA settings from the ini) and see the hashes in the log and search in the ShaderCache. FrameAnalysis catch the ones and only in the scene. hope this help!!![/quote] Thx DHR. I was afraid that is the case. However, manually finding 200 Compute shaders just by checking the hash takes a very long time:(
DHR said:@Helifax...i think that configuration don't exist...because when you start a game, some common shaders are exported and then the game start to export more shaders when load more scenes, so you always will have more shaders dumped. This will be possible with pressing a Key and dump in another folder.

BUT, you can do a FrameAnalysis (default FA settings from the ini) and see the hashes in the log and search in the ShaderCache. FrameAnalysis catch the ones and only in the scene. hope this help!!!


Thx DHR.
I was afraid that is the case. However, manually finding 200 Compute shaders just by checking the hash takes a very long time:(

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 11/02/2017 01:23 PM   
[quote="Helifax"]I was wondering is there a way to export the shaders that are "used" in a scene? The overlay knows which shaders are "active". I was wondering if there is a way, I could only dump those;)[/quote] To do this before I've created simple macros to dump the current shader and then skip to next, and then set that to repeat for the # of shaders in the scene (or set to repeat until turned off in some cases). If necessary, I remove all the current shaders in the ShaderFixes folder to avoid confusion before running the macro. I then make myself a nice, tasty sandwich. :)
Helifax said:I was wondering is there a way to export the shaders that are "used" in a scene? The overlay knows which shaders are "active". I was wondering if there is a way, I could only dump those;)


To do this before I've created simple macros to dump the current shader and then skip to next, and then set that to repeat for the # of shaders in the scene (or set to repeat until turned off in some cases). If necessary, I remove all the current shaders in the ShaderFixes folder to avoid confusion before running the macro. I then make myself a nice, tasty sandwich. :)

3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot

Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king

Posted 11/02/2017 02:02 PM   
@helifax....if is for ME:A...ShaderRegex Engine will probably help there, because will search for the pattern and automatic replace for all the shaders in the scene or that are loaded in the scene that match that pattern......sometimes there are shader difficult to catch, specially CS where "pink" mode don't work. I can make a ShaderRegex for the pattern for Frostbite3 engine, if i remember well the pattern is the same for CS (than PS)....i will need to test first with a game...like Mirror Edge Catalyst and see how is working with those CS enabled....if is ok with you, you can send me via PM how do you make those CS Lights works (render stereo), so i can test the ShaderRegex over that.
@helifax....if is for ME:A...ShaderRegex Engine will probably help there, because will search for the pattern and automatic replace for all the shaders in the scene or that are loaded in the scene that match that pattern......sometimes there are shader difficult to catch, specially CS where "pink" mode don't work.

I can make a ShaderRegex for the pattern for Frostbite3 engine, if i remember well the pattern is the same for CS (than PS)....i will need to test first with a game...like Mirror Edge Catalyst and see how is working with those CS enabled....if is ok with you, you can send me via PM how do you make those CS Lights works (render stereo), so i can test the ShaderRegex over that.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

Like my fixes? you can donate to Paypal: dhr.donation@gmail.com

Posted 11/02/2017 02:46 PM   
[quote="DHR"]@helifax....if is for ME:A...ShaderRegex Engine will probably help there, because will search for the pattern and automatic replace for all the shaders in the scene or that are loaded in the scene that match that pattern......sometimes there are shader difficult to catch, specially CS where "pink" mode don't work. I can make a ShaderRegex for the pattern for Frostbite3 engine, if i remember well the pattern is the same for CS (than PS)....i will need to test first with a game...like Mirror Edge Catalyst and see how is working with those CS enabled....if is ok with you, you can send me via PM how do you make those CS Lights works (render stereo), so i can test the ShaderRegex over that.[/quote] I will definitely tell you once I figure it out myself;)) So far I managed to fix some of them work, meaning the tiles around the character and the cinematics section of the game. The rest are still broken:( and I can't seem to find a way to fix it:( The reason is simple: I find 3 Compute Shaders ALL affecting the SAME tiles :( I expect all 3 needs fixing, but where and how.... :( I'll try to play and "hack" a bit more around and see what I can get, before I call it a "quit" ;)) But don't worry! I will tell everyone what I found out during my "forensic" analysis ;))
DHR said:@helifax....if is for ME:A...ShaderRegex Engine will probably help there, because will search for the pattern and automatic replace for all the shaders in the scene or that are loaded in the scene that match that pattern......sometimes there are shader difficult to catch, specially CS where "pink" mode don't work.

I can make a ShaderRegex for the pattern for Frostbite3 engine, if i remember well the pattern is the same for CS (than PS)....i will need to test first with a game...like Mirror Edge Catalyst and see how is working with those CS enabled....if is ok with you, you can send me via PM how do you make those CS Lights works (render stereo), so i can test the ShaderRegex over that.


I will definitely tell you once I figure it out myself;))
So far I managed to fix some of them work, meaning the tiles around the character and the cinematics section of the game.
The rest are still broken:( and I can't seem to find a way to fix it:( The reason is simple: I find 3 Compute Shaders ALL affecting the SAME tiles :( I expect all 3 needs fixing, but where and how.... :(

I'll try to play and "hack" a bit more around and see what I can get, before I call it a "quit" ;))
But don't worry! I will tell everyone what I found out during my "forensic" analysis ;))

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 11/02/2017 10:33 PM   
@Helifax In order to make your "forensic" analysis easier...i made a ShaderRegex for the Shadows, Lights and Reflections in any Frostbite3 engine. This need to be used with 3Dmigoto 1.2.67+ I tested in Mirror Edge Catalyst, disabling CS Lights with the user.cfg and all works OK. [b]THIS WILL WORK IN ANY FROSTBITE3 ENGINE GAME[/b], with the follow considerations: [u]This will fix On the fly[/u] - PS Shadows - PS Lights - PS Reflections This pattern will also take CS Lights, but in order to fix those CS you need the proper tweak or profile. This is the forensic part that i hope you can sort out :) [u]This will NOT fix[/u] - HUD/UI - Skybox/Sun/Moon When you cycle the shaders (PS or CS), when you see in the green 3Dmigoto overlay PS: or CS: [ShaderRegexObjectsShadowsLightsReflections1] --> that shader is fixed on the fly. Copy-Paste in the ShaderRegex part on the d3dx.ini: [code];****************************************************************************************************************************************** ;FROSTBITE3: SHADOWS, LIGHTS AND REFLECTIONS 1 ;ShaderRegex made by DHR [ShaderRegexObjectsShadowsLightsReflections1] shader_model = ps_4_0 ps_5_0 cs_4_0 cs_5_0 temps = stereo tmp1 tmp2 [ShaderRegexObjectsShadowsLightsReflections1.Pattern] dp4 (?P<pos3>r\d+)\.x, (?P<pos1>r\d+)\.xyzw, cb0\[[012]\]\.xyzw\n \s*dp4 (?P=pos3)\.y, (?P=pos1)\.xyzw, cb0\[[123]\]\.xyzw\n \s*dp4 (?P=pos3)\.z, (?P=pos1)\.xyzw, cb0\[[234]\]\.xyzw\n \s*dp4 (?P<pos2>r\d+)\.(?P<swizzle>[xyzw]), (?P=pos1)\.xyzw, cb0\[(?P<number>[345])\]\.xyzw\n \s*div (?P=pos2)\.(?P=swizzle), l\(1\.000000, 1\.000000, 1\.000000, 1\.000000\), (?P=pos2)\.(?P=swizzle)\n [ShaderRegexObjectsShadowsLightsReflections1.Pattern.Replace] \n // Frostbite3 Pattern Fix for Shadows, Lights and Reflections 1:\n ld_indexable(texture2d)(float,float,float,float) ${stereo}.xyzw, l(0, 0, 0, 0), t125.xyzw\n dp4 ${tmp2}.${swizzle}, ${pos1}.xyzw, cb0[${number}].xyzw\n mul ${tmp1}.x ${stereo}.y, ${tmp2}.${swizzle}\n add ${tmp1}.x, ${tmp1}.x, l(-1.0)\n mul ${tmp1}.x, ${stereo}.x, ${tmp1}.x\n add ${pos1}.x, ${pos1}.x, ${tmp1}.x\n \n ${0} [ShaderRegexObjectsShadowsLightsReflections1.InsertDeclarations] dcl_resource_texture2d (float,float,float,float) t125[/code] *EDIT: remove all the PS and CS related to shadows, lights and reflections you already have in the ShaderFixes folder. Backup those shaders.
@Helifax
In order to make your "forensic" analysis easier...i made a ShaderRegex for the Shadows, Lights and Reflections in any Frostbite3 engine. This need to be used with 3Dmigoto 1.2.67+

I tested in Mirror Edge Catalyst, disabling CS Lights with the user.cfg and all works OK.
THIS WILL WORK IN ANY FROSTBITE3 ENGINE GAME, with the follow considerations:

This will fix On the fly
- PS Shadows
- PS Lights
- PS Reflections

This pattern will also take CS Lights, but in order to fix those CS you need the proper tweak or profile. This is the forensic part that i hope you can sort out :)

This will NOT fix
- HUD/UI
- Skybox/Sun/Moon


When you cycle the shaders (PS or CS), when you see in the green 3Dmigoto overlay PS: or CS:
[ShaderRegexObjectsShadowsLightsReflections1] --> that shader is fixed on the fly.


Copy-Paste in the ShaderRegex part on the d3dx.ini:

;******************************************************************************************************************************************
;FROSTBITE3: SHADOWS, LIGHTS AND REFLECTIONS 1
;ShaderRegex made by DHR
[ShaderRegexObjectsShadowsLightsReflections1]
shader_model = ps_4_0 ps_5_0 cs_4_0 cs_5_0
temps = stereo tmp1 tmp2

[ShaderRegexObjectsShadowsLightsReflections1.Pattern]
dp4 (?P<pos3>r\d+)\.x, (?P<pos1>r\d+)\.xyzw, cb0\[[012]\]\.xyzw\n
\s*dp4 (?P=pos3)\.y, (?P=pos1)\.xyzw, cb0\[[123]\]\.xyzw\n
\s*dp4 (?P=pos3)\.z, (?P=pos1)\.xyzw, cb0\[[234]\]\.xyzw\n
\s*dp4 (?P<pos2>r\d+)\.(?P<swizzle>[xyzw]), (?P=pos1)\.xyzw, cb0\[(?P<number>[345])\]\.xyzw\n
\s*div (?P=pos2)\.(?P=swizzle), l\(1\.000000, 1\.000000, 1\.000000, 1\.000000\), (?P=pos2)\.(?P=swizzle)\n

[ShaderRegexObjectsShadowsLightsReflections1.Pattern.Replace]
\n
// Frostbite3 Pattern Fix for Shadows, Lights and Reflections 1:\n
ld_indexable(texture2d)(float,float,float,float) ${stereo}.xyzw, l(0, 0, 0, 0), t125.xyzw\n
dp4 ${tmp2}.${swizzle}, ${pos1}.xyzw, cb0[${number}].xyzw\n
mul ${tmp1}.x ${stereo}.y, ${tmp2}.${swizzle}\n
add ${tmp1}.x, ${tmp1}.x, l(-1.0)\n
mul ${tmp1}.x, ${stereo}.x, ${tmp1}.x\n
add ${pos1}.x, ${pos1}.x, ${tmp1}.x\n
\n
${0}

[ShaderRegexObjectsShadowsLightsReflections1.InsertDeclarations]
dcl_resource_texture2d (float,float,float,float) t125



*EDIT: remove all the PS and CS related to shadows, lights and reflections you already have in the ShaderFixes folder. Backup those shaders.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

Like my fixes? you can donate to Paypal: dhr.donation@gmail.com

Posted 11/02/2017 11:15 PM   
Thx DHR. I've already been using the Regex method in this game before 1.2.66 or 1.2.67 was released :) Thanks for posting it here! Maybe others can apply it to other FB3 games as well:) However, this doesn't help with the damn Compute Tile crap this game uses:(( So far I've found 6 CS that all affect the same tiles. It looks like all of them "Compute" those tiles:( And the problems don't stop here... I'll make a write-up on my Frostbite3 experience in another thread:) It's quite interesting and helps others understand what it takes when you want to tackle a FB3 game;)
Thx DHR.

I've already been using the Regex method in this game before 1.2.66 or 1.2.67 was released :)
Thanks for posting it here! Maybe others can apply it to other FB3 games as well:)

However, this doesn't help with the damn Compute Tile crap this game uses:(( So far I've found 6 CS that all affect the same tiles. It looks like all of them "Compute" those tiles:( And the problems don't stop here...

I'll make a write-up on my Frostbite3 experience in another thread:) It's quite interesting and helps others understand what it takes when you want to tackle a FB3 game;)

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 11/04/2017 06:11 PM   
Need help to fix a shader, I'm trying to make an on/off HUD toggle for AC Origins but it's not working. Here's the error message: [i]C:\Program Files (x86)\Assassin's Creed Origins\ShaderFixes\000ea4ff144f3d6d-ps_replace.txt(244,37): error X3000: syntax error: unexpected token '.'[/i] And here's the shader in question: [code]// ---- Created with 3Dmigoto v1.2.63 on Tue Nov 07 21:23:54 2017 cbuffer PassParams_cbuffer : register(b1) { struct { float4 eyePosition; float4 eyePositionPrevFrame; float4 eyeDirection; float4 eyeDirectionPrevFrame; float4x4 viewToWorld; float4x4 viewToWorldPrevFrame; float4x4 worldToView; float4x4 worldToViewPrevFrame; float4x4 projMatrix; float4x4 viewProj; float4x4 viewNoTranslationProj; float4x4 viewProjPrevFrame; float4x4 viewNoTranslationProjPrevFrame; float4 viewTranslation; float4 viewTranslationPrevFrame; float4 vPosToUV; float4 viewportScaleOffset; float4 zFrontBackValue; float4 clipPlane; float4 frustumPlanes[4]; float4 globalLightingScale; float4 viewSpaceLightingBackWS; float4 projectorPosition; float4 prevProjectorPosition; float4 pixelPatchingParams; float gradientAdjustMipBias; float thinGeomAAPixelScale; uint layerIndex; uint globalCubeMapIndex; uint dynamicGBufferCubeMapIndex; uint alphaDitherEnabled; uint TAADitherEnabled; float CameraTAAFadeStartDist; struct { } materialTable; struct { float4x4 ClipXYZToViewPos; float4x4 ClipXYZToWorldPos; float4 ClipZToViewZ; } RevProjParams; struct { } refraction; struct { } deferredcommon; struct { } motionVector; struct { float4 XYScaleBias; float4 ForwardMappingParams; float2 ZProject; float4 BackwardMappingParams; float CloudShadowGIDensity; } combinedCloudShadow; struct { } AmbientLighting; struct { float4 volumeInvTransZ; float4 volumeTexScale; float4 volumeTexBias; float4 sunColor; float4 sunColorByOneOverPi; } fog; struct { float3 InvDepthParams; } underwater; struct { float4 VposToClusterXY; float4 ClipPosToClusterXY; float4 ClusterTransZ; uint HighClusterW; uint HighClusterWH; } clusteredLightsEvaluate; struct { } waterStamperTextures; struct { float3 maxCC; } waterCustomMeshParams; struct { } videoAndScreenshot; struct { } rainRipples; struct { } cookieShadows; struct { } nearShadows; struct { float FarShadowBlendRatio; } farShadows; struct { } commonShadows; struct { float2 WorldToUVOffset; float2 WorldToUVScale; float2 ReferenceWorldXY; float FadeStart; float Radius; } grassForce; } PassParams_constants : packoffset(c0); } cbuffer InstanceParams_cbuffer : register(b3) { struct { float4x4 world; float4x4 worldPrevFrame; float4x4 worldViewProj; float4x4 worldViewProjPrevFrame; float4 dissolveFactor; float LODBlendFactor; float wetnessBias; float alphaTestValue; uint materialTableIndex; uint instanceOffset; uint CameraTAADither; struct { struct { int4 offsets; } instanceBatchSetupConsts; } instancing; } InstanceParams_constants : packoffset(c0); } cbuffer MaterialParams_cbuffer : register(b2) { struct { struct { float4 blendXYAlphaTestTwoSided; } defaults; float4 VertexQuadMin_6; float4 VertexScale_89; float4 VertexOffset_92; float4 VertexQuadMax_16; float4 AlphaClampFallof_2; float4 UseVertexAlpha_4; float4 UseScreenAlpha_5; float4 UseLayer1AlphaGrayScale_7; float4 AlphaClampMin_9; float4 AlphaClampIsLayer01Alpha_10; float4 UseLayer1Alpha_11; float4 Layer0DiffuseUVIsClamp_13; float4 Layer0DiffuseIsBC4_14; float4 Layer1AlphaIsBC4_15; float4 Layer1AlphaUVIsClamp_17; float4 Layer0DiffuseIs9SS_18; float4 OcclusionAlpha_20; float4 OcclusionAlphaStepValue_21; float4 Layer0DiffuseIsScreenSpace_22; float4 Layer0DiffuseIsInvert_23; float4 Layer0ColorIsAdd_24; float4 ScreenAlphaTop_25; float4 ScreenAlphaFallout_26; float4 ScreenAlphaBottom_27; float4 AlphaBoost_28; float4 Mipmap_30; float3x3 Layer0DiffuseUV_8_matrix; float3x3 Layer1AlphaUV_12_matrix; } MaterialParams_constants : packoffset(c0); } SamplerState FrameParams_defaultSamplers_pointClamp_s : register(s0); SamplerState FrameParams_defaultSamplers_standardSampler_s : register(s4); Texture2D<float4> PassParams_lastExposureTexture : register(t20); Texture2D<float4> PassParams_deferredcommon_DepthSurface : register(t28); Texture2D<float4> MaterialParams_srv.Layer0Diffuse_0 : register(t70); Texture2D<float4> MaterialParams_srv.Layer1Alpha_1 : register(t71); Buffer<float4> InstanceParams_instancing_instanceData : register(t81); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_Position0, linear sample float4 v1 : TEXCOORD0, linear sample float4 v2 : COLOR0, float4 v3 : TEXCOORD1, float4 v4 : TEXCOORD2, float4 v5 : TEXCOORD3, float4 v6 : TEXCOORD4, nointerpolation uint v7 : InstanceID0, uint v8 : SV_IsFrontFace0, out float4 o0 : SV_Target0) { float4 r0,r1,r2,r3,r4; uint4 bitmask, uiDest; float4 fDest; r0.x = cmp(0 != MaterialParams_constants.Layer1AlphaUVIsClamp_17.x); r1.xy = v1.xy; r1.z = 1; r2.x = dot(r1.xyz, MaterialParams_constants.Layer1AlphaUV_12_matrix._m00_m10_m20); r2.y = dot(r1.xyz, MaterialParams_constants.Layer1AlphaUV_12_matrix._m01_m11_m21); r0.yz = saturate(r2.xy); r0.xy = r0.xx ? r0.yz : r2.xy; r0.z = -2.5 + PassParams_constants.gradientAdjustMipBias; r0.xyz = MaterialParams_srv.Layer1Alpha_1.SampleBias(FrameParams_defaultSamplers_standardSampler_s, r0.xy, r0.z).xyw; r0.w = cmp(0 != MaterialParams_constants.Layer1AlphaIsBC4_15.x); r0.xy = r0.ww ? r0.xx : r0.yz; r0.x = r0.x + -r0.y; r0.x = MaterialParams_constants.UseLayer1AlphaGrayScale_7.x * r0.x + r0.y; r0.yz = abs(MaterialParams_constants.VertexQuadMax_16.xz) + abs(MaterialParams_constants.VertexQuadMin_6.xz); r0.yz = float2(3.39498758,3.39498758) * r0.yz; r1.xy = float2(0.25,0.25) / r0.yz; r1.zw = float2(1,1) + -r1.xy; r2.xy = r1.zw + -r1.xy; r2.zw = v0.xy * PassParams_constants.vPosToUV.xy + -v1.xy; r3.xy = MaterialParams_constants.Layer0DiffuseIsScreenSpace_22.xx * r2.zw + v1.xy; r3.z = 1; r4.x = dot(r3.xyz, MaterialParams_constants.Layer0DiffuseUV_8_matrix._m00_m10_m20); r4.y = dot(r3.xyz, MaterialParams_constants.Layer0DiffuseUV_8_matrix._m01_m11_m21); r2.zw = r4.xy + -r1.xy; r1.xy = cmp(r4.xy < r1.xy); r2.xy = r2.zw / r2.xy; r2.xy = r2.xy * float2(0.5,0.5) + float2(0.25,0.25); r2.zw = float2(1,1) + -r4.xy; r2.zw = -r2.zw * r0.yz + float2(1,1); r0.yz = r4.xy * r0.yz; r1.zw = cmp(r1.zw < r4.xy); r1.zw = r1.zw ? r2.zw : r2.xy; r0.yz = r1.xy ? r0.yz : r1.zw; r0.w = cmp(0 < MaterialParams_constants.Layer0DiffuseIs9SS_18.x); r0.yz = r0.ww ? r0.yz : r4.xy; r1.xy = saturate(r0.yz); r0.w = cmp(0 != MaterialParams_constants.Layer0DiffuseUVIsClamp_13.x); r0.yz = r0.ww ? r1.xy : r0.yz; r0.w = MaterialParams_constants.Mipmap_30.x + PassParams_constants.gradientAdjustMipBias; r0.w = -2.5 + r0.w; r1.xyzw = MaterialParams_srv.Layer0Diffuse_0.SampleBias(FrameParams_defaultSamplers_standardSampler_s, r0.yz, r0.w).yzwx; r0.y = cmp(0 != MaterialParams_constants.Layer0DiffuseIsBC4_14.x); r1.xyz = r0.yyy ? r1.www : r1.xyz; r0.y = -r1.z + r0.x; r0.y = MaterialParams_constants.UseLayer1Alpha_11.x * r0.y + r1.z; r0.x = r0.x + -r0.y; r0.x = saturate(MaterialParams_constants.AlphaClampIsLayer01Alpha_10.x * r0.x + r0.y); r0.z = 1 + -r0.x; r0.w = 1 + -MaterialParams_constants.AlphaClampMin_9.x; r0.z = r0.z + -r0.w; r0.w = cmp(0 != MaterialParams_constants.AlphaClampFallof_2.x); r0.w = r0.w ? MaterialParams_constants.AlphaClampFallof_2.x : 9.99999997e-007; r2.x = (uint)v7.x << 3; r2.x = (uint)r2.x >> 2; r2.x = (int)r2.x + (int)InstanceParams_constants.instancing.instanceBatchSetupConsts.offsets.y; r2.x = InstanceParams_instancing_instanceData.Load(r2.x).y; r2.x = (int)r2.x + 3; r2.xyz = InstanceParams_instancing_instanceData.Load(r2.x).xzw; r2.xzw = (int3)r2.yzx & int3(255,255,0); r3.xyz = (uint3)r2.yyy >> int3(24,16,8); r3.xyz = (int3)r3.xyz & int3(255,255,255); r3.xyz = (uint3)r3.xyz; r2.y = f16tof32(r2.w); r2.xz = (uint2)r2.xz; r0.x = -r2.y + r0.x; r0.xz = saturate(r0.xz / r0.ww); r0.x = max(r0.x, r0.z); r0.x = 1 + -r0.x; r0.z = -1 + v2.w; r0.z = MaterialParams_constants.UseVertexAlpha_4.x * r0.z + 1; r0.y = r0.y * r0.z; r0.x = r0.x * r0.y; r0.x = r0.x * r1.z; r0.yz = PassParams_constants.vPosToUV.xy * v0.xy; r0.y = PassParams_deferredcommon_DepthSurface.SampleLevel(FrameParams_defaultSamplers_pointClamp_s, r0.yz, 0).x; r0.yz = r0.yy * PassParams_constants.RevProjParams.ClipZToViewZ.wz + PassParams_constants.RevProjParams.ClipZToViewZ.yx; r0.y = r0.y / r0.z; r0.y = -v0.w + r0.y; r0.y = cmp(r0.y >= MaterialParams_constants.OcclusionAlphaStepValue_21.x); r0.z = r0.y ? 1.000000 : 0; r0.y = r0.y ? 0 : MaterialParams_constants.OcclusionAlpha_20.x; r0.y = r0.z + r0.y; r0.x = r0.x * r0.y; r0.y = v0.y * PassParams_constants.vPosToUV.y + -MaterialParams_constants.ScreenAlphaBottom_27.x; r0.z = cmp(0 != MaterialParams_constants.ScreenAlphaFallout_26.x); r0.z = r0.z ? MaterialParams_constants.ScreenAlphaFallout_26.x : 9.99999997e-007; r0.y = saturate(r0.y / r0.z); r0.y = 1 + -r0.y; r0.w = v0.y * PassParams_constants.vPosToUV.y + -MaterialParams_constants.ScreenAlphaTop_25.x; r0.z = saturate(r0.w / r0.z); r0.y = min(r0.z, r0.y); r0.y = -1 + r0.y; r0.y = MaterialParams_constants.UseScreenAlpha_5.x * r0.y + 1; r0.x = min(r0.x, r0.y); r0.y = 0.00392156886 * r2.x; r0.y = r2.z * r0.y; r0.y = MaterialParams_constants.AlphaBoost_28.x * r0.y; r0.y = 0.00392156886 * r0.y; r0.x = r0.y * r0.x; r2.xyz = float3(1,1,1) + -r1.wxy; r0.y = cmp(0 != MaterialParams_constants.Layer0DiffuseIsInvert_23.x); r0.yzw = r0.yyy ? r2.xyz : r1.wxy; r1.xyz = saturate(r3.xyz * float3(0.00392156886,0.00392156886,0.00392156886) + r0.yzw); r2.xyz = float3(0.00392156886,0.00392156886,0.00392156886) * r3.xyz; r1.xyz = -r0.yzw * r2.xyz + r1.xyz; r0.yzw = r2.xyz * r0.yzw; r0.yzw = MaterialParams_constants.Layer0ColorIsAdd_24.xxx * r1.xyz + r0.yzw; r1.xyz = r3.xyz * float3(0.00392156886,0.00392156886,0.00392156886) + -r0.yzw; r0.yzw = MaterialParams_constants.Layer0DiffuseIsBC4_14.xxx * r1.xyz + r0.yzw; r0.yzw = r0.yzw * r0.xxx; o0.w = r0.x; r0.x = PassParams_lastExposureTexture.SampleLevel(FrameParams_defaultSamplers_pointClamp_s, float2(0,0), 0).x; r0.xyz = r0.yzw / r0.xxx; r0.xyz = max(float3(0,0,0), r0.xyz); r0.xyz = min(float3(100000,100000,100000), r0.xyz); o0.xyz = PassParams_constants.globalLightingScale.xxx * r0.xyz; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 10.1 // // using 3Dmigoto v1.2.63 on Tue Nov 07 21:23:54 2017 // // // Buffer Definitions: // // cbuffer PassParams_cbuffer // { // // struct PassParams_Constants // { // // float4 eyePosition; // Offset: 0 // float4 eyePositionPrevFrame; // Offset: 16 // float4 eyeDirection; // Offset: 32 // float4 eyeDirectionPrevFrame; // Offset: 48 // float4x4 viewToWorld; // Offset: 64 // float4x4 viewToWorldPrevFrame; // Offset: 128 // float4x4 worldToView; // Offset: 192 // float4x4 worldToViewPrevFrame; // Offset: 256 // float4x4 projMatrix; // Offset: 320 // float4x4 viewProj; // Offset: 384 // float4x4 viewNoTranslationProj;// Offset: 448 // float4x4 viewProjPrevFrame; // Offset: 512 // float4x4 viewNoTranslationProjPrevFrame;// Offset: 576 // float4 viewTranslation; // Offset: 640 // float4 viewTranslationPrevFrame;// Offset: 656 // float4 vPosToUV; // Offset: 672 // float4 viewportScaleOffset; // Offset: 688 // float4 zFrontBackValue; // Offset: 704 // float4 clipPlane; // Offset: 720 // float4 frustumPlanes[4]; // Offset: 736 // float4 globalLightingScale; // Offset: 800 // float4 viewSpaceLightingBackWS;// Offset: 816 // float4 projectorPosition; // Offset: 832 // float4 prevProjectorPosition; // Offset: 848 // float4 pixelPatchingParams; // Offset: 864 // float gradientAdjustMipBias; // Offset: 880 // float thinGeomAAPixelScale; // Offset: 884 // uint layerIndex; // Offset: 888 // uint globalCubeMapIndex; // Offset: 892 // uint dynamicGBufferCubeMapIndex;// Offset: 896 // uint alphaDitherEnabled; // Offset: 900 // uint TAADitherEnabled; // Offset: 904 // float CameraTAAFadeStartDist; // Offset: 908 // // struct MaterialTable_Constants // { // // } materialTable; // Offset: 4294967292 // // struct ReverseProjParams_Constants // { // // float4x4 ClipXYZToViewPos; // Offset: 912 // float4x4 ClipXYZToWorldPos;// Offset: 976 // float4 ClipZToViewZ; // Offset: 1040 // // } RevProjParams; // Offset: 912 // // struct RefractionParams_Constants // { // // } refraction; // Offset: 4294967292 // // struct DeferredCommonParams_Constants // { // // } deferredcommon; // Offset: 4294967292 // // struct MotionVectorParams_Constants // { // // } motionVector; // Offset: 4294967292 // // struct CombinedCloudShadow_Constants // { // // float4 XYScaleBias; // Offset: 1056 // float4 ForwardMappingParams;// Offset: 1072 // float2 ZProject; // Offset: 1088 // float4 BackwardMappingParams;// Offset: 1104 // float CloudShadowGIDensity;// Offset: 1120 // // } combinedCloudShadow; // Offset: 1056 // // struct AmbientLightingParams_Constants // { // // } AmbientLighting; // Offset: 4294967292 // // struct VolumetricFogParams_Constants // { // // float4 volumeInvTransZ; // Offset: 1136 // float4 volumeTexScale; // Offset: 1152 // float4 volumeTexBias; // Offset: 1168 // float4 sunColor; // Offset: 1184 // float4 sunColorByOneOverPi;// Offset: 1200 // // } fog; // Offset: 1136 // // struct UnderwaterLightingParams_Constants // { // // float3 InvDepthParams; // Offset: 1216 // // } underwater; // Offset: 1216 // // struct ClusteredLightsEvaluateParams_Constants // { // // float4 VposToClusterXY; // Offset: 1232 // float4 ClipPosToClusterXY; // Offset: 1248 // float4 ClusterTransZ; // Offset: 1264 // uint HighClusterW; // Offset: 1280 // uint HighClusterWH; // Offset: 1284 // // } clusteredLightsEvaluate; // Offset: 1232 // // struct WaterStamperTextureParams_Constants // { // // } waterStamperTextures; // Offset: 4294967292 // // struct WaterCustomMeshParams_Constants // { // // float3 maxCC; // Offset: 1296 // // } waterCustomMeshParams; // Offset: 1296 // // struct VideoAndScreenshotParams_Constants // { // // } videoAndScreenshot; // Offset: 4294967292 // // struct RainRipplesParams_Constants // { // // } rainRipples; // Offset: 4294967292 // // struct CookieShadowParams_Constants // { // // } cookieShadows; // Offset: 4294967292 // // struct NearShadowParams_Constants // { // // } nearShadows; // Offset: 4294967292 // // struct FarShadowParams_Constants // { // // float FarShadowBlendRatio; // Offset: 1312 // // } farShadows; // Offset: 1312 // // struct CommonShadowParams_Constants // { // // } commonShadows; // Offset: 4294967292 // // struct GrassForceSamplingParams_Constants // { // // float2 WorldToUVOffset; // Offset: 1328 // float2 WorldToUVScale; // Offset: 1336 // float2 ReferenceWorldXY; // Offset: 1344 // float FadeStart; // Offset: 1352 // float Radius; // Offset: 1356 // // } grassForce; // Offset: 1328 // // } PassParams_constants; // Offset: 0 Size: 1360 // // } // // cbuffer InstanceParams_cbuffer // { // // struct InstanceParams_Constants // { // // float4x4 world; // Offset: 0 // float4x4 worldPrevFrame; // Offset: 64 // float4x4 worldViewProj; // Offset: 128 // float4x4 worldViewProjPrevFrame;// Offset: 192 // float4 dissolveFactor; // Offset: 256 // float LODBlendFactor; // Offset: 272 // float wetnessBias; // Offset: 276 // float alphaTestValue; // Offset: 280 // uint materialTableIndex; // Offset: 284 // uint instanceOffset; // Offset: 288 // uint CameraTAADither; // Offset: 292 // // struct InstancingParams_Constants // { // // struct InstanceBatchSetupConsts_Constants // { // // int4 offsets; // Offset: 304 // // } instanceBatchSetupConsts;// Offset: 304 // // } instancing; // Offset: 304 // // } InstanceParams_constants; // Offset: 0 Size: 320 // // } // // cbuffer MaterialParams_cbuffer // { // // struct MaterialParams_Constants // { // // struct DefaultMaterialConsts // { // // float4 blendXYAlphaTestTwoSided;// Offset: 0 // // } defaults; // Offset: 0 // float4 VertexQuadMin_6; // Offset: 16 // float4 VertexScale_89; // Offset: 32 // float4 VertexOffset_92; // Offset: 48 // float4 VertexQuadMax_16; // Offset: 64 // float4 AlphaClampFallof_2; // Offset: 80 // float4 UseVertexAlpha_4; // Offset: 96 // float4 UseScreenAlpha_5; // Offset: 112 // float4 UseLayer1AlphaGrayScale_7;// Offset: 128 // float4 AlphaClampMin_9; // Offset: 144 // float4 AlphaClampIsLayer01Alpha_10;// Offset: 160 // float4 UseLayer1Alpha_11; // Offset: 176 // float4 Layer0DiffuseUVIsClamp_13;// Offset: 192 // float4 Layer0DiffuseIsBC4_14; // Offset: 208 // float4 Layer1AlphaIsBC4_15; // Offset: 224 // float4 Layer1AlphaUVIsClamp_17;// Offset: 240 // float4 Layer0DiffuseIs9SS_18; // Offset: 256 // float4 OcclusionAlpha_20; // Offset: 272 // float4 OcclusionAlphaStepValue_21;// Offset: 288 // float4 Layer0DiffuseIsScreenSpace_22;// Offset: 304 // float4 Layer0DiffuseIsInvert_23;// Offset: 320 // float4 Layer0ColorIsAdd_24; // Offset: 336 // float4 ScreenAlphaTop_25; // Offset: 352 // float4 ScreenAlphaFallout_26; // Offset: 368 // float4 ScreenAlphaBottom_27; // Offset: 384 // float4 AlphaBoost_28; // Offset: 400 // float4 Mipmap_30; // Offset: 416 // float3x3 Layer0DiffuseUV_8_matrix;// Offset: 432 // float3x3 Layer1AlphaUV_12_matrix;// Offset: 480 // // } MaterialParams_constants; // Offset: 0 Size: 524 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // FrameParams_defaultSamplers_pointClamp sampler NA NA 0 1 // FrameParams_defaultSamplers_standardSampler sampler NA NA 4 1 // PassParams_lastExposureTexture texture float4 2d 20 1 // PassParams_deferredcommon_DepthSurface texture float4 2d 28 1 // MaterialParams_srv.Layer0Diffuse_0 texture float4 2d 70 1 // MaterialParams_srv.Layer1Alpha_1 texture float4 2d 71 1 // InstanceParams_instancing_instanceData texture float4 buf 81 1 // PassParams_cbuffer cbuffer NA NA 1 1 // MaterialParams_cbuffer cbuffer NA NA 2 1 // InstanceParams_cbuffer cbuffer NA NA 3 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float xy w // TEXCOORD 0 xyzw 1 NONE float xy // COLOR 0 xyzw 2 NONE float w // TEXCOORD 1 xyzw 3 NONE float // TEXCOORD 2 xyzw 4 NONE float // TEXCOORD 3 xyzw 5 NONE float // TEXCOORD 4 xyzw 6 NONE float // InstanceID 0 x 7 NONE uint x // SV_IsFrontFace 0 x 8 FFACE uint // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Target 0 xyzw 0 TARGET float xyzw // // Pixel Shader runs at sample frequency // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb1[66], immediateIndexed dcl_constantbuffer cb3[20], immediateIndexed dcl_constantbuffer cb2[32], immediateIndexed dcl_sampler s0, mode_default dcl_sampler s4, mode_default dcl_resource_texture2d (float,float,float,float) t20 dcl_resource_texture2d (float,float,float,float) t28 dcl_resource_texture2d (float,float,float,float) t70 dcl_resource_texture2d (float,float,float,float) t71 dcl_resource_buffer (float,float,float,float) t81 dcl_input_ps_siv linear noperspective sample v0.xyw, position dcl_input_ps linear sample v1.xy dcl_input_ps linear sample v2.w dcl_input_ps constant v7.x dcl_output o0.xyzw dcl_temps 5 ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[15].x mov r1.xy, v1.xyxx mov r1.z, l(1.000000) dp3 r2.x, r1.xyzx, cb2[30].xyzx dp3 r2.y, r1.xyzx, cb2[31].xyzx mov_sat r0.yz, r2.xxyx movc r0.xy, r0.xxxx, r0.yzyy, r2.xyxx add r0.z, cb1[55].x, l(-2.500000) sample_b_indexable(texture2d)(float,float,float,float) r0.xyz, r0.xyxx, t71.xywz, s4, r0.z ne r0.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[14].x movc r0.xy, r0.wwww, r0.xxxx, r0.yzyy add r0.x, -r0.y, r0.x mad r0.x, cb2[8].x, r0.x, r0.y add r0.yz, |cb2[1].xxzx|, |cb2[4].xxzx| mul r0.yz, r0.yyzy, l(0.000000, 3.39498758, 3.39498758, 0.000000) div r1.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r0.yzyy add r1.zw, -r1.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000) add r2.xy, -r1.xyxx, r1.zwzz mad r2.zw, v0.xxxy, cb1[42].xxxy, -v1.xxxy mad r3.xy, cb2[19].xxxx, r2.zwzz, v1.xyxx mov r3.z, l(1.000000) dp3 r4.x, r3.xyzx, cb2[27].xyzx dp3 r4.y, r3.xyzx, cb2[28].xyzx add r2.zw, -r1.xxxy, r4.xxxy lt r1.xy, r4.xyxx, r1.xyxx div r2.xy, r2.zwzz, r2.xyxx mad r2.xy, r2.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.250000, 0.250000, 0.000000, 0.000000) add r2.zw, -r4.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000) mad r2.zw, -r2.zzzw, r0.yyyz, l(0.000000, 0.000000, 1.000000, 1.000000) mul r0.yz, r0.yyzy, r4.xxyx lt r1.zw, r1.zzzw, r4.xxxy movc r1.zw, r1.zzzw, r2.zzzw, r2.xxxy movc r0.yz, r1.xxyx, r0.yyzy, r1.zzwz lt r0.w, l(0.000000), cb2[16].x movc r0.yz, r0.wwww, r0.yyzy, r4.xxyx mov_sat r1.xy, r0.yzyy ne r0.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[12].x movc r0.yz, r0.wwww, r1.xxyx, r0.yyzy add r0.w, cb1[55].x, cb2[26].x add r0.w, r0.w, l(-2.500000) sample_b_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.yzyy, t70.yzwx, s4, r0.w ne r0.y, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[13].x movc r1.xyz, r0.yyyy, r1.wwww, r1.xyzx add r0.y, r0.x, -r1.z mad r0.y, cb2[11].x, r0.y, r1.z add r0.x, -r0.y, r0.x mad_sat r0.x, cb2[10].x, r0.x, r0.y add r0.z, -r0.x, l(1.000000) add r0.w, -cb2[9].x, l(1.000000) add r0.z, -r0.w, r0.z ne r0.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[5].x movc r0.w, r0.w, cb2[5].x, l(0.000001) ishl r2.x, v7.x, l(3) ushr r2.x, r2.x, l(2) iadd r2.x, r2.x, cb3[19].y ld_indexable(buffer)(float,float,float,float) r2.x, r2.xxxx, t81.yxzw iadd r2.x, r2.x, l(3) ld_indexable(buffer)(float,float,float,float) r2.xyz, r2.xxxx, t81.xzwy and r2.xzw, r2.yyzx, l(255, 0, 255, 0x0000ffff) ushr r3.xyz, r2.yyyy, l(24, 16, 8, 0) and r3.xyz, r3.xyzx, l(255, 255, 255, 0) utof r3.xyz, r3.xyzx f16tof32 r2.y, r2.w utof r2.xz, r2.xxzx add r0.x, r0.x, -r2.y div_sat r0.xz, r0.xxzx, r0.wwww max r0.x, r0.z, r0.x add r0.x, -r0.x, l(1.000000) add r0.z, v2.w, l(-1.000000) mad r0.z, cb2[6].x, r0.z, l(1.000000) mul r0.y, r0.z, r0.y mul r0.x, r0.y, r0.x mul r0.x, r1.z, r0.x mul r0.yz, v0.xxyx, cb1[42].xxyx sample_l_indexable(texture2d)(float,float,float,float) r0.y, r0.yzyy, t28.yxzw, s0, l(0.000000) mad r0.yz, r0.yyyy, cb1[65].wwzw, cb1[65].yyxy div r0.y, r0.y, r0.z add r0.y, r0.y, -v0.w ge r0.y, r0.y, cb2[18].x and r0.z, r0.y, l(0x3f800000) movc r0.y, r0.y, l(0), cb2[17].x add r0.y, r0.y, r0.z mul r0.x, r0.y, r0.x mad r0.y, v0.y, cb1[42].y, -cb2[24].x ne r0.z, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[23].x movc r0.z, r0.z, cb2[23].x, l(0.000001) div_sat r0.y, r0.y, r0.z add r0.y, -r0.y, l(1.000000) mad r0.w, v0.y, cb1[42].y, -cb2[22].x div_sat r0.z, r0.w, r0.z min r0.y, r0.y, r0.z add r0.y, r0.y, l(-1.000000) mad r0.y, cb2[7].x, r0.y, l(1.000000) min r0.x, r0.y, r0.x mul r0.y, r2.x, l(0.00392156886) mul r0.y, r0.y, r2.z mul r0.y, r0.y, cb2[25].x mul r0.y, r0.y, l(0.00392156886) mul r0.x, r0.x, r0.y add r2.xyz, -r1.wxyw, l(1.000000, 1.000000, 1.000000, 0.000000) ne r0.y, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[20].x movc r0.yzw, r0.yyyy, r2.xxyz, r1.wwxy mad_sat r1.xyz, r3.xyzx, l(0.00392156886, 0.00392156886, 0.00392156886, 0.000000), r0.yzwy mul r2.xyz, r3.xyzx, l(0.00392156886, 0.00392156886, 0.00392156886, 0.000000) mad r1.xyz, -r0.yzwy, r2.xyzx, r1.xyzx mul r0.yzw, r0.yyzw, r2.xxyz mad r0.yzw, cb2[21].xxxx, r1.xxyz, r0.yyzw mad r1.xyz, r3.xyzx, l(0.00392156886, 0.00392156886, 0.00392156886, 0.000000), -r0.yzwy mad r0.yzw, cb2[13].xxxx, r1.xxyz, r0.yyzw mul r0.yzw, r0.xxxx, r0.yyzw mov o0.w, r0.x sample_l_indexable(texture2d)(float,float,float,float) r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), t20.xyzw, s0, l(0.000000) div r0.xyz, r0.yzwy, r0.xxxx max r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000) min r0.xyz, r0.xyzx, l(100000.000000, 100000.000000, 100000.000000, 0.000000) mul o0.xyz, r0.xyzx, cb1[50].xxxx ret // Approximately 117 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code]
Need help to fix a shader, I'm trying to make an on/off HUD toggle for AC Origins but it's not working.

Here's the error message:

C:\Program Files (x86)\Assassin's Creed Origins\ShaderFixes\000ea4ff144f3d6d-ps_replace.txt(244,37): error X3000: syntax error: unexpected token '.'

And here's the shader in question:

// ---- Created with 3Dmigoto v1.2.63 on Tue Nov 07 21:23:54 2017

cbuffer PassParams_cbuffer : register(b1)
{

struct
{
float4 eyePosition;
float4 eyePositionPrevFrame;
float4 eyeDirection;
float4 eyeDirectionPrevFrame;
float4x4 viewToWorld;
float4x4 viewToWorldPrevFrame;
float4x4 worldToView;
float4x4 worldToViewPrevFrame;
float4x4 projMatrix;
float4x4 viewProj;
float4x4 viewNoTranslationProj;
float4x4 viewProjPrevFrame;
float4x4 viewNoTranslationProjPrevFrame;
float4 viewTranslation;
float4 viewTranslationPrevFrame;
float4 vPosToUV;
float4 viewportScaleOffset;
float4 zFrontBackValue;
float4 clipPlane;
float4 frustumPlanes[4];
float4 globalLightingScale;
float4 viewSpaceLightingBackWS;
float4 projectorPosition;
float4 prevProjectorPosition;
float4 pixelPatchingParams;
float gradientAdjustMipBias;
float thinGeomAAPixelScale;
uint layerIndex;
uint globalCubeMapIndex;
uint dynamicGBufferCubeMapIndex;
uint alphaDitherEnabled;
uint TAADitherEnabled;
float CameraTAAFadeStartDist;

struct
{
} materialTable;


struct
{
float4x4 ClipXYZToViewPos;
float4x4 ClipXYZToWorldPos;
float4 ClipZToViewZ;
} RevProjParams;


struct
{
} refraction;


struct
{
} deferredcommon;


struct
{
} motionVector;


struct
{
float4 XYScaleBias;
float4 ForwardMappingParams;
float2 ZProject;
float4 BackwardMappingParams;
float CloudShadowGIDensity;
} combinedCloudShadow;


struct
{
} AmbientLighting;


struct
{
float4 volumeInvTransZ;
float4 volumeTexScale;
float4 volumeTexBias;
float4 sunColor;
float4 sunColorByOneOverPi;
} fog;


struct
{
float3 InvDepthParams;
} underwater;


struct
{
float4 VposToClusterXY;
float4 ClipPosToClusterXY;
float4 ClusterTransZ;
uint HighClusterW;
uint HighClusterWH;
} clusteredLightsEvaluate;


struct
{
} waterStamperTextures;


struct
{
float3 maxCC;
} waterCustomMeshParams;


struct
{
} videoAndScreenshot;


struct
{
} rainRipples;


struct
{
} cookieShadows;


struct
{
} nearShadows;


struct
{
float FarShadowBlendRatio;
} farShadows;


struct
{
} commonShadows;


struct
{
float2 WorldToUVOffset;
float2 WorldToUVScale;
float2 ReferenceWorldXY;
float FadeStart;
float Radius;
} grassForce;

} PassParams_constants : packoffset(c0);

}

cbuffer InstanceParams_cbuffer : register(b3)
{

struct
{
float4x4 world;
float4x4 worldPrevFrame;
float4x4 worldViewProj;
float4x4 worldViewProjPrevFrame;
float4 dissolveFactor;
float LODBlendFactor;
float wetnessBias;
float alphaTestValue;
uint materialTableIndex;
uint instanceOffset;
uint CameraTAADither;

struct
{

struct
{
int4 offsets;
} instanceBatchSetupConsts;

} instancing;

} InstanceParams_constants : packoffset(c0);

}

cbuffer MaterialParams_cbuffer : register(b2)
{

struct
{

struct
{
float4 blendXYAlphaTestTwoSided;
} defaults;

float4 VertexQuadMin_6;
float4 VertexScale_89;
float4 VertexOffset_92;
float4 VertexQuadMax_16;
float4 AlphaClampFallof_2;
float4 UseVertexAlpha_4;
float4 UseScreenAlpha_5;
float4 UseLayer1AlphaGrayScale_7;
float4 AlphaClampMin_9;
float4 AlphaClampIsLayer01Alpha_10;
float4 UseLayer1Alpha_11;
float4 Layer0DiffuseUVIsClamp_13;
float4 Layer0DiffuseIsBC4_14;
float4 Layer1AlphaIsBC4_15;
float4 Layer1AlphaUVIsClamp_17;
float4 Layer0DiffuseIs9SS_18;
float4 OcclusionAlpha_20;
float4 OcclusionAlphaStepValue_21;
float4 Layer0DiffuseIsScreenSpace_22;
float4 Layer0DiffuseIsInvert_23;
float4 Layer0ColorIsAdd_24;
float4 ScreenAlphaTop_25;
float4 ScreenAlphaFallout_26;
float4 ScreenAlphaBottom_27;
float4 AlphaBoost_28;
float4 Mipmap_30;
float3x3 Layer0DiffuseUV_8_matrix;
float3x3 Layer1AlphaUV_12_matrix;
} MaterialParams_constants : packoffset(c0);

}

SamplerState FrameParams_defaultSamplers_pointClamp_s : register(s0);
SamplerState FrameParams_defaultSamplers_standardSampler_s : register(s4);
Texture2D<float4> PassParams_lastExposureTexture : register(t20);
Texture2D<float4> PassParams_deferredcommon_DepthSurface : register(t28);
Texture2D<float4> MaterialParams_srv.Layer0Diffuse_0 : register(t70);
Texture2D<float4> MaterialParams_srv.Layer1Alpha_1 : register(t71);
Buffer<float4> InstanceParams_instancing_instanceData : register(t81);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
float4 v0 : SV_Position0,
linear sample float4 v1 : TEXCOORD0,
linear sample float4 v2 : COLOR0,
float4 v3 : TEXCOORD1,
float4 v4 : TEXCOORD2,
float4 v5 : TEXCOORD3,
float4 v6 : TEXCOORD4,
nointerpolation uint v7 : InstanceID0,
uint v8 : SV_IsFrontFace0,
out float4 o0 : SV_Target0)
{
float4 r0,r1,r2,r3,r4;
uint4 bitmask, uiDest;
float4 fDest;

r0.x = cmp(0 != MaterialParams_constants.Layer1AlphaUVIsClamp_17.x);
r1.xy = v1.xy;
r1.z = 1;
r2.x = dot(r1.xyz, MaterialParams_constants.Layer1AlphaUV_12_matrix._m00_m10_m20);
r2.y = dot(r1.xyz, MaterialParams_constants.Layer1AlphaUV_12_matrix._m01_m11_m21);
r0.yz = saturate(r2.xy);
r0.xy = r0.xx ? r0.yz : r2.xy;
r0.z = -2.5 + PassParams_constants.gradientAdjustMipBias;
r0.xyz = MaterialParams_srv.Layer1Alpha_1.SampleBias(FrameParams_defaultSamplers_standardSampler_s, r0.xy, r0.z).xyw;
r0.w = cmp(0 != MaterialParams_constants.Layer1AlphaIsBC4_15.x);
r0.xy = r0.ww ? r0.xx : r0.yz;
r0.x = r0.x + -r0.y;
r0.x = MaterialParams_constants.UseLayer1AlphaGrayScale_7.x * r0.x + r0.y;
r0.yz = abs(MaterialParams_constants.VertexQuadMax_16.xz) + abs(MaterialParams_constants.VertexQuadMin_6.xz);
r0.yz = float2(3.39498758,3.39498758) * r0.yz;
r1.xy = float2(0.25,0.25) / r0.yz;
r1.zw = float2(1,1) + -r1.xy;
r2.xy = r1.zw + -r1.xy;
r2.zw = v0.xy * PassParams_constants.vPosToUV.xy + -v1.xy;
r3.xy = MaterialParams_constants.Layer0DiffuseIsScreenSpace_22.xx * r2.zw + v1.xy;
r3.z = 1;
r4.x = dot(r3.xyz, MaterialParams_constants.Layer0DiffuseUV_8_matrix._m00_m10_m20);
r4.y = dot(r3.xyz, MaterialParams_constants.Layer0DiffuseUV_8_matrix._m01_m11_m21);
r2.zw = r4.xy + -r1.xy;
r1.xy = cmp(r4.xy < r1.xy);
r2.xy = r2.zw / r2.xy;
r2.xy = r2.xy * float2(0.5,0.5) + float2(0.25,0.25);
r2.zw = float2(1,1) + -r4.xy;
r2.zw = -r2.zw * r0.yz + float2(1,1);
r0.yz = r4.xy * r0.yz;
r1.zw = cmp(r1.zw < r4.xy);
r1.zw = r1.zw ? r2.zw : r2.xy;
r0.yz = r1.xy ? r0.yz : r1.zw;
r0.w = cmp(0 < MaterialParams_constants.Layer0DiffuseIs9SS_18.x);
r0.yz = r0.ww ? r0.yz : r4.xy;
r1.xy = saturate(r0.yz);
r0.w = cmp(0 != MaterialParams_constants.Layer0DiffuseUVIsClamp_13.x);
r0.yz = r0.ww ? r1.xy : r0.yz;
r0.w = MaterialParams_constants.Mipmap_30.x + PassParams_constants.gradientAdjustMipBias;
r0.w = -2.5 + r0.w;
r1.xyzw = MaterialParams_srv.Layer0Diffuse_0.SampleBias(FrameParams_defaultSamplers_standardSampler_s, r0.yz, r0.w).yzwx;
r0.y = cmp(0 != MaterialParams_constants.Layer0DiffuseIsBC4_14.x);
r1.xyz = r0.yyy ? r1.www : r1.xyz;
r0.y = -r1.z + r0.x;
r0.y = MaterialParams_constants.UseLayer1Alpha_11.x * r0.y + r1.z;
r0.x = r0.x + -r0.y;
r0.x = saturate(MaterialParams_constants.AlphaClampIsLayer01Alpha_10.x * r0.x + r0.y);
r0.z = 1 + -r0.x;
r0.w = 1 + -MaterialParams_constants.AlphaClampMin_9.x;
r0.z = r0.z + -r0.w;
r0.w = cmp(0 != MaterialParams_constants.AlphaClampFallof_2.x);
r0.w = r0.w ? MaterialParams_constants.AlphaClampFallof_2.x : 9.99999997e-007;
r2.x = (uint)v7.x << 3;
r2.x = (uint)r2.x >> 2;
r2.x = (int)r2.x + (int)InstanceParams_constants.instancing.instanceBatchSetupConsts.offsets.y;
r2.x = InstanceParams_instancing_instanceData.Load(r2.x).y;
r2.x = (int)r2.x + 3;
r2.xyz = InstanceParams_instancing_instanceData.Load(r2.x).xzw;
r2.xzw = (int3)r2.yzx & int3(255,255,0);
r3.xyz = (uint3)r2.yyy >> int3(24,16,8);
r3.xyz = (int3)r3.xyz & int3(255,255,255);
r3.xyz = (uint3)r3.xyz;
r2.y = f16tof32(r2.w);
r2.xz = (uint2)r2.xz;
r0.x = -r2.y + r0.x;
r0.xz = saturate(r0.xz / r0.ww);
r0.x = max(r0.x, r0.z);
r0.x = 1 + -r0.x;
r0.z = -1 + v2.w;
r0.z = MaterialParams_constants.UseVertexAlpha_4.x * r0.z + 1;
r0.y = r0.y * r0.z;
r0.x = r0.x * r0.y;
r0.x = r0.x * r1.z;
r0.yz = PassParams_constants.vPosToUV.xy * v0.xy;
r0.y = PassParams_deferredcommon_DepthSurface.SampleLevel(FrameParams_defaultSamplers_pointClamp_s, r0.yz, 0).x;
r0.yz = r0.yy * PassParams_constants.RevProjParams.ClipZToViewZ.wz + PassParams_constants.RevProjParams.ClipZToViewZ.yx;
r0.y = r0.y / r0.z;
r0.y = -v0.w + r0.y;
r0.y = cmp(r0.y >= MaterialParams_constants.OcclusionAlphaStepValue_21.x);
r0.z = r0.y ? 1.000000 : 0;
r0.y = r0.y ? 0 : MaterialParams_constants.OcclusionAlpha_20.x;
r0.y = r0.z + r0.y;
r0.x = r0.x * r0.y;
r0.y = v0.y * PassParams_constants.vPosToUV.y + -MaterialParams_constants.ScreenAlphaBottom_27.x;
r0.z = cmp(0 != MaterialParams_constants.ScreenAlphaFallout_26.x);
r0.z = r0.z ? MaterialParams_constants.ScreenAlphaFallout_26.x : 9.99999997e-007;
r0.y = saturate(r0.y / r0.z);
r0.y = 1 + -r0.y;
r0.w = v0.y * PassParams_constants.vPosToUV.y + -MaterialParams_constants.ScreenAlphaTop_25.x;
r0.z = saturate(r0.w / r0.z);
r0.y = min(r0.z, r0.y);
r0.y = -1 + r0.y;
r0.y = MaterialParams_constants.UseScreenAlpha_5.x * r0.y + 1;
r0.x = min(r0.x, r0.y);
r0.y = 0.00392156886 * r2.x;
r0.y = r2.z * r0.y;
r0.y = MaterialParams_constants.AlphaBoost_28.x * r0.y;
r0.y = 0.00392156886 * r0.y;
r0.x = r0.y * r0.x;
r2.xyz = float3(1,1,1) + -r1.wxy;
r0.y = cmp(0 != MaterialParams_constants.Layer0DiffuseIsInvert_23.x);
r0.yzw = r0.yyy ? r2.xyz : r1.wxy;
r1.xyz = saturate(r3.xyz * float3(0.00392156886,0.00392156886,0.00392156886) + r0.yzw);
r2.xyz = float3(0.00392156886,0.00392156886,0.00392156886) * r3.xyz;
r1.xyz = -r0.yzw * r2.xyz + r1.xyz;
r0.yzw = r2.xyz * r0.yzw;
r0.yzw = MaterialParams_constants.Layer0ColorIsAdd_24.xxx * r1.xyz + r0.yzw;
r1.xyz = r3.xyz * float3(0.00392156886,0.00392156886,0.00392156886) + -r0.yzw;
r0.yzw = MaterialParams_constants.Layer0DiffuseIsBC4_14.xxx * r1.xyz + r0.yzw;
r0.yzw = r0.yzw * r0.xxx;
o0.w = r0.x;
r0.x = PassParams_lastExposureTexture.SampleLevel(FrameParams_defaultSamplers_pointClamp_s, float2(0,0), 0).x;
r0.xyz = r0.yzw / r0.xxx;
r0.xyz = max(float3(0,0,0), r0.xyz);
r0.xyz = min(float3(100000,100000,100000), r0.xyz);
o0.xyz = PassParams_constants.globalLightingScale.xxx * r0.xyz;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
// using 3Dmigoto v1.2.63 on Tue Nov 07 21:23:54 2017
//
//
// Buffer Definitions:
//
// cbuffer PassParams_cbuffer
// {
//
// struct PassParams_Constants
// {
//
// float4 eyePosition; // Offset: 0
// float4 eyePositionPrevFrame; // Offset: 16
// float4 eyeDirection; // Offset: 32
// float4 eyeDirectionPrevFrame; // Offset: 48
// float4x4 viewToWorld; // Offset: 64
// float4x4 viewToWorldPrevFrame; // Offset: 128
// float4x4 worldToView; // Offset: 192
// float4x4 worldToViewPrevFrame; // Offset: 256
// float4x4 projMatrix; // Offset: 320
// float4x4 viewProj; // Offset: 384
// float4x4 viewNoTranslationProj;// Offset: 448
// float4x4 viewProjPrevFrame; // Offset: 512
// float4x4 viewNoTranslationProjPrevFrame;// Offset: 576
// float4 viewTranslation; // Offset: 640
// float4 viewTranslationPrevFrame;// Offset: 656
// float4 vPosToUV; // Offset: 672
// float4 viewportScaleOffset; // Offset: 688
// float4 zFrontBackValue; // Offset: 704
// float4 clipPlane; // Offset: 720
// float4 frustumPlanes[4]; // Offset: 736
// float4 globalLightingScale; // Offset: 800
// float4 viewSpaceLightingBackWS;// Offset: 816
// float4 projectorPosition; // Offset: 832
// float4 prevProjectorPosition; // Offset: 848
// float4 pixelPatchingParams; // Offset: 864
// float gradientAdjustMipBias; // Offset: 880
// float thinGeomAAPixelScale; // Offset: 884
// uint layerIndex; // Offset: 888
// uint globalCubeMapIndex; // Offset: 892
// uint dynamicGBufferCubeMapIndex;// Offset: 896
// uint alphaDitherEnabled; // Offset: 900
// uint TAADitherEnabled; // Offset: 904
// float CameraTAAFadeStartDist; // Offset: 908
//
// struct MaterialTable_Constants
// {
//
// } materialTable; // Offset: 4294967292
//
// struct ReverseProjParams_Constants
// {
//
// float4x4 ClipXYZToViewPos; // Offset: 912
// float4x4 ClipXYZToWorldPos;// Offset: 976
// float4 ClipZToViewZ; // Offset: 1040
//
// } RevProjParams; // Offset: 912
//
// struct RefractionParams_Constants
// {
//
// } refraction; // Offset: 4294967292
//
// struct DeferredCommonParams_Constants
// {
//
// } deferredcommon; // Offset: 4294967292
//
// struct MotionVectorParams_Constants
// {
//
// } motionVector; // Offset: 4294967292
//
// struct CombinedCloudShadow_Constants
// {
//
// float4 XYScaleBias; // Offset: 1056
// float4 ForwardMappingParams;// Offset: 1072
// float2 ZProject; // Offset: 1088
// float4 BackwardMappingParams;// Offset: 1104
// float CloudShadowGIDensity;// Offset: 1120
//
// } combinedCloudShadow; // Offset: 1056
//
// struct AmbientLightingParams_Constants
// {
//
// } AmbientLighting; // Offset: 4294967292
//
// struct VolumetricFogParams_Constants
// {
//
// float4 volumeInvTransZ; // Offset: 1136
// float4 volumeTexScale; // Offset: 1152
// float4 volumeTexBias; // Offset: 1168
// float4 sunColor; // Offset: 1184
// float4 sunColorByOneOverPi;// Offset: 1200
//
// } fog; // Offset: 1136
//
// struct UnderwaterLightingParams_Constants
// {
//
// float3 InvDepthParams; // Offset: 1216
//
// } underwater; // Offset: 1216
//
// struct ClusteredLightsEvaluateParams_Constants
// {
//
// float4 VposToClusterXY; // Offset: 1232
// float4 ClipPosToClusterXY; // Offset: 1248
// float4 ClusterTransZ; // Offset: 1264
// uint HighClusterW; // Offset: 1280
// uint HighClusterWH; // Offset: 1284
//
// } clusteredLightsEvaluate; // Offset: 1232
//
// struct WaterStamperTextureParams_Constants
// {
//
// } waterStamperTextures; // Offset: 4294967292
//
// struct WaterCustomMeshParams_Constants
// {
//
// float3 maxCC; // Offset: 1296
//
// } waterCustomMeshParams; // Offset: 1296
//
// struct VideoAndScreenshotParams_Constants
// {
//
// } videoAndScreenshot; // Offset: 4294967292
//
// struct RainRipplesParams_Constants
// {
//
// } rainRipples; // Offset: 4294967292
//
// struct CookieShadowParams_Constants
// {
//
// } cookieShadows; // Offset: 4294967292
//
// struct NearShadowParams_Constants
// {
//
// } nearShadows; // Offset: 4294967292
//
// struct FarShadowParams_Constants
// {
//
// float FarShadowBlendRatio; // Offset: 1312
//
// } farShadows; // Offset: 1312
//
// struct CommonShadowParams_Constants
// {
//
// } commonShadows; // Offset: 4294967292
//
// struct GrassForceSamplingParams_Constants
// {
//
// float2 WorldToUVOffset; // Offset: 1328
// float2 WorldToUVScale; // Offset: 1336
// float2 ReferenceWorldXY; // Offset: 1344
// float FadeStart; // Offset: 1352
// float Radius; // Offset: 1356
//
// } grassForce; // Offset: 1328
//
// } PassParams_constants; // Offset: 0 Size: 1360
//
// }
//
// cbuffer InstanceParams_cbuffer
// {
//
// struct InstanceParams_Constants
// {
//
// float4x4 world; // Offset: 0
// float4x4 worldPrevFrame; // Offset: 64
// float4x4 worldViewProj; // Offset: 128
// float4x4 worldViewProjPrevFrame;// Offset: 192
// float4 dissolveFactor; // Offset: 256
// float LODBlendFactor; // Offset: 272
// float wetnessBias; // Offset: 276
// float alphaTestValue; // Offset: 280
// uint materialTableIndex; // Offset: 284
// uint instanceOffset; // Offset: 288
// uint CameraTAADither; // Offset: 292
//
// struct InstancingParams_Constants
// {
//
// struct InstanceBatchSetupConsts_Constants
// {
//
// int4 offsets; // Offset: 304
//
// } instanceBatchSetupConsts;// Offset: 304
//
// } instancing; // Offset: 304
//
// } InstanceParams_constants; // Offset: 0 Size: 320
//
// }
//
// cbuffer MaterialParams_cbuffer
// {
//
// struct MaterialParams_Constants
// {
//
// struct DefaultMaterialConsts
// {
//
// float4 blendXYAlphaTestTwoSided;// Offset: 0
//
// } defaults; // Offset: 0
// float4 VertexQuadMin_6; // Offset: 16
// float4 VertexScale_89; // Offset: 32
// float4 VertexOffset_92; // Offset: 48
// float4 VertexQuadMax_16; // Offset: 64
// float4 AlphaClampFallof_2; // Offset: 80
// float4 UseVertexAlpha_4; // Offset: 96
// float4 UseScreenAlpha_5; // Offset: 112
// float4 UseLayer1AlphaGrayScale_7;// Offset: 128
// float4 AlphaClampMin_9; // Offset: 144
// float4 AlphaClampIsLayer01Alpha_10;// Offset: 160
// float4 UseLayer1Alpha_11; // Offset: 176
// float4 Layer0DiffuseUVIsClamp_13;// Offset: 192
// float4 Layer0DiffuseIsBC4_14; // Offset: 208
// float4 Layer1AlphaIsBC4_15; // Offset: 224
// float4 Layer1AlphaUVIsClamp_17;// Offset: 240
// float4 Layer0DiffuseIs9SS_18; // Offset: 256
// float4 OcclusionAlpha_20; // Offset: 272
// float4 OcclusionAlphaStepValue_21;// Offset: 288
// float4 Layer0DiffuseIsScreenSpace_22;// Offset: 304
// float4 Layer0DiffuseIsInvert_23;// Offset: 320
// float4 Layer0ColorIsAdd_24; // Offset: 336
// float4 ScreenAlphaTop_25; // Offset: 352
// float4 ScreenAlphaFallout_26; // Offset: 368
// float4 ScreenAlphaBottom_27; // Offset: 384
// float4 AlphaBoost_28; // Offset: 400
// float4 Mipmap_30; // Offset: 416
// float3x3 Layer0DiffuseUV_8_matrix;// Offset: 432
// float3x3 Layer1AlphaUV_12_matrix;// Offset: 480
//
// } MaterialParams_constants; // Offset: 0 Size: 524
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// FrameParams_defaultSamplers_pointClamp sampler NA NA 0 1
// FrameParams_defaultSamplers_standardSampler sampler NA NA 4 1
// PassParams_lastExposureTexture texture float4 2d 20 1
// PassParams_deferredcommon_DepthSurface texture float4 2d 28 1
// MaterialParams_srv.Layer0Diffuse_0 texture float4 2d 70 1
// MaterialParams_srv.Layer1Alpha_1 texture float4 2d 71 1
// InstanceParams_instancing_instanceData texture float4 buf 81 1
// PassParams_cbuffer cbuffer NA NA 1 1
// MaterialParams_cbuffer cbuffer NA NA 2 1
// InstanceParams_cbuffer cbuffer NA NA 3 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xy w
// TEXCOORD 0 xyzw 1 NONE float xy
// COLOR 0 xyzw 2 NONE float w
// TEXCOORD 1 xyzw 3 NONE float
// TEXCOORD 2 xyzw 4 NONE float
// TEXCOORD 3 xyzw 5 NONE float
// TEXCOORD 4 xyzw 6 NONE float
// InstanceID 0 x 7 NONE uint x
// SV_IsFrontFace 0 x 8 FFACE uint
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
// Pixel Shader runs at sample frequency
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[66], immediateIndexed
dcl_constantbuffer cb3[20], immediateIndexed
dcl_constantbuffer cb2[32], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s4, mode_default
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t28
dcl_resource_texture2d (float,float,float,float) t70
dcl_resource_texture2d (float,float,float,float) t71
dcl_resource_buffer (float,float,float,float) t81
dcl_input_ps_siv linear noperspective sample v0.xyw, position
dcl_input_ps linear sample v1.xy
dcl_input_ps linear sample v2.w
dcl_input_ps constant v7.x
dcl_output o0.xyzw
dcl_temps 5
ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[15].x
mov r1.xy, v1.xyxx
mov r1.z, l(1.000000)
dp3 r2.x, r1.xyzx, cb2[30].xyzx
dp3 r2.y, r1.xyzx, cb2[31].xyzx
mov_sat r0.yz, r2.xxyx
movc r0.xy, r0.xxxx, r0.yzyy, r2.xyxx
add r0.z, cb1[55].x, l(-2.500000)
sample_b_indexable(texture2d)(float,float,float,float) r0.xyz, r0.xyxx, t71.xywz, s4, r0.z
ne r0.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[14].x
movc r0.xy, r0.wwww, r0.xxxx, r0.yzyy
add r0.x, -r0.y, r0.x
mad r0.x, cb2[8].x, r0.x, r0.y
add r0.yz, |cb2[1].xxzx|, |cb2[4].xxzx|
mul r0.yz, r0.yyzy, l(0.000000, 3.39498758, 3.39498758, 0.000000)
div r1.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r0.yzyy
add r1.zw, -r1.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
add r2.xy, -r1.xyxx, r1.zwzz
mad r2.zw, v0.xxxy, cb1[42].xxxy, -v1.xxxy
mad r3.xy, cb2[19].xxxx, r2.zwzz, v1.xyxx
mov r3.z, l(1.000000)
dp3 r4.x, r3.xyzx, cb2[27].xyzx
dp3 r4.y, r3.xyzx, cb2[28].xyzx
add r2.zw, -r1.xxxy, r4.xxxy
lt r1.xy, r4.xyxx, r1.xyxx
div r2.xy, r2.zwzz, r2.xyxx
mad r2.xy, r2.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.250000, 0.250000, 0.000000, 0.000000)
add r2.zw, -r4.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
mad r2.zw, -r2.zzzw, r0.yyyz, l(0.000000, 0.000000, 1.000000, 1.000000)
mul r0.yz, r0.yyzy, r4.xxyx
lt r1.zw, r1.zzzw, r4.xxxy
movc r1.zw, r1.zzzw, r2.zzzw, r2.xxxy
movc r0.yz, r1.xxyx, r0.yyzy, r1.zzwz
lt r0.w, l(0.000000), cb2[16].x
movc r0.yz, r0.wwww, r0.yyzy, r4.xxyx
mov_sat r1.xy, r0.yzyy
ne r0.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[12].x
movc r0.yz, r0.wwww, r1.xxyx, r0.yyzy
add r0.w, cb1[55].x, cb2[26].x
add r0.w, r0.w, l(-2.500000)
sample_b_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.yzyy, t70.yzwx, s4, r0.w
ne r0.y, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[13].x
movc r1.xyz, r0.yyyy, r1.wwww, r1.xyzx
add r0.y, r0.x, -r1.z
mad r0.y, cb2[11].x, r0.y, r1.z
add r0.x, -r0.y, r0.x
mad_sat r0.x, cb2[10].x, r0.x, r0.y
add r0.z, -r0.x, l(1.000000)
add r0.w, -cb2[9].x, l(1.000000)
add r0.z, -r0.w, r0.z
ne r0.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[5].x
movc r0.w, r0.w, cb2[5].x, l(0.000001)
ishl r2.x, v7.x, l(3)
ushr r2.x, r2.x, l(2)
iadd r2.x, r2.x, cb3[19].y
ld_indexable(buffer)(float,float,float,float) r2.x, r2.xxxx, t81.yxzw
iadd r2.x, r2.x, l(3)
ld_indexable(buffer)(float,float,float,float) r2.xyz, r2.xxxx, t81.xzwy
and r2.xzw, r2.yyzx, l(255, 0, 255, 0x0000ffff)
ushr r3.xyz, r2.yyyy, l(24, 16, 8, 0)
and r3.xyz, r3.xyzx, l(255, 255, 255, 0)
utof r3.xyz, r3.xyzx
f16tof32 r2.y, r2.w
utof r2.xz, r2.xxzx
add r0.x, r0.x, -r2.y
div_sat r0.xz, r0.xxzx, r0.wwww
max r0.x, r0.z, r0.x
add r0.x, -r0.x, l(1.000000)
add r0.z, v2.w, l(-1.000000)
mad r0.z, cb2[6].x, r0.z, l(1.000000)
mul r0.y, r0.z, r0.y
mul r0.x, r0.y, r0.x
mul r0.x, r1.z, r0.x
mul r0.yz, v0.xxyx, cb1[42].xxyx
sample_l_indexable(texture2d)(float,float,float,float) r0.y, r0.yzyy, t28.yxzw, s0, l(0.000000)
mad r0.yz, r0.yyyy, cb1[65].wwzw, cb1[65].yyxy
div r0.y, r0.y, r0.z
add r0.y, r0.y, -v0.w
ge r0.y, r0.y, cb2[18].x
and r0.z, r0.y, l(0x3f800000)
movc r0.y, r0.y, l(0), cb2[17].x
add r0.y, r0.y, r0.z
mul r0.x, r0.y, r0.x
mad r0.y, v0.y, cb1[42].y, -cb2[24].x
ne r0.z, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[23].x
movc r0.z, r0.z, cb2[23].x, l(0.000001)
div_sat r0.y, r0.y, r0.z
add r0.y, -r0.y, l(1.000000)
mad r0.w, v0.y, cb1[42].y, -cb2[22].x
div_sat r0.z, r0.w, r0.z
min r0.y, r0.y, r0.z
add r0.y, r0.y, l(-1.000000)
mad r0.y, cb2[7].x, r0.y, l(1.000000)
min r0.x, r0.y, r0.x
mul r0.y, r2.x, l(0.00392156886)
mul r0.y, r0.y, r2.z
mul r0.y, r0.y, cb2[25].x
mul r0.y, r0.y, l(0.00392156886)
mul r0.x, r0.x, r0.y
add r2.xyz, -r1.wxyw, l(1.000000, 1.000000, 1.000000, 0.000000)
ne r0.y, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[20].x
movc r0.yzw, r0.yyyy, r2.xxyz, r1.wwxy
mad_sat r1.xyz, r3.xyzx, l(0.00392156886, 0.00392156886, 0.00392156886, 0.000000), r0.yzwy
mul r2.xyz, r3.xyzx, l(0.00392156886, 0.00392156886, 0.00392156886, 0.000000)
mad r1.xyz, -r0.yzwy, r2.xyzx, r1.xyzx
mul r0.yzw, r0.yyzw, r2.xxyz
mad r0.yzw, cb2[21].xxxx, r1.xxyz, r0.yyzw
mad r1.xyz, r3.xyzx, l(0.00392156886, 0.00392156886, 0.00392156886, 0.000000), -r0.yzwy
mad r0.yzw, cb2[13].xxxx, r1.xxyz, r0.yyzw
mul r0.yzw, r0.xxxx, r0.yyzw
mov o0.w, r0.x
sample_l_indexable(texture2d)(float,float,float,float) r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), t20.xyzw, s0, l(0.000000)
div r0.xyz, r0.yzwy, r0.xxxx
max r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
min r0.xyz, r0.xyzx, l(100000.000000, 100000.000000, 100000.000000, 0.000000)
mul o0.xyz, r0.xyzx, cb1[50].xxxx
ret
// Approximately 117 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

1080 Ti - i7 5820k - 16Gb RAM - Win 10 version 1607 - ASUS VG236H (1920x1080@120Hz)

Posted 11/07/2017 08:14 PM   
  113 / 143    
Scroll To Top