Fallout 4
  6 / 44    
[quote="Losti"][quote="mike_ar69"]For what it's worth I managed to fix most of the shadows and lights - there seems to be just one pattern so far. Ambient Occlusions is a bit odd, there is skybox and of course HUD, but otherwise it's all doable stuff.[/quote] YEEHHA ^^ For those who wont wait and want to start, CM isnt that bad i thourgth before...Its a real grat CM I think....compared to other games. Here is a little tutorial and my settings that makes CM acceptable for me and with a good FrameRate (SLI GTX 770, Win 7, 64). Files you need: http://www.share-online.biz/dl/55KL4MXNQN (NOTE: I did not know the real english setting names in NV-Control-Panel but ill hope you will find it ^^) 1. copy "Fallout4" file from my archive to C:\Users\USERNAME\Documents\NVStereoscopic3D.LOG\ (save your 3D-Vision Settings first if you want and overwrite the file) 2. set "prerendered Frames" in NV-ControlPanel-3D-Settings to "1" 3. set "V-Sync" in NV-ControlPanel-3D-Settings to "Enabled" 4. set "Texture-Filtering-Quality" in NV-ControlPanel-3D-Settings to "high performance" 5. set "Ambient Occlusion" in NV-ControlPanel-3D-Settings to "performance" 6. set "Muti-Display-Mode" in NV-ControlPanel-3D-Settings to "single display performance mode" 7. set "Energy-Control-Mode" in NV-ControlPanel-3D-Settings to "prefere max. performance" 8. go to "C:\ProgramData\NVIDIA Corporation\Drs\" and delete "nvdrssel.bin" 9. start "Geforce 3D Profile Manager.exe" and press "Import SLI Profiles" 10. select "NVIDIA Profiles_FO_358.91.txt" from my archive 11. play the game PS: the value i have added to the 358.91 Fallout 4 Profile is: Setting ID_0x709adada = 0x37f5825f InternalSettingFlag=V0 If you want to keep your Driver Settings, simply start "Geforce 3D Profile Manager.exe" export your settings, change the Fallout 4 profile while adding "Setting ID_0x709adada = 0x37f5825f InternalSettingFlag=V0" or change the value if existing. [/quote] Awesome! Big thanks for the info ;)) See CM is not ALL that bad! (defo not the true thing but not that bad)
Losti said:
mike_ar69 said:For what it's worth I managed to fix most of the shadows and lights - there seems to be just one pattern so far. Ambient Occlusions is a bit odd, there is skybox and of course HUD, but otherwise it's all doable stuff.


YEEHHA ^^

For those who wont wait and want to start, CM isnt that bad i thourgth before...Its a real grat CM I think....compared to other games. Here is a little tutorial and my settings that makes CM acceptable for me and with a good FrameRate (SLI GTX 770, Win 7, 64). Files you need:


http://www.share-online.biz/dl/55KL4MXNQN


(NOTE: I did not know the real english setting names in NV-Control-Panel but ill hope you will find it ^^)

1. copy "Fallout4" file from my archive to C:\Users\USERNAME\Documents\NVStereoscopic3D.LOG\
(save your 3D-Vision Settings first if you want and overwrite the file)

2. set "prerendered Frames" in NV-ControlPanel-3D-Settings to "1"
3. set "V-Sync" in NV-ControlPanel-3D-Settings to "Enabled"
4. set "Texture-Filtering-Quality" in NV-ControlPanel-3D-Settings to "high performance"
5. set "Ambient Occlusion" in NV-ControlPanel-3D-Settings to "performance"
6. set "Muti-Display-Mode" in NV-ControlPanel-3D-Settings to "single display performance mode"
7. set "Energy-Control-Mode" in NV-ControlPanel-3D-Settings to "prefere max. performance"

8. go to "C:\ProgramData\NVIDIA Corporation\Drs\" and delete "nvdrssel.bin"
9. start "Geforce 3D Profile Manager.exe" and press "Import SLI Profiles"
10. select "NVIDIA Profiles_FO_358.91.txt" from my archive
11. play the game

PS: the value i have added to the 358.91 Fallout 4 Profile is: Setting ID_0x709adada = 0x37f5825f InternalSettingFlag=V0
If you want to keep your Driver Settings, simply start "Geforce 3D Profile Manager.exe" export your settings, change the Fallout 4 profile
while adding "Setting ID_0x709adada = 0x37f5825f InternalSettingFlag=V0" or change the value if existing.


Awesome! Big thanks for the info ;)) See CM is not ALL that bad! (defo not the true thing but not that bad)

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)

#76
Posted 11/10/2015 08:29 PM   
[quote="mike_ar69"]For what it's worth I managed to fix most of the shadows and lights - there seems to be just one pattern so far. Ambient Occlusions is a bit odd, there is skybox and of course HUD, but otherwise it's all doable stuff.[/quote] Awesome! I didn't even had time to install the freaking game:))) But, if I can help with anything just let me know;) Cheers!
mike_ar69 said:For what it's worth I managed to fix most of the shadows and lights - there seems to be just one pattern so far. Ambient Occlusions is a bit odd, there is skybox and of course HUD, but otherwise it's all doable stuff.


Awesome!
I didn't even had time to install the freaking game:))) But, if I can help with anything just let me know;)
Cheers!

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)

#77
Posted 11/10/2015 08:30 PM   
[quote="helifax"][quote="mike_ar69"]For what it's worth I managed to fix most of the shadows and lights - there seems to be just one pattern so far. Ambient Occlusions is a bit odd, there is skybox and of course HUD, but otherwise it's all doable stuff.[/quote] Awesome! I didn't even had time to install the freaking game:))) But, if I can help with anything just let me know;) Cheers![/quote] Will do. I hope to look at it again tonight and script the shadow fixes. You will see when you look at it that the headers have no information in them (seems to be the norm nowadays) so I need to nail down the ProjMatrix[0].x element because I have hardcoded it for now. Otherwise, send me shaders of issues found and so on. I remember fixing the HUD for Fallout3 (just for myself, I can't remember if I released anything) and there is a lot of fiddly options (showing the Pipboy, VATs etc).
helifax said:
mike_ar69 said:For what it's worth I managed to fix most of the shadows and lights - there seems to be just one pattern so far. Ambient Occlusions is a bit odd, there is skybox and of course HUD, but otherwise it's all doable stuff.


Awesome!
I didn't even had time to install the freaking game:))) But, if I can help with anything just let me know;)
Cheers!

Will do. I hope to look at it again tonight and script the shadow fixes. You will see when you look at it that the headers have no information in them (seems to be the norm nowadays) so I need to nail down the ProjMatrix[0].x element because I have hardcoded it for now. Otherwise, send me shaders of issues found and so on. I remember fixing the HUD for Fallout3 (just for myself, I can't remember if I released anything) and there is a lot of fiddly options (showing the Pipboy, VATs etc).

Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278

#78
Posted 11/10/2015 08:35 PM   
I can wait for Real 3D fix and would advice that too - since I got a little bit upset when I get the Armour. Putting it on makes 3D completely flat or it is even switching to 2D. Looks shit. Broke my experience and good feeling about this game. I`ll get back only if you tell me how to take that off :) I`m guessing that rig in the workshop is made for it - am I right ?
I can wait for Real 3D fix and would advice that too - since I got a little bit upset when I get the Armour. Putting it on makes 3D completely flat or it is even switching to 2D. Looks shit. Broke my experience and good feeling about this game.
I`ll get back only if you tell me how to take that off :)
I`m guessing that rig in the workshop is made for it - am I right ?
[quote="mike_ar69"] ... so I need to nail down the ProjMatrix[0].x element because I have hardcoded it for now. [/quote] Now that is interesting! How did you hardcode it if there aren't any headers in the shaders? Did you find one with the information and what registers is it stored in or another way? I haven't used it, but I tried one time, the frame analysis option that is in 3DMigoto. Problem is...I don't really have a clue on how to use it:)) and after a quick try I gave up (was a bit time pressured at the time). Did you use the frame analysis option to find out where the ProjMatrix is ?
mike_ar69 said:
... so I need to nail down the ProjMatrix[0].x element because I have hardcoded it for now.


Now that is interesting! How did you hardcode it if there aren't any headers in the shaders? Did you find one with the information and what registers is it stored in or another way?
I haven't used it, but I tried one time, the frame analysis option that is in 3DMigoto. Problem is...I don't really have a clue on how to use it:)) and after a quick try I gave up (was a bit time pressured at the time).
Did you use the frame analysis option to find out where the ProjMatrix is ?

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)

#80
Posted 11/10/2015 08:41 PM   
[quote="SKAUT"]I can wait for Real 3D fix and would advice that too - since I got a little bit upset when I get the Armour. Putting it on makes 3D completely flat or it is even switching to 2D. Looks shit. Broke my experience and good feeling about this game. I`ll get back only if you tell me how to take that off :) I`m guessing that rig in the workshop is made for it - am I right ?[/quote] Give a try o alternate CM setting I have proposed on page 5.
SKAUT said:I can wait for Real 3D fix and would advice that too - since I got a little bit upset when I get the Armour. Putting it on makes 3D completely flat or it is even switching to 2D. Looks shit. Broke my experience and good feeling about this game.
I`ll get back only if you tell me how to take that off :)
I`m guessing that rig in the workshop is made for it - am I right ?


Give a try o alternate CM setting I have proposed on page 5.

ASUS Prime z370-A, i5 8600K, ASUS GTX 1080 Ti Strix, 16 GB DDR4, Corsair AX860i PSU, ASUS VG278HR, 3D Vision 2, Sound Blaster Z, Astro A50 Headphones, Windows 10 64-bit Home

#81
Posted 11/10/2015 08:54 PM   
[quote="helifax"][quote="mike_ar69"] ... so I need to nail down the ProjMatrix[0].x element because I have hardcoded it for now. [/quote] Now that is interesting! How did you hardcode it if there aren't any headers in the shaders? Did you find one with the information and what registers is it stored in or another way? I haven't used it, but I tried one time, the frame analysis option that is in 3DMigoto. Problem is...I don't really have a clue on how to use it:)) and after a quick try I gave up (was a bit time pressured at the time). Did you use the frame analysis option to find out where the ProjMatrix is ? [/quote] No I have not identified the matrix element, I am 'hardcoding' the number "0.84". Frame analysis will be useful to see what is and what is not a matrix I guess. There are not that many variables, so just trying each in turn will work lol. I already know what elements not to use, i.e. the ones already being used in the shader, so it won't take long, half an hour tops.
helifax said:
mike_ar69 said:
... so I need to nail down the ProjMatrix[0].x element because I have hardcoded it for now.


Now that is interesting! How did you hardcode it if there aren't any headers in the shaders? Did you find one with the information and what registers is it stored in or another way?
I haven't used it, but I tried one time, the frame analysis option that is in 3DMigoto. Problem is...I don't really have a clue on how to use it:)) and after a quick try I gave up (was a bit time pressured at the time).
Did you use the frame analysis option to find out where the ProjMatrix is ?


No I have not identified the matrix element, I am 'hardcoding' the number "0.84". Frame analysis will be useful to see what is and what is not a matrix I guess. There are not that many variables, so just trying each in turn will work lol. I already know what elements not to use, i.e. the ones already being used in the shader, so it won't take long, half an hour tops.

Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278

#82
Posted 11/10/2015 09:13 PM   
[quote="Seregin"][quote="SKAUT"]I can wait for Real 3D fix and would advice that too - since I got a little bit upset when I get the Armour. Putting it on makes 3D completely flat or it is even switching to 2D. Looks shit. Broke my experience and good feeling about this game. I`ll get back only if you tell me how to take that off :) I`m guessing that rig in the workshop is made for it - am I right ?[/quote] Give a try o alternate CM setting I have proposed on page 5.[/quote] I don`t think that there is anyone who`s using different one then this. Anyway I have no problem with CM itself only that the whole 3D effect is gone when you wearing Power Armour. Simple as that. That`s why I have to take that off and I`ll be good.
Seregin said:
SKAUT said:I can wait for Real 3D fix and would advice that too - since I got a little bit upset when I get the Armour. Putting it on makes 3D completely flat or it is even switching to 2D. Looks shit. Broke my experience and good feeling about this game.
I`ll get back only if you tell me how to take that off :)
I`m guessing that rig in the workshop is made for it - am I right ?


Give a try o alternate CM setting I have proposed on page 5.


I don`t think that there is anyone who`s using different one then this.
Anyway I have no problem with CM itself only that the whole 3D effect is gone when you wearing Power Armour. Simple as that.
That`s why I have to take that off and I`ll be good.
IC. Haven't had Power Armor yet, so no idea how it looks like :) Will see shortly...
IC. Haven't had Power Armor yet, so no idea how it looks like :) Will see shortly...

ASUS Prime z370-A, i5 8600K, ASUS GTX 1080 Ti Strix, 16 GB DDR4, Corsair AX860i PSU, ASUS VG278HR, 3D Vision 2, Sound Blaster Z, Astro A50 Headphones, Windows 10 64-bit Home

#84
Posted 11/10/2015 10:14 PM   
[quote="mike_ar69"][quote="helifax"][quote="mike_ar69"] ... so I need to nail down the ProjMatrix[0].x element because I have hardcoded it for now. [/quote] Now that is interesting! How did you hardcode it if there aren't any headers in the shaders? Did you find one with the information and what registers is it stored in or another way? I haven't used it, but I tried one time, the frame analysis option that is in 3DMigoto. Problem is...I don't really have a clue on how to use it:)) and after a quick try I gave up (was a bit time pressured at the time). Did you use the frame analysis option to find out where the ProjMatrix is ? [/quote] No I have not identified the matrix element, I am 'hardcoding' the number "0.84". Frame analysis will be useful to see what is and what is not a matrix I guess. There are not that many variables, so just trying each in turn will work lol. I already know what elements not to use, i.e. the ones already being used in the shader, so it won't take long, half an hour tops. [/quote] Hahaha;)) I get it ;)) I bet that is the infamous "ProjMat.m00" one right (The FovH) ? That's why the ProjMatrix is needed...Hmm;)) Just as a quick idea: Did you try to search in all the shaders for a "proj" keyword? Maybe one of the shaders will have the information in which register is being stored? I am still downloading the game...(very slow for some reason..)
mike_ar69 said:
helifax said:
mike_ar69 said:
... so I need to nail down the ProjMatrix[0].x element because I have hardcoded it for now.


Now that is interesting! How did you hardcode it if there aren't any headers in the shaders? Did you find one with the information and what registers is it stored in or another way?
I haven't used it, but I tried one time, the frame analysis option that is in 3DMigoto. Problem is...I don't really have a clue on how to use it:)) and after a quick try I gave up (was a bit time pressured at the time).
Did you use the frame analysis option to find out where the ProjMatrix is ?


No I have not identified the matrix element, I am 'hardcoding' the number "0.84". Frame analysis will be useful to see what is and what is not a matrix I guess. There are not that many variables, so just trying each in turn will work lol. I already know what elements not to use, i.e. the ones already being used in the shader, so it won't take long, half an hour tops.


Hahaha;)) I get it ;)) I bet that is the infamous "ProjMat.m00" one right (The FovH) ? That's why the ProjMatrix is needed...Hmm;))

Just as a quick idea: Did you try to search in all the shaders for a "proj" keyword? Maybe one of the shaders will have the information in which register is being stored? I am still downloading the game...(very slow for some reason..)

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)

#85
Posted 11/10/2015 10:41 PM   
Game is looking great in 3D already! Until I got outside the Vault and found the clouds need some serious attention... Hope you guys can do your magic. Meanwhile set separation to minimum and then adjust convergence for 3D. Find file Fallout4Prefs.ini in C:\Users\YOU?\Documents\My Games\Fallout4 and set iShadowMapResolution=8
Game is looking great in 3D already!

Until I got outside the Vault and found the clouds need some serious attention...

Hope you guys can do your magic.

Meanwhile set separation to minimum and then adjust convergence for 3D.
Find file Fallout4Prefs.ini in C:\Users\YOU?\Documents\My Games\Fallout4 and set iShadowMapResolution=8

Win7 64 16GB I5-4570 Asus Z87-A
GTX 1080 Benq XL 27" 3DVision 2

#86
Posted 11/10/2015 10:42 PM   
@mike_ar69 / Helifax I will try the game later (i'm almost finish to download).....i can run the frame analysis to look the projection matrix. I can play with that "0.84" value....suppose that value is with default FOV and convergence?
@mike_ar69 / Helifax

I will try the game later (i'm almost finish to download).....i can run the frame analysis to look the projection matrix.

I can play with that "0.84" value....suppose that value is with default FOV and convergence?

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#87
Posted 11/10/2015 11:23 PM   
[quote="DHR"]@mike_ar69 / Helifax I will try the game later (i'm almost finish to download).....i can run the frame analysis to look the projection matrix. I can play with that "0.84" value....suppose that value is with default FOV and convergence? [/quote] I think so:) I remember that value being used in Lords of the Fallen fix;) There is a catch though;) In surround I basically had to multiply that value by 3 to align everything;) (Which makes sense that you are using 3 monitors ^_^).
DHR said:@mike_ar69 / Helifax

I will try the game later (i'm almost finish to download).....i can run the frame analysis to look the projection matrix.

I can play with that "0.84" value....suppose that value is with default FOV and convergence?


I think so:) I remember that value being used in Lords of the Fallen fix;) There is a catch though;) In surround I basically had to multiply that value by 3 to align everything;) (Which makes sense that you are using 3 monitors ^_^).

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)

#88
Posted 11/10/2015 11:56 PM   
The same as Dragon Age Inquisition by mike 69 pattern [code]float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11; uint4 bitmask, uiDest; float4 fDest; //Work out Inverse //...Variables float4 a1, a2, a3, a4; float4 b1, b2, b3, b4; float det; //...Original Matrix a1 = cb12[20].xyzw; a2 = cb12[21].xyzw; a3 = cb12[22].xyzw; a4 = cb12[23].xyzw; //...Determinant det = a1.x*(a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y)); det += a1.y*(a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.z) + a2.w*(a3.z*a4.x - a3.x*a4.z)); det += a1.z*(a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x)); det += a1.w*(a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y)); //...Inverse Matrix Elements b1.x = a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y); b1.y = a1.y*(a3.w*a4.z - a3.z*a4.w) + a1.z*(a3.y*a4.w - a3.w*a4.y) + a1.w*(a3.z*a4.y - a3.y*a4.z); b1.z = a1.y*(a2.z*a4.w - a2.w*a4.z) + a1.z*(a2.w*a4.y - a2.y*a4.w) + a1.w*(a2.y*a4.z - a2.z*a4.y); b1.w = a1.y*(a2.w*a3.z - a2.z*a3.w) + a1.z*(a2.y*a3.w - a2.w*a3.y) + a1.w*(a2.z*a3.y - a2.y*a3.z); b2.x = a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.x) + a2.w*(a3.z*a4.x - a3.x*a4.z); b2.y = a1.x*(a3.z*a4.w - a3.w*a4.z) + a1.z*(a3.w*a4.x - a3.x*a4.w) + a1.w*(a3.x*a4.z - a3.z*a4.x); b2.z = a1.x*(a2.w*a4.z - a2.z*a4.w) + a1.z*(a2.x*a4.w - a2.w*a4.x) + a1.w*(a2.z*a4.x - a2.x*a4.z); b2.w = a1.x*(a2.z*a3.w - a2.w*a3.z) + a1.z*(a2.w*a3.x - a2.x*a3.w) + a1.w*(a2.x*a3.z - a2.z*a3.x); b3.x = a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x); b3.y = a1.x*(a3.w*a4.y - a3.y*a4.w) + a1.y*(a3.x*a4.w - a3.w*a4.x) + a1.w*(a3.y*a4.x - a3.x*a4.y); b3.z = a1.x*(a2.y*a4.w - a2.w*a4.y) + a1.y*(a2.w*a4.x - a2.x*a4.w) + a1.w*(a2.x*a4.y - a2.y*a4.x); b3.w = a1.x*(a2.w*a3.y - a2.y*a3.w) + a1.y*(a2.x*a3.w - a2.w*a3.x) + a1.w*(a2.y*a3.x - a2.x*a3.y); b4.x = a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y); b4.y = a1.x*(a3.y*a4.z - a3.z*a4.y) + a1.y*(a3.z*a4.x - a3.x*a4.z) + a1.z*(a3.x*a4.y - a3.y*a4.x); b4.z = a1.x*(a2.z*a4.y - a2.y*a4.z) + a1.y*(a2.x*a4.z - a2.z*a4.x) + a1.z*(a2.y*a4.x - a2.x*a4.y); b4.w = a1.x*(a2.y*a3.z - a2.z*a3.y) + a1.y*(a2.z*a3.x - a2.x*a3.z) + a1.z*(a2.x*a3.y - a2.y*a3.x); b1.xyzw /= det; b2.xyzw /= det; b3.xyzw /= det; b4.xyzw /= det; //End Inverse r0.xy = cb2[27].xy * v0.xy; r0.xy = cb2[0].xy * r0.xy; r1.x = cb2[0].x * v0.x; r0.z = ddx_coarse(r0.x); r0.w = ddy_coarse(r0.y); r0.z = t3.SampleGrad(s3_s, r0.xy, r0.z, r0.w).x; r0.w = 0.00999999978 >= r0.z; if (r0.w != 0) { r2.z = 100 * r0.z; r3.xyzw = cb12[24].xyzw; r4.xyzw = cb12[25].xyzw; r5.xyzw = cb12[26].xyzw; r6.xyzw = cb12[27].xyzw; } else { r2.z = r0.z * 1.00999999 + -0.00999999978; r3.xyzw = cb12[20].xyzw; r4.xyzw = cb12[21].xyzw; r5.xyzw = cb12[22].xyzw; r6.xyzw = cb12[23].xyzw; } r1.z = -v0.y * cb2[0].y + 1; r2.xy = r1.xz * float2(2,2) + float2(-1,-1); r2.w = 1; r1.x = dot(r3.xyzw, r2.xyzw); r1.y = dot(r4.xyzw, r2.xyzw); r1.z = dot(r5.xyzw, r2.xyzw); r0.z = dot(r6.xyzw, r2.xyzw); float4 r28, r26, r27; r26.xyz = r1.xyz / r0.zzz; r26.w = 1.0; r28.x = dot(r26.xyzw, b1.xyzw); r28.y = dot(r26.xyzw, b2.xyzw); r28.z = dot(r26.xyzw, b3.xyzw); r28.w = dot(r26.xyzw, b4.xyzw); float4 stereo = StereoParams.Load(0); r28.x -= stereo.x * (r28.w - stereo.y); r26.x = dot(r28.xyzw, a1.xyzw); r26.y = dot(r28.xyzw, a2.xyzw); r26.z = dot(r28.xyzw, a3.xyzw); r26.w = dot(r28.xyzw, a4.xyzw); r1.xyz = r26.xyz * r0.zzz; r1.xyz = r1.xyz / r0.zzz;[/code] However, the ground reflection is a compiler bug. [code]Texture2D<float4> t12 : register(t12); Texture2D<float4> t11 : register(t11); Texture2D<float4> t9 : register(t9); Texture2D<float4> t7 : register(t7); Texture2D<float4> t1 : register(t1); SamplerState s12_s : register(s12); SamplerState s11_s : register(s11); SamplerState s9_s : register(s9); SamplerState s7_s : register(s7); SamplerState s1_s : register(s1); cbuffer cb2 : register(b2) { float4 cb2[6]; } cbuffer cb12 : register(b12) { float4 cb12[28]; } Texture2D<float4> StereoParams : register(t125); Texture1D<float4> IniParams : register(t120); void main( float4 v0 : SV_POSITION0, uint v1 : COLOR1, out float4 o0 : SV_Target0, out float4 o1 : SV_Target1, out float4 o2 : SV_Target2, out float4 o3 : SV_Target3) { float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12; uint4 bitmask, uiDest; float4 fDest; //Work out Inverse //...Variables float4 a1, a2, a3, a4; float4 b1, b2, b3, b4; float det; //...Original Matrix a1 = cb12[20].xyzw; a2 = cb12[21].xyzw; a3 = cb12[22].xyzw; a4 = cb12[23].xyzw; //...Determinant det = a1.x*(a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y)); det += a1.y*(a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.z) + a2.w*(a3.z*a4.x - a3.x*a4.z)); det += a1.z*(a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x)); det += a1.w*(a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y)); //...Inverse Matrix Elements b1.x = a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y); b1.y = a1.y*(a3.w*a4.z - a3.z*a4.w) + a1.z*(a3.y*a4.w - a3.w*a4.y) + a1.w*(a3.z*a4.y - a3.y*a4.z); b1.z = a1.y*(a2.z*a4.w - a2.w*a4.z) + a1.z*(a2.w*a4.y - a2.y*a4.w) + a1.w*(a2.y*a4.z - a2.z*a4.y); b1.w = a1.y*(a2.w*a3.z - a2.z*a3.w) + a1.z*(a2.y*a3.w - a2.w*a3.y) + a1.w*(a2.z*a3.y - a2.y*a3.z); b2.x = a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.x) + a2.w*(a3.z*a4.x - a3.x*a4.z); b2.y = a1.x*(a3.z*a4.w - a3.w*a4.z) + a1.z*(a3.w*a4.x - a3.x*a4.w) + a1.w*(a3.x*a4.z - a3.z*a4.x); b2.z = a1.x*(a2.w*a4.z - a2.z*a4.w) + a1.z*(a2.x*a4.w - a2.w*a4.x) + a1.w*(a2.z*a4.x - a2.x*a4.z); b2.w = a1.x*(a2.z*a3.w - a2.w*a3.z) + a1.z*(a2.w*a3.x - a2.x*a3.w) + a1.w*(a2.x*a3.z - a2.z*a3.x); b3.x = a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x); b3.y = a1.x*(a3.w*a4.y - a3.y*a4.w) + a1.y*(a3.x*a4.w - a3.w*a4.x) + a1.w*(a3.y*a4.x - a3.x*a4.y); b3.z = a1.x*(a2.y*a4.w - a2.w*a4.y) + a1.y*(a2.w*a4.x - a2.x*a4.w) + a1.w*(a2.x*a4.y - a2.y*a4.x); b3.w = a1.x*(a2.w*a3.y - a2.y*a3.w) + a1.y*(a2.x*a3.w - a2.w*a3.x) + a1.w*(a2.y*a3.x - a2.x*a3.y); b4.x = a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y); b4.y = a1.x*(a3.y*a4.z - a3.z*a4.y) + a1.y*(a3.z*a4.x - a3.x*a4.z) + a1.z*(a3.x*a4.y - a3.y*a4.x); b4.z = a1.x*(a2.z*a4.y - a2.y*a4.z) + a1.y*(a2.x*a4.z - a2.z*a4.x) + a1.z*(a2.y*a4.x - a2.x*a4.y); b4.w = a1.x*(a2.y*a3.z - a2.z*a3.y) + a1.y*(a2.z*a3.x - a2.x*a3.z) + a1.z*(a2.x*a3.y - a2.y*a3.x); b1.xyzw /= det; b2.xyzw /= det; b3.xyzw /= det; b4.xyzw /= det; //End Inverse // Missing reflection info for shader. No names possible. // Known bad code for instruction (needs manual fix): // ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r0.xyzw, v1.x, l(0), t8.xyzw r0.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r0.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r0.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r0.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; // Missing reflection info for shader. No names possible. // Known bad code for instruction (needs manual fix): // ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r1.xyzw, v1.x, l(16), t8.xyzw r1.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r1.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r1.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r1.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; // Missing reflection info for shader. No names possible. // Known bad code for instruction (needs manual fix): // ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r2.xyzw, v1.x, l(32), t8.xyzw r2.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r2.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r2.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r2.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; // Missing reflection info for shader. No names possible. // Known bad code for instruction (needs manual fix): // ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r3.xyz, v1.x, l(144), t8.xyzx r3.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r3.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r3.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; // Missing reflection info for shader. No names possible. // Known bad code for instruction (needs manual fix): // ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r4.xyz, v1.x, l(160), t8.xyzx r4.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r4.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r4.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; // Missing reflection info for shader. No names possible. // Known bad code for instruction (needs manual fix): // ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r5.xyzw, v1.x, l(192), t8.xyzw r5.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r5.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r5.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r5.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; // Missing reflection info for shader. No names possible. // Known bad code for instruction (needs manual fix): // ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r3.w, v1.x, l(220), t8.xxxx r3.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz; r6.xy = cb2[0].xy * v0.xy; r4.w = t7.SampleLevel(s7_s, r6.xy, 0).x; r6.zw = t1.SampleLevel(s1_s, r6.xy, 0).xy; r6.zw = r6.zw * float2(4,4) + float2(-2,-2); r7.x = dot(r6.zw, r6.zw); r7.xy = -r7.xx * float2(0.25,0.5) + float2(1,1); r7.x = sqrt(r7.x); r8.xy = r7.xx * r6.zw; r8.z = -r7.y; r6.z = 0.00999999978 >= r4.w; if (r6.z != 0) { r7.z = 100 * r4.w; r9.xyzw = cb12[24].xyzw; r10.xyzw = cb12[25].xyzw; r11.xyzw = cb12[26].xyzw; r12.xyzw = cb12[27].xyzw; } else { r7.z = r4.w * 1.00999999 + -0.00999999978; r9.xyzw = cb12[20].xyzw; r10.xyzw = cb12[21].xyzw; r11.xyzw = cb12[22].xyzw; r12.xyzw = cb12[23].xyzw; } r6.x = cb2[5].x * r6.x; r6.z = -r6.y * cb2[5].y + 1; r7.xy = r6.xz * float2(2,2) + float2(-1,-1); r7.w = 1; r6.x = dot(r9.xyzw, r7.xyzw); r6.y = dot(r10.xyzw, r7.xyzw); r6.z = dot(r11.xyzw, r7.xyzw); r4.w = dot(r12.xyzw, r7.xyzw); float4 r28, r26, r27; r26.xyz = r6.xyz / r4.www; r26.w = 1.0; r28.x = dot(r26.xyzw, b1.xyzw); r28.y = dot(r26.xyzw, b2.xyzw); r28.z = dot(r26.xyzw, b3.xyzw); r28.w = dot(r26.xyzw, b4.xyzw); float4 stereo = StereoParams.Load(0); r28.x -= stereo.x * (r28.w - stereo.y); r26.x = dot(r28.xyzw, a1.xyzw); r26.y = dot(r28.xyzw, a2.xyzw); r26.z = dot(r28.xyzw, a3.xyzw); r26.w = dot(r28.xyzw, a4.xyzw); r6.xyz = r26.xyz * r4.www; r6.xyz = r6.xyz / r4.www; r6.w = 1; r0.x = dot(r0.xyzw, r6.xyzw); r0.y = dot(r1.xyzw, r6.xyzw); r0.z = dot(r2.xyzw, r6.xyzw); r1.xy = r0.xy + -r5.xy; r1.xy = r1.xy < float2(0,0); r0.w = (int)r1.y | (int)r1.x; if (r0.w != 0) discard; r1.xy = r5.zw + -r0.xy; r1.xy = r1.xy < float2(0,0); r0.w = (int)r1.y | (int)r1.x; if (r0.w != 0) discard; r0.w = 1 + -r0.z; r0.zw = r0.zw < float2(0,0); if (r0.w != 0) discard; if (r0.z != 0) discard; r0.z = t9.CalculateLevelOfDetail(s9_s, r0.xy); r0.w = dot(-r2.xyz, -r2.xyz); r0.w = rsqrt(r0.w); r1.xyz = -r2.xyz * r0.www; r2.xyz = ddx_coarse(r6.zxy); r0.w = dot(r2.xyz, r2.xyz); r0.w = rsqrt(r0.w); r2.xyz = r2.xyz * r0.www; r5.xyz = ddy_coarse(r6.yzx); r0.w = dot(r5.xyz, r5.xyz); r0.w = rsqrt(r0.w); r5.xyz = r5.xyz * r0.www; r6.xyz = r5.xyz * r2.xyz; r2.xyz = r2.zxy * r5.yzx + -r6.xyz; r0.w = dot(r2.xyz, r2.xyz); r0.w = rsqrt(r0.w); r2.xyz = r2.xyz * r0.www; r0.w = dot(r2.xyz, r1.xyz); r0.w = -0.300000012 + r0.w; r0.w = r0.w < 0; r1.x = dot(r1.xyz, r8.xyz); r1.x = -0.300000012 + r1.x; r1.y = r1.x < 0; r1.y = r0.w ? r1.y : 0; if (r1.y != 0) discard; r2.xyzw = t9.SampleLevel(s9_s, r0.xy, r0.z).xyzw; r1.yz = t12.SampleLevel(s12_s, r0.xy, r0.z).xy; r0.xy = t11.SampleLevel(s11_s, r0.xy, r0.z).xy; r0.z = max(0, r1.x); r0.z = min(0.25, r0.z); r0.z = r0.w ? r0.z : 0.25; r0.z = r0.z * r2.w; r0.w = 4 * r0.z; r0.z = r0.z * 4 + -0.0156862754; r0.z = r0.z < 0; if (r0.z != 0) discard; r0.z = r0.w * r3.w; r5.xy = r0.xy * float2(2,2) + float2(-1,-1); r0.x = dot(r5.xy, r5.xy); r0.x = 1 + -r0.x; r0.x = max(0, r0.x); r5.z = sqrt(r0.x); r0.xyw = r4.yzx * r3.xyz; r0.xyw = r4.xyz * r3.yzx + -r0.xyw; r3.xyz = r0.xyw * -r4.yzx; r3.xyz = r0.wxy * -r4.zxy + -r3.xyz; r6.x = r0.y; r6.y = r3.x; r6.z = r4.x; r6.x = dot(r5.xyz, r6.xyz); r7.x = r0.w; r7.y = r3.y; r7.z = r4.y; r6.y = dot(r5.xyz, r7.xyz); r4.x = r0.x; r4.y = r3.z; r6.z = dot(r5.xyz, r4.xyz); r0.x = dot(r6.xyz, r6.xyz); r0.x = rsqrt(r0.x); r0.xyw = r6.xyz * r0.xxx; o1.z = -r0.w; r0.w = r0.w * -8 + 8; r0.w = sqrt(r0.w); r0.xy = r0.xy / r0.ww; o1.xy = float2(0.5,0.5) + r0.xy; r0.x = 0.0199999996 * cb2[3].x; o2.z = sqrt(r0.x); o2.w = saturate(cb2[3].y); o0.xyz = r2.xyz; o0.w = r0.z; o1.w = r0.z; o2.x = 0; o2.y = 0.00392156886 * cb2[3].y; o3.xy = r1.yz; o3.z = 0; o3.w = r0.z; return; }[/code]
The same as Dragon Age Inquisition by mike 69 pattern
float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11;
uint4 bitmask, uiDest;
float4 fDest;

//Work out Inverse
//...Variables
float4 a1, a2, a3, a4;
float4 b1, b2, b3, b4;
float det;
//...Original Matrix
a1 = cb12[20].xyzw;
a2 = cb12[21].xyzw;
a3 = cb12[22].xyzw;
a4 = cb12[23].xyzw;
//...Determinant
det = a1.x*(a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y));
det += a1.y*(a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.z) + a2.w*(a3.z*a4.x - a3.x*a4.z));
det += a1.z*(a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x));
det += a1.w*(a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y));
//...Inverse Matrix Elements
b1.x = a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y);
b1.y = a1.y*(a3.w*a4.z - a3.z*a4.w) + a1.z*(a3.y*a4.w - a3.w*a4.y) + a1.w*(a3.z*a4.y - a3.y*a4.z);
b1.z = a1.y*(a2.z*a4.w - a2.w*a4.z) + a1.z*(a2.w*a4.y - a2.y*a4.w) + a1.w*(a2.y*a4.z - a2.z*a4.y);
b1.w = a1.y*(a2.w*a3.z - a2.z*a3.w) + a1.z*(a2.y*a3.w - a2.w*a3.y) + a1.w*(a2.z*a3.y - a2.y*a3.z);
b2.x = a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.x) + a2.w*(a3.z*a4.x - a3.x*a4.z);
b2.y = a1.x*(a3.z*a4.w - a3.w*a4.z) + a1.z*(a3.w*a4.x - a3.x*a4.w) + a1.w*(a3.x*a4.z - a3.z*a4.x);
b2.z = a1.x*(a2.w*a4.z - a2.z*a4.w) + a1.z*(a2.x*a4.w - a2.w*a4.x) + a1.w*(a2.z*a4.x - a2.x*a4.z);
b2.w = a1.x*(a2.z*a3.w - a2.w*a3.z) + a1.z*(a2.w*a3.x - a2.x*a3.w) + a1.w*(a2.x*a3.z - a2.z*a3.x);
b3.x = a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x);
b3.y = a1.x*(a3.w*a4.y - a3.y*a4.w) + a1.y*(a3.x*a4.w - a3.w*a4.x) + a1.w*(a3.y*a4.x - a3.x*a4.y);
b3.z = a1.x*(a2.y*a4.w - a2.w*a4.y) + a1.y*(a2.w*a4.x - a2.x*a4.w) + a1.w*(a2.x*a4.y - a2.y*a4.x);
b3.w = a1.x*(a2.w*a3.y - a2.y*a3.w) + a1.y*(a2.x*a3.w - a2.w*a3.x) + a1.w*(a2.y*a3.x - a2.x*a3.y);
b4.x = a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y);
b4.y = a1.x*(a3.y*a4.z - a3.z*a4.y) + a1.y*(a3.z*a4.x - a3.x*a4.z) + a1.z*(a3.x*a4.y - a3.y*a4.x);
b4.z = a1.x*(a2.z*a4.y - a2.y*a4.z) + a1.y*(a2.x*a4.z - a2.z*a4.x) + a1.z*(a2.y*a4.x - a2.x*a4.y);
b4.w = a1.x*(a2.y*a3.z - a2.z*a3.y) + a1.y*(a2.z*a3.x - a2.x*a3.z) + a1.z*(a2.x*a3.y - a2.y*a3.x);
b1.xyzw /= det;
b2.xyzw /= det;
b3.xyzw /= det;
b4.xyzw /= det;
//End Inverse

r0.xy = cb2[27].xy * v0.xy;
r0.xy = cb2[0].xy * r0.xy;
r1.x = cb2[0].x * v0.x;
r0.z = ddx_coarse(r0.x);
r0.w = ddy_coarse(r0.y);
r0.z = t3.SampleGrad(s3_s, r0.xy, r0.z, r0.w).x;
r0.w = 0.00999999978 >= r0.z;
if (r0.w != 0) {
r2.z = 100 * r0.z;
r3.xyzw = cb12[24].xyzw;
r4.xyzw = cb12[25].xyzw;
r5.xyzw = cb12[26].xyzw;
r6.xyzw = cb12[27].xyzw;
} else {
r2.z = r0.z * 1.00999999 + -0.00999999978;
r3.xyzw = cb12[20].xyzw;
r4.xyzw = cb12[21].xyzw;
r5.xyzw = cb12[22].xyzw;
r6.xyzw = cb12[23].xyzw;
}
r1.z = -v0.y * cb2[0].y + 1;
r2.xy = r1.xz * float2(2,2) + float2(-1,-1);
r2.w = 1;
r1.x = dot(r3.xyzw, r2.xyzw);
r1.y = dot(r4.xyzw, r2.xyzw);
r1.z = dot(r5.xyzw, r2.xyzw);
r0.z = dot(r6.xyzw, r2.xyzw);

float4 r28, r26, r27;
r26.xyz = r1.xyz / r0.zzz;
r26.w = 1.0;
r28.x = dot(r26.xyzw, b1.xyzw);
r28.y = dot(r26.xyzw, b2.xyzw);
r28.z = dot(r26.xyzw, b3.xyzw);
r28.w = dot(r26.xyzw, b4.xyzw);
float4 stereo = StereoParams.Load(0);
r28.x -= stereo.x * (r28.w - stereo.y);
r26.x = dot(r28.xyzw, a1.xyzw);
r26.y = dot(r28.xyzw, a2.xyzw);
r26.z = dot(r28.xyzw, a3.xyzw);
r26.w = dot(r28.xyzw, a4.xyzw);
r1.xyz = r26.xyz * r0.zzz;

r1.xyz = r1.xyz / r0.zzz;



However, the ground reflection is a compiler bug.

Texture2D<float4> t12 : register(t12);

Texture2D<float4> t11 : register(t11);

Texture2D<float4> t9 : register(t9);

Texture2D<float4> t7 : register(t7);

Texture2D<float4> t1 : register(t1);

SamplerState s12_s : register(s12);

SamplerState s11_s : register(s11);

SamplerState s9_s : register(s9);

SamplerState s7_s : register(s7);

SamplerState s1_s : register(s1);

cbuffer cb2 : register(b2)
{
float4 cb2[6];
}

cbuffer cb12 : register(b12)
{
float4 cb12[28];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
float4 v0 : SV_POSITION0,
uint v1 : COLOR1,
out float4 o0 : SV_Target0,
out float4 o1 : SV_Target1,
out float4 o2 : SV_Target2,
out float4 o3 : SV_Target3)
{
float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12;
uint4 bitmask, uiDest;
float4 fDest;

//Work out Inverse
//...Variables
float4 a1, a2, a3, a4;
float4 b1, b2, b3, b4;
float det;
//...Original Matrix
a1 = cb12[20].xyzw;
a2 = cb12[21].xyzw;
a3 = cb12[22].xyzw;
a4 = cb12[23].xyzw;
//...Determinant
det = a1.x*(a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y));
det += a1.y*(a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.z) + a2.w*(a3.z*a4.x - a3.x*a4.z));
det += a1.z*(a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x));
det += a1.w*(a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y));
//...Inverse Matrix Elements
b1.x = a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y);
b1.y = a1.y*(a3.w*a4.z - a3.z*a4.w) + a1.z*(a3.y*a4.w - a3.w*a4.y) + a1.w*(a3.z*a4.y - a3.y*a4.z);
b1.z = a1.y*(a2.z*a4.w - a2.w*a4.z) + a1.z*(a2.w*a4.y - a2.y*a4.w) + a1.w*(a2.y*a4.z - a2.z*a4.y);
b1.w = a1.y*(a2.w*a3.z - a2.z*a3.w) + a1.z*(a2.y*a3.w - a2.w*a3.y) + a1.w*(a2.z*a3.y - a2.y*a3.z);
b2.x = a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.x) + a2.w*(a3.z*a4.x - a3.x*a4.z);
b2.y = a1.x*(a3.z*a4.w - a3.w*a4.z) + a1.z*(a3.w*a4.x - a3.x*a4.w) + a1.w*(a3.x*a4.z - a3.z*a4.x);
b2.z = a1.x*(a2.w*a4.z - a2.z*a4.w) + a1.z*(a2.x*a4.w - a2.w*a4.x) + a1.w*(a2.z*a4.x - a2.x*a4.z);
b2.w = a1.x*(a2.z*a3.w - a2.w*a3.z) + a1.z*(a2.w*a3.x - a2.x*a3.w) + a1.w*(a2.x*a3.z - a2.z*a3.x);
b3.x = a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x);
b3.y = a1.x*(a3.w*a4.y - a3.y*a4.w) + a1.y*(a3.x*a4.w - a3.w*a4.x) + a1.w*(a3.y*a4.x - a3.x*a4.y);
b3.z = a1.x*(a2.y*a4.w - a2.w*a4.y) + a1.y*(a2.w*a4.x - a2.x*a4.w) + a1.w*(a2.x*a4.y - a2.y*a4.x);
b3.w = a1.x*(a2.w*a3.y - a2.y*a3.w) + a1.y*(a2.x*a3.w - a2.w*a3.x) + a1.w*(a2.y*a3.x - a2.x*a3.y);
b4.x = a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y);
b4.y = a1.x*(a3.y*a4.z - a3.z*a4.y) + a1.y*(a3.z*a4.x - a3.x*a4.z) + a1.z*(a3.x*a4.y - a3.y*a4.x);
b4.z = a1.x*(a2.z*a4.y - a2.y*a4.z) + a1.y*(a2.x*a4.z - a2.z*a4.x) + a1.z*(a2.y*a4.x - a2.x*a4.y);
b4.w = a1.x*(a2.y*a3.z - a2.z*a3.y) + a1.y*(a2.z*a3.x - a2.x*a3.z) + a1.z*(a2.x*a3.y - a2.y*a3.x);
b1.xyzw /= det;
b2.xyzw /= det;
b3.xyzw /= det;
b4.xyzw /= det;
//End Inverse

// Missing reflection info for shader. No names possible.
// Known bad code for instruction (needs manual fix):
// ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r0.xyzw, v1.x, l(0), t8.xyzw
r0.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r0.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r0.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r0.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
// Missing reflection info for shader. No names possible.
// Known bad code for instruction (needs manual fix):
// ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r1.xyzw, v1.x, l(16), t8.xyzw
r1.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r1.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r1.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r1.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
// Missing reflection info for shader. No names possible.
// Known bad code for instruction (needs manual fix):
// ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r2.xyzw, v1.x, l(32), t8.xyzw
r2.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r2.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r2.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r2.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
// Missing reflection info for shader. No names possible.
// Known bad code for instruction (needs manual fix):
// ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r3.xyz, v1.x, l(144), t8.xyzx
r3.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r3.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r3.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
// Missing reflection info for shader. No names possible.
// Known bad code for instruction (needs manual fix):
// ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r4.xyz, v1.x, l(160), t8.xyzx
r4.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r4.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r4.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
// Missing reflection info for shader. No names possible.
// Known bad code for instruction (needs manual fix):
// ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r5.xyzw, v1.x, l(192), t8.xyzw
r5.x = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r5.y = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r5.z = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r5.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
// Missing reflection info for shader. No names possible.
// Known bad code for instruction (needs manual fix):
// ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r3.w, v1.x, l(220), t8.xxxx
r3.w = no_StructuredBufferName[no_srcAddressRegister].no_srcByteOffsetName.swiz;
r6.xy = cb2[0].xy * v0.xy;
r4.w = t7.SampleLevel(s7_s, r6.xy, 0).x;
r6.zw = t1.SampleLevel(s1_s, r6.xy, 0).xy;
r6.zw = r6.zw * float2(4,4) + float2(-2,-2);
r7.x = dot(r6.zw, r6.zw);
r7.xy = -r7.xx * float2(0.25,0.5) + float2(1,1);
r7.x = sqrt(r7.x);
r8.xy = r7.xx * r6.zw;
r8.z = -r7.y;
r6.z = 0.00999999978 >= r4.w;
if (r6.z != 0) {
r7.z = 100 * r4.w;
r9.xyzw = cb12[24].xyzw;
r10.xyzw = cb12[25].xyzw;
r11.xyzw = cb12[26].xyzw;
r12.xyzw = cb12[27].xyzw;
} else {
r7.z = r4.w * 1.00999999 + -0.00999999978;
r9.xyzw = cb12[20].xyzw;
r10.xyzw = cb12[21].xyzw;
r11.xyzw = cb12[22].xyzw;
r12.xyzw = cb12[23].xyzw;
}
r6.x = cb2[5].x * r6.x;
r6.z = -r6.y * cb2[5].y + 1;
r7.xy = r6.xz * float2(2,2) + float2(-1,-1);
r7.w = 1;
r6.x = dot(r9.xyzw, r7.xyzw);
r6.y = dot(r10.xyzw, r7.xyzw);
r6.z = dot(r11.xyzw, r7.xyzw);
r4.w = dot(r12.xyzw, r7.xyzw);

float4 r28, r26, r27;
r26.xyz = r6.xyz / r4.www;
r26.w = 1.0;
r28.x = dot(r26.xyzw, b1.xyzw);
r28.y = dot(r26.xyzw, b2.xyzw);
r28.z = dot(r26.xyzw, b3.xyzw);
r28.w = dot(r26.xyzw, b4.xyzw);
float4 stereo = StereoParams.Load(0);
r28.x -= stereo.x * (r28.w - stereo.y);
r26.x = dot(r28.xyzw, a1.xyzw);
r26.y = dot(r28.xyzw, a2.xyzw);
r26.z = dot(r28.xyzw, a3.xyzw);
r26.w = dot(r28.xyzw, a4.xyzw);
r6.xyz = r26.xyz * r4.www;

r6.xyz = r6.xyz / r4.www;
r6.w = 1;
r0.x = dot(r0.xyzw, r6.xyzw);
r0.y = dot(r1.xyzw, r6.xyzw);
r0.z = dot(r2.xyzw, r6.xyzw);
r1.xy = r0.xy + -r5.xy;
r1.xy = r1.xy < float2(0,0);
r0.w = (int)r1.y | (int)r1.x;
if (r0.w != 0) discard;
r1.xy = r5.zw + -r0.xy;
r1.xy = r1.xy < float2(0,0);
r0.w = (int)r1.y | (int)r1.x;
if (r0.w != 0) discard;
r0.w = 1 + -r0.z;
r0.zw = r0.zw < float2(0,0);
if (r0.w != 0) discard;
if (r0.z != 0) discard;
r0.z = t9.CalculateLevelOfDetail(s9_s, r0.xy);
r0.w = dot(-r2.xyz, -r2.xyz);
r0.w = rsqrt(r0.w);
r1.xyz = -r2.xyz * r0.www;
r2.xyz = ddx_coarse(r6.zxy);
r0.w = dot(r2.xyz, r2.xyz);
r0.w = rsqrt(r0.w);
r2.xyz = r2.xyz * r0.www;
r5.xyz = ddy_coarse(r6.yzx);
r0.w = dot(r5.xyz, r5.xyz);
r0.w = rsqrt(r0.w);
r5.xyz = r5.xyz * r0.www;
r6.xyz = r5.xyz * r2.xyz;
r2.xyz = r2.zxy * r5.yzx + -r6.xyz;
r0.w = dot(r2.xyz, r2.xyz);
r0.w = rsqrt(r0.w);
r2.xyz = r2.xyz * r0.www;
r0.w = dot(r2.xyz, r1.xyz);
r0.w = -0.300000012 + r0.w;
r0.w = r0.w < 0;
r1.x = dot(r1.xyz, r8.xyz);
r1.x = -0.300000012 + r1.x;
r1.y = r1.x < 0;
r1.y = r0.w ? r1.y : 0;
if (r1.y != 0) discard;
r2.xyzw = t9.SampleLevel(s9_s, r0.xy, r0.z).xyzw;
r1.yz = t12.SampleLevel(s12_s, r0.xy, r0.z).xy;
r0.xy = t11.SampleLevel(s11_s, r0.xy, r0.z).xy;
r0.z = max(0, r1.x);
r0.z = min(0.25, r0.z);
r0.z = r0.w ? r0.z : 0.25;
r0.z = r0.z * r2.w;
r0.w = 4 * r0.z;
r0.z = r0.z * 4 + -0.0156862754;
r0.z = r0.z < 0;
if (r0.z != 0) discard;
r0.z = r0.w * r3.w;
r5.xy = r0.xy * float2(2,2) + float2(-1,-1);
r0.x = dot(r5.xy, r5.xy);
r0.x = 1 + -r0.x;
r0.x = max(0, r0.x);
r5.z = sqrt(r0.x);
r0.xyw = r4.yzx * r3.xyz;
r0.xyw = r4.xyz * r3.yzx + -r0.xyw;
r3.xyz = r0.xyw * -r4.yzx;
r3.xyz = r0.wxy * -r4.zxy + -r3.xyz;
r6.x = r0.y;
r6.y = r3.x;
r6.z = r4.x;
r6.x = dot(r5.xyz, r6.xyz);
r7.x = r0.w;
r7.y = r3.y;
r7.z = r4.y;
r6.y = dot(r5.xyz, r7.xyz);
r4.x = r0.x;
r4.y = r3.z;
r6.z = dot(r5.xyz, r4.xyz);
r0.x = dot(r6.xyz, r6.xyz);
r0.x = rsqrt(r0.x);
r0.xyw = r6.xyz * r0.xxx;
o1.z = -r0.w;
r0.w = r0.w * -8 + 8;
r0.w = sqrt(r0.w);
r0.xy = r0.xy / r0.ww;
o1.xy = float2(0.5,0.5) + r0.xy;
r0.x = 0.0199999996 * cb2[3].x;
o2.z = sqrt(r0.x);
o2.w = saturate(cb2[3].y);
o0.xyz = r2.xyz;
o0.w = r0.z;
o1.w = r0.z;
o2.x = 0;
o2.y = 0.00392156886 * cb2[3].y;
o3.xy = r1.yz;
o3.z = 0;
o3.w = r0.z;
return;
}

#89
Posted 11/11/2015 12:12 AM   
Listen to Seregin
Listen to Seregin

#90
Posted 11/11/2015 12:22 AM   
  6 / 44    
Scroll To Top