Mass Effect: Andromeda - 3D Vision Fix (3D Vision Partial-fix released)
  18 / 27    
Hi helifax. This Compute Shader hack you've done looks great! I would very much be interested in this fix if you're happy to share it with us. Thanks again for working on this :-)
Hi helifax. This Compute Shader hack you've done looks great! I would very much be interested in this fix if you're happy to share it with us. Thanks again for working on this :-)

Posted 04/22/2017 12:05 AM   
[quote="helifax"]https://www.youtube.com/watch?v=5kQmx_vlINE&feature=youtu.be What I managed to fix so far related to Compute Shader lights. Anyone interested in a fix like this?[/quote] What an amazing progress Heli !! RESPECT !! This is much better than going without the lights !! If there is REALY an area that is too much annoing with the light poping in or the boxes, we can go with CM for this one but your current state is a huge improvement that will lower the effort to make the game looking good, dependend on the location. I realy appreciate this work and like it verry much !! I want to start MEA today (realy playing).... I have automated the switching of CM and back, changed the UI depth for my prefered view and so on so..... YOU ARE THE LAST ONE that I am waiting for to start ... I'll wait until you will relase the new hacked version of your semi fix!!!!!! The semi becomes more and more less semi I think :-)
helifax said:;feature=youtu.be

What I managed to fix so far related to Compute Shader lights.
Anyone interested in a fix like this?


What an amazing progress Heli !! RESPECT !! This is much better than going without the lights !! If there is REALY an area that is too much annoing with the light poping in or the boxes, we can go with CM for this one but your current state is a huge improvement that will lower the effort to make the game looking good, dependend on the location.

I realy appreciate this work and like it verry much !! I want to start MEA today (realy playing).... I have automated the switching of CM and back, changed the UI depth for my prefered view and so on so..... YOU ARE THE LAST ONE that I am waiting for to start ... I'll wait until you will relase the new hacked version of your semi fix!!!!!! The semi becomes more and more less semi I think :-)

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 04/22/2017 07:07 AM   
Thanks guys! I managed to remove the annoying box that you sometimes see (shown in the video) so the image is now "clear" in all positions! Yey ^_^ The overall image quality also greatly improved;) Working on how to make the fix toggle-able to switch between Geometry 3D and CM mode, but that Compute shader simply doesn't like to play nicely! Grr.. @Losti: I'll try to make a release today, but don't want to rush things;) I think is enough for me to break my eyes making the fix than putting everyone through the same process:))
Thanks guys!

I managed to remove the annoying box that you sometimes see (shown in the video) so the image is now "clear" in all positions! Yey ^_^
The overall image quality also greatly improved;)

Working on how to make the fix toggle-able to switch between Geometry 3D and CM mode, but that Compute shader simply doesn't like to play nicely! Grr..

@Losti:
I'll try to make a release today, but don't want to rush things;) I think is enough for me to break my eyes making the fix than putting everyone through the same process:))

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 04/22/2017 11:45 AM   
[quote="helifax"]Thanks guys! I managed to remove the annoying box that you sometimes see (shown in the video) so the image is now "clear" in all positions! Yey ^_^ The overall image quality also greatly improved;) Working on how to make the fix toggle-able to switch between Geometry 3D and CM mode, but that Compute shader simply doesn't like to play nicely! Grr.. @Losti: I'll try to make a release today, but don't want to rush things;) I think is enough for me to break my eyes making the fix than putting everyone through the same process:)) [/quote] YAY you are the master °_° I will just waiting :-) OK given, if i could have a not "perfect" version i could make my adaptions with sweetFX lightening, UI depth and automation for switching ^^ As an idea, if you cant manage the switching, i can use autohotkey or game profiller that will copy the CS as it is original when i press a key and than reload and than switching to CM ^^ BUT i think you can manage it in elegant way, you cam that far to a real fix, i think you manage this "little" problem in any way ^^ ---------------------------- As an idea, can you make 2 shader files in one file .... so i mean the original and the changed one and set a parameter that will enable the one, and a parameter that will enable the other one ?? So IF x = 1, than go with this part of the file, and of X = 2 than go with the other part.... hope you will understand me ^^
helifax said:Thanks guys!

I managed to remove the annoying box that you sometimes see (shown in the video) so the image is now "clear" in all positions! Yey ^_^
The overall image quality also greatly improved;)

Working on how to make the fix toggle-able to switch between Geometry 3D and CM mode, but that Compute shader simply doesn't like to play nicely! Grr..

@Losti:
I'll try to make a release today, but don't want to rush things;) I think is enough for me to break my eyes making the fix than putting everyone through the same process:))


YAY you are the master °_°

I will just waiting :-)

OK given, if i could have a not "perfect" version i could make my adaptions with sweetFX lightening, UI depth and automation for switching ^^

As an idea, if you cant manage the switching, i can use autohotkey or game profiller that will copy the CS as it is original when i press a key and than reload and than switching to CM ^^

BUT i think you can manage it in elegant way, you cam that far to a real fix, i think you manage this "little" problem in any way ^^

----------------------------

As an idea,

can you make 2 shader files in one file .... so i mean the original and the changed one and set a parameter that will enable the one, and a parameter that will enable the other one ??

So IF x = 1, than go with this part of the file, and of X = 2 than go with the other part.... hope you will understand me ^^

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 04/22/2017 12:07 PM   
Any hint on the release "date" for the next version ^^ :-)
Any hint on the release "date" for the next version ^^ :-)

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 04/23/2017 09:08 AM   
[quote="Losti"]Any hint on the release "date" for the next version ^^ :-)[/quote] Yeah, sorry! Did lots of more tested yesterday and then got side-tracked. I'll wrap everything today and release it;)
Losti said:Any hint on the release "date" for the next version ^^ :-)


Yeah, sorry! Did lots of more tested yesterday and then got side-tracked.
I'll wrap everything today and release it;)

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 04/23/2017 10:57 AM   
Awesome. Thanks very much helifax.
Awesome. Thanks very much helifax.

Posted 04/23/2017 11:33 AM   
YEAHHH I can not wait any longer :-) Actually controlling my students master thesis in the absence of an option to play with the new proper fix ^^
YEAHHH I can not wait any longer :-)

Actually controlling my students master thesis in the absence of an option to play with the new proper fix ^^

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 04/23/2017 11:36 AM   
New Fix is up: version 0.60. Refixed a few of the CS as they were a bit wrong before, new lights/shadows PS fixed shaders and ofc the Compute Shaders hack ;) Added a separate fix description for this one. Previous fix is still on the same page. - Completely uninstall your previous fix (if any). - Update your ini file if required. - Read the key shortcuts (they got updated) - Made a new quick video (on the first page) if you want to see what to expect before trying it out. - Give it a go and let me know what you think:) Cheers! Helifax
New Fix is up: version 0.60. Refixed a few of the CS as they were a bit wrong before, new lights/shadows PS fixed shaders and ofc the Compute Shaders hack ;)
Added a separate fix description for this one. Previous fix is still on the same page.

- Completely uninstall your previous fix (if any).
- Update your ini file if required.
- Read the key shortcuts (they got updated)
- Made a new quick video (on the first page) if you want to see what to expect before trying it out.
- Give it a go and let me know what you think:)

Cheers!
Helifax

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 04/23/2017 02:06 PM   
[quote="helifax"]New Fix is up: version 0.60. Refixed a few of the CS as they were a bit wrong before, new lights/shadows PS fixed shaders and ofc the Compute Shaders hack ;) Added a separate fix description for this one. Previous fix is still on the same page. - Completely uninstall your previous fix (if any). - Update your ini file if required. - Read the key shortcuts (they got updated) - Made a new quick video (on the first page) if you want to see what to expect before trying it out. - Give it a go and let me know what you think:) Cheers! Helifax[/quote] YAYYYYYYYYYYYYYYY just watching the video !! AND THAN LETS PLAY !!!!!! [img]http://img.dooyoo.de/DE_DE/orig/1/1/3/3/7/1133728.jpg[/img]
helifax said:New Fix is up: version 0.60. Refixed a few of the CS as they were a bit wrong before, new lights/shadows PS fixed shaders and ofc the Compute Shaders hack ;)
Added a separate fix description for this one. Previous fix is still on the same page.

- Completely uninstall your previous fix (if any).
- Update your ini file if required.
- Read the key shortcuts (they got updated)
- Made a new quick video (on the first page) if you want to see what to expect before trying it out.
- Give it a go and let me know what you think:)

Cheers!
Helifax


YAYYYYYYYYYYYYYYY just watching the video !! AND THAN LETS PLAY !!!!!!

Image

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 04/23/2017 02:30 PM   
If i turn of 3DV and the fix and switch to CM, the lights are back and do not pop in ?
If i turn of 3DV and the fix and switch to CM, the lights are back and do not pop in ?

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 04/23/2017 04:22 PM   
[quote="Losti"]If i turn of 3DV and the fix and switch to CM, the lights are back and do not pop in ?[/quote] Yes. Or you can disable the Compute Shaders like before and still use the fix without any lights. You can also enable the Computes only during Cinematics to get the lights back and play the rest of the game without CS on and using the override brightness function. Or you can stick with CM;) I've actually replayed a big chunk of the game with the current fix and is I find it perfectly playable;) IT boils down to how annoying you find those lights appearing and disappearing:)
Losti said:If i turn of 3DV and the fix and switch to CM, the lights are back and do not pop in ?

Yes.
Or you can disable the Compute Shaders like before and still use the fix without any lights.
You can also enable the Computes only during Cinematics to get the lights back and play the rest of the game without CS on and using the override brightness function.

Or you can stick with CM;)
I've actually replayed a big chunk of the game with the current fix and is I find it perfectly playable;)
IT boils down to how annoying you find those lights appearing and disappearing:)

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 04/23/2017 04:34 PM   
[quote="helifax"][quote="Losti"]If i turn of 3DV and the fix and switch to CM, the lights are back and do not pop in ?[/quote] Yes. Or you can disable the Compute Shaders like before and still use the fix without any lights. You can also enable the Computes only during Cinematics to get the lights back and play the rest of the game without CS on and using the override brightness function. Or you can stick with CM;) I've actually replayed a big chunk of the game with the current fix and is I find it perfectly playable;) IT boils down to how annoying you find those lights appearing and disappearing:)[/quote] Hm, turning of 3DV and switch to CM will even make the lights appear and dissapear....but i havnt get into it that much may be i did something wrong. I appreciate your work but for me some lights out/of behavior is raly game braking (YOU ARE RIGHT ^^ "IT boils down to how annoying you find those lights appearing and disappearing"). You have showed this in your video. I'll better go without some of those "poppin in lights". For that i have remembered my "just hacking arround" the shader files and i could determine the "position" of some lights. I have commented out the first ld_structured in the respective loop and disabled the respective light. I let 2 of it enabled so i have reduced the annoing flickering but not turn out essential lights. Even if i do some lights will still remain, eg. character lights in cut sceenes, lightening bolt light and so on. There are some lights left that will pop in, but not annoying that much. As a result the game is much more playable for me AND, the best (may be) i could identify where the lights where "generated". Changing some lines in the respective loop will bring up or erase some squares arround the lights or change its behavior. SO it is clear that the "building" of the lights are in the lopps i have identifyed and commented (may you also ^^). I am out of understanding the variables etc, but may be you do ^^ or you have tryed it and already know my findings ^^. Not realy finished my "exploration" through the shader files but the state i am is best for me ACTUALLY. The light is generated in the 14f8f4febc50582f-cs.txt and the stereo issue depends on the Gx "variable" eg g2.XXXX at the end of the line.(and i think the changes you made in other files .... I do not know what it means but changing the g2 to g5 will result in less crashes and choosing other values will result in one eye rendering. I have changed it to g5 ^^ OK this may sounds familar to you or completely stupid but may be there is any sense for you that you can pick up and improve something? Please find attached my commented 14f8f4febc50582f-cs.txt [code] // Seems to be the LIGHT CS SHADER - No fix Needed // Generated by Microsoft (R) D3D Shader Disassembler // // using 3Dmigoto v1.2.43 on Tue Apr 11 00:52:44 2017 // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // no Input // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // no Output cs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[9], dynamicIndexed dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_structured t2, 112 dcl_resource_structured t3, 304 dcl_resource_structured t4, 144 dcl_resource_structured t5, 336 dcl_resource_structured t6, 176 dcl_resource_structured t7, 256 dcl_resource_structured t8, 16 dcl_resource_structured t9, 4 dcl_uav_structured u0, 16 dcl_uav_structured u1, 4 dcl_uav_typed_buffer (uint,uint,uint,uint) u2 dcl_input vThreadIDInGroupFlattened dcl_input vThreadGroupID.xy dcl_temps 11 dcl_tgsm_structured g0, 16, 8 dcl_tgsm_raw g1, 4 dcl_tgsm_structured g2, 4, 512 dcl_tgsm_raw g3, 4 dcl_tgsm_raw g4, 4 dcl_tgsm_raw g5, 4 dcl_tgsm_raw g6, 4 dcl_tgsm_raw g7, 4 dcl_tgsm_raw g8, 4 dcl_tgsm_raw g9, 4 dcl_thread_group 8, 4, 1 utof r0.xy, vThreadGroupID.yxyy utof r0.z, cb0[5].x mad r0.x, r0.x, r0.z, r0.y ushr r0.yz, vThreadGroupID.yyxy, cb0[8].yyxy utof r0.yz, r0.yyzy utof r0.w, cb0[8].z mad r0.y, r0.y, r0.w, r0.z ftou r0.xy, r0.xyxx ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r1.xyzw, r0.y, l(0), t8.xyzw ushr r0.yzw, r1.yyzw, l(0, 16, 16, 16) and r1.yzw, r1.yyzw, l(0, 0x0000ffff, 0x0000ffff, 0x0000ffff) iadd r2.x, r0.y, r1.y iadd r2.x, r1.z, r2.x iadd r2.x, r0.z, r2.x iadd r2.x, r1.w, r2.x iadd r2.x, r0.w, r2.x if_z r2.x if_z vThreadIDInGroupFlattened.x store_structured u0.xyzw, r0.x, l(0), l(0,0,0,0) endif ret endif mov r2.xy, vThreadGroupID.xyxx mov r2.zw, l(0,0,0,0) ld_indexable(texture2d)(float,float,float,float) r2.x, r2.xyzw, t0.xyzw if_z vThreadIDInGroupFlattened.x store_raw g3.x, l(0), l(0) store_raw g4.x, l(0), l(0) store_raw g5.x, l(0), l(0) store_raw g6.x, l(0), l(0) store_raw g7.x, l(0), l(0) store_raw g8.x, l(0), l(0) store_raw g9.x, l(0), l(0) endif utof r2.yz, vThreadGroupID.xxyx mul r2.yz, r2.yyzy, cb0[4].zzwz iadd r3.xy, vThreadGroupID.xyxx, l(1, 1, 0, 0) utof r3.xy, r3.xyxx mul r3.xy, r3.xyxx, cb0[4].zwzz mad r2.yz, r2.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000) mad r3.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000) and r2.w, vThreadIDInGroupFlattened.x, l(3) ushr r3.z, vThreadIDInGroupFlattened.x, l(2) bfi r3.w, l(2), l(2), vThreadIDInGroupFlattened.x, l(0) and r4.xy, r3.zzzz, l(4, 2, 0, 0) movc r5.x, r4.x, r3.x, r2.y movc r5.y, r4.y, -r3.y, -r2.z ubfe r2.y, l(1), l(2), vThreadIDInGroupFlattened.x movc r5.z, r2.y, l(1.000000), r2.x mov r5.w, l(1.000000) dp4 r2.x, r5.xyzw, cb0[r2.w + 0].xyzw store_structured g0.x, r3.z, r3.w, r2.x sync_g_t ld_structured r2.x, r3.z, l(12), g0.xxxx div r2.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x ld_structured r2.y, r3.z, r3.w, g0.xxxx mul r2.x, r2.x, r2.y store_structured g0.x, r3.z, r3.w, r2.x sync_g_t ult r2.x, vThreadIDInGroupFlattened.x, l(4) if_nz r2.x ishl r2.x, vThreadIDInGroupFlattened.x, l(1) imad r2.y, vThreadIDInGroupFlattened.x, l(2), l(1) ld_structured r3.xyz, r2.x, l(0), g0.xyzx ld_structured r2.yzw, r2.y, l(0), g0.xxyz add r2.yzw, -r3.xxyz, r2.yyzw dp3 r2.y, r2.yzwy, r2.yzwy lt r2.z, l(0.000000), r2.y div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y and r2.y, r2.y, r2.z store_structured g0.x, r2.x, l(12), r2.y endif sync_g_t if_nz r1.y mov r2.x, vThreadIDInGroupFlattened.x loop uge r2.y, r2.x, r1.y breakc_nz r2.y iadd r2.y, r1.x, r2.x ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.y, r2.y, l(0), t9.xxxx ld_structured_indexable(structured_buffer, stride=112)(mixed,mixed,mixed,mixed) r3.xyzw, r2.y, l(0), t2.xyzw ld_structured_indexable(structured_buffer, stride=112)(mixed,mixed,mixed,mixed) r2.zw, r2.y, l(80), t2.xxxy div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w lt r4.x, r2.w, l(2.000000) if_nz r4.x ld_structured_indexable(structured_buffer, stride=112)(mixed,mixed,mixed,mixed) r4.xyz, r2.y, l(32), t2.xyzx dp3 r4.w, r3.xyzx, r4.xyzx mov r5.xy, l(0,0,0,0) loop uge r5.z, r5.x, l(8) breakc_nz r5.z ld_structured r6.xyz, r5.x, l(0), g0.xyzx iadd r5.z, r5.x, l(1) ld_structured r7.xyz, r5.z, l(0), g0.xyzx dp3 r5.z, r4.xyzx, r6.xyzx lt r5.z, r5.z, r4.w and r5.z, r5.z, l(1) or r5.z, r5.z, r5.y dp3 r5.w, r4.xyzx, r7.xyzx lt r5.w, r5.w, r4.w and r5.w, r5.w, l(1) or r5.y, r5.w, r5.z iadd r5.x, r5.x, l(2) endloop if_z r5.y mov r4.w, l(0) endif if_nz r5.y div r2.z, r2.w, -r2.z mul r2.z, r2.z, r2.z mov r6.x, r4.w mov r6.y, l(0) mov r2.w, l(0) loop uge r5.x, r6.y, l(8) mov r2.w, l(0) breakc_nz r5.x // first light poppin -- comment ld_structured r5.xzw, r6.y, l(0), g0.xxyz it out will leads to disable it, comment out add r5.xzw, -r3.xxyz, r5.xxzw will leads to squares arround the light // ld_structured r5.xzw, r6.y, l(0), g0.xxyz add r5.xzw, -r3.xxyz, r5.xxzw iadd r6.z, r6.y, l(1) ld_structured r7.xyz, r6.z, l(0), g0.xyzx add r7.xyz, -r3.xyzx, r7.xyzx dp3 r6.z, -r4.xyzx, r7.xyzx ge r6.w, r6.z, l(0.000000) mul r7.w, r6.z, r6.z dp3 r8.x, r7.xyzx, r7.xyzx mul r8.x, r2.z, r8.x ge r7.w, r7.w, r8.x and r6.w, r6.w, r7.w dp3 r7.w, -r4.xyzx, r5.xzwx ge r8.y, r7.w, l(0.000000) mul r7.w, r7.w, r7.w dp3 r8.z, r5.xzwx, r5.xzwx mul r8.z, r2.z, r8.z ge r7.w, r7.w, r8.z and r7.w, r7.w, r8.y and r7.w, r7.w, l(2) bfi r6.w, l(1), l(0), r6.w, r7.w ieq r7.w, r6.w, l(3) if_nz r7.w mov r8.y, l(-1) endif if_z r7.w add r9.xyz, r5.xzwx, -r7.xyzx dp3 r7.w, -r4.xyzx, r9.xyzx dp3 r8.z, r9.xyzx, r9.xyzx mul r8.z, r2.z, r8.z mad r8.z, r7.w, r7.w, -r8.z dp3 r8.w, r9.xyzx, r7.xyzx mul r8.w, r2.z, r8.w mad r7.w, r6.z, r7.w, -r8.w add r8.w, r7.w, r7.w mad r6.z, r6.z, r6.z, -r8.x mul r6.z, r8.z, r6.z mul r6.z, r6.z, l(4.000000) mad r6.z, r8.w, r8.w, -r6.z ne r8.x, r8.z, l(0.000000) ge r8.w, r6.z, l(0.000000) and r8.x, r8.w, r8.x if_z r8.x mov r8.y, l(0) endif if_nz r8.x sqrt r6.z, r6.z add r8.x, r8.z, r8.z rcp r8.x, r8.x mad r8.z, -r7.w, l(2.000000), r6.z mul r8.z, r8.x, r8.z mad r6.z, -r7.w, l(2.000000), -r6.z mul r6.z, r8.x, r6.z if_nz r6.w lt r7.w, l(0.000000), r8.z lt r8.x, r8.z, l(1.000000) and r7.w, r7.w, r8.x movc r7.w, r7.w, r8.z, r6.z mad r10.xyz, r9.xyzx, r7.wwww, r7.xyzx ieq r7.w, r6.w, l(1) movc r7.xyz, r7.wwww, r7.xyzx, r10.xyzx movc r5.xzw, r7.wwww, r10.xxyz, r5.xxzw mov r8.y, l(-1) endif if_z r6.w ge r6.w, l(0.000000), r8.z ge r7.w, r8.z, l(1.000000) or r6.w, r6.w, r7.w if_nz r6.w mov r8.y, l(0) endif if_z r6.w mad r5.xzw, r9.xxyz, r6.zzzz, r7.xxyz mad r7.xyz, r9.xyzx, r8.zzzz, r7.xyzx dp3 r6.z, r7.xyzx, -r4.xyzx ge r8.y, r6.z, l(0.000000) endif endif endif endif add r7.xyz, -r5.xzwx, r7.xyzx dp3 r6.z, r7.xyzx, r7.xyzx lt r6.w, l(0.000000), r6.z dp3 r7.w, r5.xzwx, r7.xyzx div_sat r6.z, -r7.w, r6.z and r6.z, r6.z, r6.w mad r5.xzw, r7.xxyz, r6.zzzz, r5.xxzw dp3 r5.x, r5.xzwx, r5.xzwx lt r5.x, r5.x, r3.w and r5.x, r8.y, r5.x if_nz r5.x mov r6.x, l(-1) mov r2.w, l(-1) break endif iadd r6.y, r6.y, l(2) mov r2.w, r5.x endloop mov r4.w, r6.x if_z r2.w mov r4.w, l(0) endif endif else mov r2.z, l(0) mov r4.x, l(0) loop uge r4.y, r4.x, l(4) breakc_nz r4.y ishl r4.y, r4.x, l(1) ld_structured r7.xyzw, r4.y, l(0), g0.xyzw imad r4.y, r4.x, l(2), l(1) ld_structured r5.xzw, r4.y, l(0), g0.xxyz add r5.xzw, -r7.xxyz, r5.xxzw add r6.yzw, r3.xxyz, -r7.xxyz dp3 r4.y, r6.yzwy, r5.xzwx mul_sat r4.y, r7.w, r4.y mad r5.xzw, r5.xxzw, r4.yyyy, r7.xxyz add r5.xzw, r3.xxyz, -r5.xxzw dp3 r4.y, r5.xzwx, r5.xzwx lt r4.y, r4.y, r3.w and r4.y, r4.y, l(1) or r2.z, r2.z, r4.y iadd r4.x, r4.x, l(1) endloop ine r4.w, r2.z, l(0) endif if_nz r4.w imm_atomic_iadd r3.x, g4, l(0), l(1) ult r3.y, r3.x, l(512) if_nz r3.y store_structured g2.x, r3.x, l(0), r2.y endif endif iadd r2.x, r2.x, l(32) endloop sync_g_t if_z vThreadIDInGroupFlattened.x ld_raw r2.x, l(0), g4.xxxx ld_raw r2.y, l(0), g3.xxxx iadd r2.x, r2.x, r2.y store_raw g3.x, l(0), r2.x endif iadd r1.x, r1.y, r1.x sync_g_t endif if_nz r0.y mov r1.y, vThreadIDInGroupFlattened.x loop uge r2.x, r1.y, r0.y breakc_nz r2.x iadd r2.x, r1.x, r1.y ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.x, r2.x, l(0), t9.xxxx ld_structured_indexable(structured_buffer, stride=304)(mixed,mixed,mixed,mixed) r3.xyzw, r2.x, l(0), t3.xyzw ld_structured_indexable(structured_buffer, stride=304)(mixed,mixed,mixed,mixed) r2.yz, r2.x, l(80), t3.xxyx div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w lt r3.w, r2.z, l(2.000000) if_nz r3.w ld_structured_indexable(structured_buffer, stride=304)(mixed,mixed,mixed,mixed) r4.xyz, r2.x, l(32), t3.xyzx dp3 r3.w, r3.xyzx, r4.xyzx mov r4.w, l(0) mov r5.x, l(0) loop uge r5.y, r4.w, l(8) breakc_nz r5.y ld_structured r5.yzw, r4.w, l(0), g0.xxyz iadd r6.x, r4.w, l(1) ld_structured r6.xyz, r6.x, l(0), g0.xyzx dp3 r5.y, r4.xyzx, r5.yzwy lt r5.y, r5.y, r3.w and r5.y, r5.y, l(1) or r5.y, r5.y, r5.x dp3 r5.z, r4.xyzx, r6.xyzx lt r5.z, r5.z, r3.w and r5.z, r5.z, l(1) or r5.x, r5.z, r5.y iadd r4.w, r4.w, l(2) endloop if_z r5.x mov r3.w, l(0) endif if_nz r5.x div r2.y, r2.z, -r2.y mul r2.y, r2.y, r2.y mov r6.x, r3.w mov r6.y, l(0) mov r2.z, l(0) loop uge r4.w, r6.y, l(8) mov r2.z, l(0) breakc_nz r4.w // second light popin // ld_structured r5.yzw, r6.y, l(0), g0.xxyz add r5.yzw, -r3.xxyz, r5.yyzw iadd r4.w, r6.y, l(1) ld_structured r7.xyz, r4.w, l(0), g0.xyzx add r7.xyz, -r3.xyzx, r7.xyzx dp3 r4.w, -r4.xyzx, r7.xyzx ge r6.z, r4.w, l(0.000000) mul r6.w, r4.w, r4.w dp3 r7.w, r7.xyzx, r7.xyzx mul r7.w, r2.y, r7.w ge r6.w, r6.w, r7.w and r6.z, r6.w, r6.z dp3 r6.w, -r4.xyzx, r5.yzwy ge r8.x, r6.w, l(0.000000) mul r6.w, r6.w, r6.w dp3 r8.y, r5.yzwy, r5.yzwy mul r8.y, r2.y, r8.y ge r6.w, r6.w, r8.y and r6.w, r6.w, r8.x and r6.w, r6.w, l(2) bfi r6.z, l(1), l(0), r6.z, r6.w ieq r6.w, r6.z, l(3) if_nz r6.w mov r8.x, l(-1) endif if_z r6.w add r8.yzw, r5.yyzw, -r7.xxyz dp3 r6.w, -r4.xyzx, r8.yzwy dp3 r9.x, r8.yzwy, r8.yzwy mul r9.x, r2.y, r9.x mad r9.x, r6.w, r6.w, -r9.x dp3 r9.y, r8.yzwy, r7.xyzx mul r9.y, r2.y, r9.y mad r6.w, r4.w, r6.w, -r9.y add r9.y, r6.w, r6.w mad r4.w, r4.w, r4.w, -r7.w mul r4.w, r9.x, r4.w mul r4.w, r4.w, l(4.000000) mad r4.w, r9.y, r9.y, -r4.w ne r7.w, r9.x, l(0.000000) ge r9.y, r4.w, l(0.000000) and r7.w, r7.w, r9.y if_z r7.w mov r8.x, l(0) endif if_nz r7.w sqrt r4.w, r4.w add r7.w, r9.x, r9.x rcp r7.w, r7.w mad r9.x, -r6.w, l(2.000000), r4.w mul r9.x, r7.w, r9.x mad r4.w, -r6.w, l(2.000000), -r4.w mul r4.w, r7.w, r4.w if_nz r6.z lt r6.w, l(0.000000), r9.x lt r7.w, r9.x, l(1.000000) and r6.w, r6.w, r7.w movc r6.w, r6.w, r9.x, r4.w mad r9.yzw, r8.yyzw, r6.wwww, r7.xxyz ieq r6.w, r6.z, l(1) movc r7.xyz, r6.wwww, r7.xyzx, r9.yzwy movc r5.yzw, r6.wwww, r9.yyzw, r5.yyzw mov r8.x, l(-1) endif if_z r6.z ge r6.z, l(0.000000), r9.x ge r6.w, r9.x, l(1.000000) or r6.z, r6.w, r6.z if_nz r6.z mov r8.x, l(0) endif if_z r6.z mad r5.yzw, r8.yyzw, r4.wwww, r7.xxyz mad r7.xyz, r8.yzwy, r9.xxxx, r7.xyzx dp3 r4.w, r7.xyzx, -r4.xyzx ge r8.x, r4.w, l(0.000000) endif endif endif endif add r7.xyz, -r5.yzwy, r7.xyzx dp3 r4.w, r7.xyzx, r7.xyzx lt r6.z, l(0.000000), r4.w dp3 r6.w, r5.yzwy, r7.xyzx div_sat r4.w, -r6.w, r4.w and r4.w, r4.w, r6.z mad r5.yzw, r7.xxyz, r4.wwww, r5.yyzw dp3 r4.w, r5.yzwy, r5.yzwy lt r4.w, r4.w, r2.w and r4.w, r8.x, r4.w if_nz r4.w mov r6.x, l(-1) mov r2.z, l(-1) break endif iadd r6.y, r6.y, l(2) mov r2.z, r4.w endloop mov r3.w, r6.x if_z r2.z mov r3.w, l(0) endif endif else mov r2.y, l(0) mov r4.x, l(0) loop uge r4.y, r4.x, l(4) breakc_nz r4.y ishl r4.y, r4.x, l(1) ld_structured r7.xyzw, r4.y, l(0), g0.xyzw imad r4.y, r4.x, l(2), l(1) ld_structured r4.yzw, r4.y, l(0), g0.xxyz add r4.yzw, -r7.xxyz, r4.yyzw add r5.yzw, r3.xxyz, -r7.xxyz dp3 r5.y, r5.yzwy, r4.yzwy mul_sat r5.y, r7.w, r5.y mad r4.yzw, r4.yyzw, r5.yyyy, r7.xxyz add r4.yzw, r3.xxyz, -r4.yyzw dp3 r4.y, r4.yzwy, r4.yzwy lt r4.y, r4.y, r2.w and r4.y, r4.y, l(1) or r2.y, r2.y, r4.y iadd r4.x, r4.x, l(1) endloop ine r3.w, r2.y, l(0) endif if_nz r3.w imm_atomic_iadd r3.x, g5, l(0), l(1) ld_raw r2.w, l(0), g3.xxxx iadd r2.w, r2.w, r3.x ult r3.x, r2.w, l(512) if_nz r3.x store_structured g2.x, r2.w, l(0), r2.x endif endif iadd r1.y, r1.y, l(32) endloop sync_g_t if_z vThreadIDInGroupFlattened.x ld_raw r1.y, l(0), g5.xxxx ld_raw r2.x, l(0), g3.xxxx iadd r1.y, r1.y, r2.x store_raw g3.x, l(0), r1.y endif iadd r1.x, r0.y, r1.x sync_g_t endif if_nz r1.z mov r0.y, vThreadIDInGroupFlattened.x loop uge r1.y, r0.y, r1.z breakc_nz r1.y iadd r1.y, r1.x, r0.y ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r1.y, r1.y, l(0), t9.xxxx ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r2.xyzw, r1.y, l(0), t4.xyzw ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r3.x, r1.y, l(112), t4.xxxx div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w mov r3.yz, l(0,0,0,0) loop uge r3.w, r3.z, l(4) breakc_nz r3.w ishl r3.w, r3.z, l(1) ld_structured r4.xyzw, r3.w, l(0), g0.xyzw imad r3.w, r3.z, l(2), l(1) ld_structured r5.xyz, r3.w, l(0), g0.xyzx add r5.xyz, -r4.xyzx, r5.xyzx add r6.xyz, r2.xyzx, -r4.xyzx dp3 r3.w, r6.xyzx, r5.xyzx mul_sat r3.w, r4.w, r3.w mad r4.xyz, r5.xyzx, r3.wwww, r4.xyzx add r4.xyz, r2.xyzx, -r4.xyzx dp3 r3.w, r4.xyzx, r4.xyzx lt r3.w, r3.w, r2.w and r3.w, r3.w, l(1) or r3.y, r3.w, r3.y iadd r3.z, r3.z, l(1) endloop ine r3.z, r3.y, l(0) ftou r3.x, r3.x ieq r3.xw, r3.xxxx, l(5, 0, 0, 4) or r3.x, r3.w, r3.x and r3.x, r3.x, r3.z if_nz r3.x ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r4.xyz, r1.y, l(32), t4.xyzx dp3 r3.x, r2.xyzx, r4.xyzx mov r3.w, l(0) mov r4.w, l(0) loop uge r5.x, r3.w, l(8) breakc_nz r5.x ld_structured r5.xyz, r3.w, l(0), g0.xyzx iadd r5.w, r3.w, l(1) ld_structured r6.xyz, r5.w, l(0), g0.xyzx dp3 r5.x, r4.xyzx, r5.xyzx lt r5.x, r5.x, r3.x and r5.x, r5.x, l(1) or r5.x, r4.w, r5.x dp3 r5.y, r4.xyzx, r6.xyzx lt r5.y, r5.y, r3.x and r5.y, r5.y, l(1) or r4.w, r5.y, r5.x iadd r3.w, r3.w, l(2) endloop if_z r4.w mov r3.z, l(0) endif if_nz r4.w mov r3.xw, l(0,0,0,0) loop //third light popin uge r4.x, r3.w, l(4) breakc_nz r4.x ishl r4.x, r3.w, l(1) ld_structured r5.xyzw, r4.x, l(0), g0.xyzw imad r4.x, r3.w, l(2), l(1) ld_structured r4.xyz, r4.x, l(0), g0.xyzx add r4.xyz, -r5.xyzx, r4.xyzx add r6.xyz, r2.xyzx, -r5.xyzx dp3 r6.x, r6.xyzx, r4.xyzx mul_sat r5.w, r5.w, r6.x mad r4.xyz, r4.xyzx, r5.wwww, r5.xyzx add r4.xyz, r2.xyzx, -r4.xyzx dp3 r4.x, r4.xyzx, r4.xyzx lt r4.x, r4.x, r2.w and r4.x, r4.x, l(1) or r3.x, r3.x, r4.x iadd r3.w, r3.w, l(1) endloop ine r3.z, r3.x, l(0) endif endif if_nz r3.z imm_atomic_iadd r2.x, g6, l(0), l(1) ld_raw r2.y, l(0), g3.xxxx iadd r2.x, r2.y, r2.x ult r2.y, r2.x, l(512) if_nz r2.y store_structured g2.x, r2.x, l(0), r1.y endif endif iadd r0.y, r0.y, l(32) endloop sync_g_t if_z vThreadIDInGroupFlattened.x ld_raw r0.y, l(0), g6.xxxx ld_raw r1.y, l(0), g3.xxxx iadd r0.y, r0.y, r1.y store_raw g3.x, l(0), r0.y endif iadd r1.x, r1.z, r1.x sync_g_t endif if_nz r0.z mov r0.y, vThreadIDInGroupFlattened.x loop uge r1.y, r0.y, r0.z breakc_nz r1.y iadd r1.y, r1.x, r0.y ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r1.y, r1.y, l(0), t9.xxxx ld_structured_indexable(structured_buffer, stride=336)(mixed,mixed,mixed,mixed) r2.xyzw, r1.y, l(0), t5.xyzw ld_structured_indexable(structured_buffer, stride=336)(mixed,mixed,mixed,mixed) r1.z, r1.y, l(112), t5.xxxx div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w mov r3.xy, l(0,0,0,0) loop uge r3.z, r3.y, l(4) breakc_nz r3.z ishl r3.z, r3.y, l(1) ld_structured r4.xyzw, r3.z, l(0), g0.xyzw imad r3.z, r3.y, l(2), l(1) ld_structured r5.xyz, r3.z, l(0), g0.xyzx add r5.xyz, -r4.xyzx, r5.xyzx add r6.xyz, r2.xyzx, -r4.xyzx dp3 r3.z, r6.xyzx, r5.xyzx mul_sat r3.z, r4.w, r3.z mad r4.xyz, r5.xyzx, r3.zzzz, r4.xyzx add r4.xyz, r2.xyzx, -r4.xyzx dp3 r3.z, r4.xyzx, r4.xyzx lt r3.z, r3.z, r2.w and r3.z, r3.z, l(1) or r3.x, r3.z, r3.x iadd r3.y, r3.y, l(1) endloop ine r3.y, r3.x, l(0) ftou r1.z, r1.z ieq r3.zw, r1.zzzz, l(0, 0, 5, 4) or r1.z, r3.w, r3.z and r1.z, r1.z, r3.y if_nz r1.z ld_structured_indexable(structured_buffer, stride=336)(mixed,mixed,mixed,mixed) r4.xyz, r1.y, l(32), t5.xyzx dp3 r1.z, r2.xyzx, r4.xyzx mov r3.zw, l(0,0,0,0) loop uge r4.w, r3.z, l(8) breakc_nz r4.w ld_structured r5.xyz, r3.z, l(0), g0.xyzx iadd r4.w, r3.z, l(1) ld_structured r6.xyz, r4.w, l(0), g0.xyzx dp3 r4.w, r4.xyzx, r5.xyzx lt r4.w, r4.w, r1.z and r4.w, r4.w, l(1) or r4.w, r3.w, r4.w dp3 r5.x, r4.xyzx, r6.xyzx lt r5.x, r5.x, r1.z and r5.x, r5.x, l(1) or r3.w, r4.w, r5.x iadd r3.z, r3.z, l(2) endloop if_z r3.w mov r3.y, l(0) endif if_nz r3.w mov r1.z, l(0) mov r3.z, l(0) loop //4th popin light uge r4.x, r3.z, l(4) breakc_nz r4.x ishl r4.x, r3.z, l(1) ld_structured r4.xyzw, r4.x, l(0), g0.xyzw imad r5.x, r3.z, l(2), l(1) ld_structured r5.xyz, r5.x, l(0), g0.xyzx add r5.xyz, -r4.xyzx, r5.xyzx add r6.xyz, r2.xyzx, -r4.xyzx dp3 r5.w, r6.xyzx, r5.xyzx mul_sat r4.w, r4.w, r5.w mad r4.xyz, r5.xyzx, r4.wwww, r4.xyzx add r4.xyz, r2.xyzx, -r4.xyzx dp3 r4.x, r4.xyzx, r4.xyzx lt r4.x, r4.x, r2.w and r4.x, r4.x, l(1) or r1.z, r1.z, r4.x iadd r3.z, r3.z, l(1) endloop ine r3.y, r1.z, l(0) endif endif if_nz r3.y imm_atomic_iadd r2.x, g7, l(0), l(1) ld_raw r2.y, l(0), g3.xxxx iadd r2.x, r2.y, r2.x ult r2.y, r2.x, l(512) if_nz r2.y store_structured g2.x, r2.x, l(0), r1.y endif endif iadd r0.y, r0.y, l(32) endloop sync_g_t if_z vThreadIDInGroupFlattened.x ld_raw r0.y, l(0), g7.xxxx ld_raw r1.y, l(0), g3.xxxx iadd r0.y, r0.y, r1.y store_raw g3.x, l(0), r0.y endif iadd r1.x, r0.z, r1.x sync_g_t endif if_nz r0.w mov r2.w, l(1.000000) mov r3.w, l(1.000000) mov r0.y, vThreadIDInGroupFlattened.x loop uge r0.z, r0.y, r0.w breakc_nz r0.z iadd r0.z, r1.x, r0.y ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.z, r0.z, l(0), t9.xxxx ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r4.xyzw, r0.z, l(0), t7.xyzw mov r1.yz, l(0,0,0,0) loop uge r5.x, r1.z, l(4) breakc_nz r5.x ishl r5.x, r1.z, l(1) ld_structured r5.xyzw, r5.x, l(0), g0.xyzw imad r6.x, r1.z, l(2), l(1) ld_structured r6.xyz, r6.x, l(0), g0.xyzx add r6.xyz, -r5.xyzx, r6.xyzx add r7.xyz, r4.xyzx, -r5.xyzx dp3 r6.w, r7.xyzx, r6.xyzx mul_sat r5.w, r5.w, r6.w mad r5.xyz, r6.xyzx, r5.wwww, r5.xyzx add r5.xyz, r4.xyzx, -r5.xyzx dp3 r5.x, r5.xyzx, r5.xyzx lt r5.x, r5.x, r4.w and r5.x, r5.x, l(1) or r1.y, r1.y, r5.x iadd r1.z, r1.z, l(1) endloop if_nz r1.y ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r4.xyzw, r0.z, l(16), t7.xyzw ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r5.xyzw, r0.z, l(32), t7.xyzw ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r6.xyzw, r0.z, l(48), t7.xyzw ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r7.xyz, r0.z, l(208), t7.xyzx mov r1.z, l(0) mov r7.w, l(0) loop uge r8.x, r7.w, l(8) breakc_nz r8.x ld_structured r2.xyz, r7.w, l(0), g0.xyzx dp4 r8.x, r2.xyzw, r4.xyzw dp4 r8.y, r2.xyzw, r5.xyzw dp4 r8.z, r2.xyzw, r6.xyzw iadd r2.x, r7.w, l(1) ld_structured r3.xyz, r2.x, l(0), g0.xyzx dp4 r2.x, r3.xyzw, r4.xyzw dp4 r2.y, r3.xyzw, r5.xyzw dp4 r2.z, r3.xyzw, r6.xyzw add r9.xyzw, -r8.yzzx, r2.yzzx mul r10.xyzw, r9.xyzw, l(0.500000, 0.500000, 0.500000, 0.500000) mad r8.xyzw, r9.zxwz, l(0.500000, 0.500000, 0.500000, 0.500000), r8.zyxz add r2.xyz, r7.xyzx, |r10.wxzw| ge r2.xyz, r2.xyzx, |r8.zywz| and r2.x, r2.x, r2.y and r2.x, r2.x, r2.z mul r2.yz, r8.yywy, r10.yywy mad r2.yz, r10.xxzx, r8.xxzx, -r2.yyzy dp2 r3.x, r7.zyzz, |r10.xzxx| add r3.x, r3.x, l(0.001000) ge r2.y, r3.x, |r2.y| and r2.x, r2.x, r2.y dp2 r2.y, r7.xzxx, |r10.zwzz| add r2.y, r2.y, l(0.001000) ge r2.y, r2.y, |r2.z| and r2.x, r2.x, r2.y mul r2.y, r8.z, r10.x mad r2.y, r10.w, r8.y, -r2.y dp2 r2.z, r7.xyxx, |r10.xwxx| add r2.z, r2.z, l(0.001000) ge r2.y, r2.z, |r2.y| and r2.x, r2.x, r2.y or r1.z, r1.z, r2.x iadd r7.w, r7.w, l(2) endloop else mov r1.z, l(0) endif if_nz r1.z imm_atomic_iadd r4.x, g9, l(0), l(1) ld_raw r2.x, l(0), g3.xxxx iadd r2.x, r2.x, r4.x ult r2.y, r2.x, l(512) if_nz r2.y store_structured g2.x, r2.x, l(0), r0.z endif endif iadd r0.y, r0.y, l(32) endloop sync_g_t if_z vThreadIDInGroupFlattened.x ld_raw r0.y, l(0), g9.xxxx ld_raw r0.z, l(0), g3.xxxx iadd r0.y, r0.y, r0.z store_raw g3.x, l(0), r0.y endif iadd r1.x, r0.w, r1.x sync_g_t endif if_nz r1.w mov r2.w, l(1.000000) mov r3.w, l(1.000000) mov r0.y, vThreadIDInGroupFlattened.x loop uge r0.z, r0.y, r1.w breakc_nz r0.z iadd r0.z, r1.x, r0.y ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.z, r0.z, l(0), t9.xxxx ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r4.xyzw, r0.z, l(0), t6.xyzw mov r0.w, l(0) mov r1.y, l(0) loop // another light (Ground light) disable is better enables ground light) uge r1.z, r1.y, l(4) breakc_nz r1.z ishl r1.z, r1.y, l(1) // ld_structured r5.xyzw, r1.z, l(0), g0.xyzw imad r1.z, r1.y, l(2), l(1) ld_structured r6.xyz, r1.z, l(0), g0.xyzx add r6.xyz, -r5.xyzx, r6.xyzx add r7.xyz, r4.xyzx, -r5.xyzx dp3 r1.z, r7.xyzx, r6.xyzx mul_sat r1.z, r5.w, r1.z mad r5.xyz, r6.xyzx, r1.zzzz, r5.xyzx add r5.xyz, r4.xyzx, -r5.xyzx dp3 r1.z, r5.xyzx, r5.xyzx lt r1.z, r1.z, r4.w and r1.z, r1.z, l(1) or r0.w, r0.w, r1.z iadd r1.y, r1.y, l(1) endloop if_nz r0.w ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r4.xyzw, r0.z, l(16), t6.xyzw ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r5.xyzw, r0.z, l(32), t6.xyzw ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r6.xyzw, r0.z, l(48), t6.xyzw ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r7.xyz, r0.z, l(80), t6.xyzx mov r1.yz, l(0,0,0,0) loop uge r7.w, r1.z, l(8) breakc_nz r7.w // ld_structured r2.xyz, r1.z, l(0), g0.xyzx dp4 r8.x, r2.xyzw, r4.xyzw dp4 r8.y, r2.xyzw, r5.xyzw dp4 r8.z, r2.xyzw, r6.xyzw iadd r2.x, r1.z, l(1) ld_structured r3.xyz, r2.x, l(0), g0.xyzx dp4 r2.x, r3.xyzw, r4.xyzw dp4 r2.y, r3.xyzw, r5.xyzw dp4 r2.z, r3.xyzw, r6.xyzw add r9.xyzw, -r8.yzzx, r2.yzzx mul r10.xyzw, r9.xyzw, l(0.500000, 0.500000, 0.500000, 0.500000) mad r8.xyzw, r9.zxwz, l(0.500000, 0.500000, 0.500000, 0.500000), r8.zyxz add r2.xyz, r7.xyzx, |r10.wxzw| ge r2.xyz, r2.xyzx, |r8.zywz| and r2.x, r2.x, r2.y and r2.x, r2.x, r2.z mul r2.yz, r8.yywy, r10.yywy mad r2.yz, r10.xxzx, r8.xxzx, -r2.yyzy dp2 r3.x, r7.zyzz, |r10.xzxx| add r3.x, r3.x, l(0.001000) ge r2.y, r3.x, |r2.y| and r2.x, r2.x, r2.y dp2 r2.y, r7.xzxx, |r10.zwzz| add r2.y, r2.y, l(0.001000) ge r2.y, r2.y, |r2.z| and r2.x, r2.x, r2.y mul r2.y, r8.z, r10.x mad r2.y, r10.w, r8.y, -r2.y dp2 r2.z, r7.xyxx, |r10.xwxx| add r2.z, r2.z, l(0.001000) ge r2.y, r2.z, |r2.y| and r2.x, r2.x, r2.y or r1.y, r1.y, r2.x iadd r1.z, r1.z, l(2) endloop else mov r1.y, l(0) endif if_nz r1.y imm_atomic_iadd r4.x, g8, l(0), l(1) ld_raw r1.z, l(0), g3.xxxx iadd r1.z, r1.z, r4.x ult r2.x, r1.z, l(512) if_nz r2.x store_structured g2.x, r1.z, l(0), r0.z endif endif iadd r0.y, r0.y, l(32) endloop sync_g_t if_z vThreadIDInGroupFlattened.x ld_raw r0.y, l(0), g8.xxxx ld_raw r0.z, l(0), g3.xxxx iadd r0.y, r0.y, r0.z store_raw g3.x, l(0), r0.y endif sync_g_t endif if_z vThreadIDInGroupFlattened.x ld_raw r0.y, l(0), g3.xxxx if_nz r0.y umin r0.y, r0.y, l(512) store_raw g3.x, l(0), r0.y imm_atomic_iadd r1.x, u2, l(0), r0.y store_raw g1.x, l(0), r1.x iadd r0.y, r0.y, r1.x ult r0.y, cb0[5].z, r0.y if_nz r0.y store_raw g3.x, l(0), l(0) endif ld_raw r0.y, l(0), g5.xxxx ld_raw r0.z, l(0), g4.xxxx bfi r1.y, l(16), l(16), r0.y, r0.z ld_raw r0.y, l(0), g7.xxxx ld_raw r0.z, l(0), g6.xxxx bfi r1.z, l(16), l(16), r0.y, r0.z ld_raw r0.y, l(0), g9.xxxx ld_raw r0.z, l(0), g8.xxxx bfi r1.w, l(16), l(16), r0.y, r0.z else mov r1.xyzw, l(0,0,0,0) endif store_structured u0.xyzw, r0.x, l(0), r1.xyzw endif sync_g_t ld_raw r0.x, l(0), g3.xxxx if_nz r0.x ld_raw r0.y, l(0), g1.xxxx mov r0.z, vThreadIDInGroupFlattened.x loop uge r0.w, r0.z, r0.x breakc_nz r0.w iadd r0.w, r0.y, r0.z //changed to G5 --- improving stability of crashes ld_structured r1.x, r0.z, l(0), g5.xxxx store_structured u1.x, r0.w, l(0), r1.x iadd r0.z, r0.z, l(32) endloop endif ret // Approximately 0 instruction slots used [/code]
helifax said:
Losti said:If i turn of 3DV and the fix and switch to CM, the lights are back and do not pop in ?

Yes.
Or you can disable the Compute Shaders like before and still use the fix without any lights.
You can also enable the Computes only during Cinematics to get the lights back and play the rest of the game without CS on and using the override brightness function.

Or you can stick with CM;)
I've actually replayed a big chunk of the game with the current fix and is I find it perfectly playable;)
IT boils down to how annoying you find those lights appearing and disappearing:)


Hm, turning of 3DV and switch to CM will even make the lights appear and dissapear....but i havnt get into it that much may be i did something wrong.

I appreciate your work but for me some lights out/of behavior is raly game braking (YOU ARE RIGHT ^^ "IT boils down to how annoying you find those lights appearing and disappearing"). You have showed this in your video. I'll better go without some of those "poppin in lights". For that i have remembered my "just hacking arround" the shader files and i could determine the "position" of some lights. I have commented out the first ld_structured in the respective loop and disabled the respective light. I let 2 of it enabled so i have reduced the annoing flickering but not turn out essential lights. Even if i do some lights will still remain, eg. character lights in cut sceenes, lightening bolt light and so on. There are some lights left that will pop in, but not annoying that much. As a result the game is much more playable for me AND, the best (may be) i could identify where the lights where "generated". Changing some lines in the respective loop will bring up or erase some squares arround the lights or change its behavior. SO it is clear that the "building" of the lights are in the lopps i have identifyed and commented (may you also ^^). I am out of understanding the variables etc, but may be you do ^^ or you have tryed it and already know my findings ^^. Not realy finished my "exploration" through the shader files but the state i am is best for me ACTUALLY. The light is generated in the 14f8f4febc50582f-cs.txt and the stereo issue depends on the Gx "variable" eg g2.XXXX at the end of the line.(and i think the changes you made in other files .... I do not know what it means but changing the g2 to g5 will result in less crashes and choosing other values will result in one eye rendering. I have changed it to g5 ^^ OK this may sounds familar to you or completely stupid but may be there is any sense for you that you can pick up and improve something?

Please find attached my commented 14f8f4febc50582f-cs.txt

// Seems to be the LIGHT CS SHADER - No fix Needed
// Generated by Microsoft (R) D3D Shader Disassembler
//
// using 3Dmigoto v1.2.43 on Tue Apr 11 00:52:44 2017
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Input
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
cs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[9], dynamicIndexed
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_structured t2, 112
dcl_resource_structured t3, 304
dcl_resource_structured t4, 144
dcl_resource_structured t5, 336
dcl_resource_structured t6, 176
dcl_resource_structured t7, 256
dcl_resource_structured t8, 16
dcl_resource_structured t9, 4
dcl_uav_structured u0, 16
dcl_uav_structured u1, 4
dcl_uav_typed_buffer (uint,uint,uint,uint) u2
dcl_input vThreadIDInGroupFlattened
dcl_input vThreadGroupID.xy
dcl_temps 11
dcl_tgsm_structured g0, 16, 8
dcl_tgsm_raw g1, 4
dcl_tgsm_structured g2, 4, 512
dcl_tgsm_raw g3, 4
dcl_tgsm_raw g4, 4
dcl_tgsm_raw g5, 4
dcl_tgsm_raw g6, 4
dcl_tgsm_raw g7, 4
dcl_tgsm_raw g8, 4
dcl_tgsm_raw g9, 4
dcl_thread_group 8, 4, 1
utof r0.xy, vThreadGroupID.yxyy
utof r0.z, cb0[5].x
mad r0.x, r0.x, r0.z, r0.y
ushr r0.yz, vThreadGroupID.yyxy, cb0[8].yyxy
utof r0.yz, r0.yyzy
utof r0.w, cb0[8].z
mad r0.y, r0.y, r0.w, r0.z
ftou r0.xy, r0.xyxx
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r1.xyzw, r0.y, l(0), t8.xyzw
ushr r0.yzw, r1.yyzw, l(0, 16, 16, 16)
and r1.yzw, r1.yyzw, l(0, 0x0000ffff, 0x0000ffff, 0x0000ffff)
iadd r2.x, r0.y, r1.y
iadd r2.x, r1.z, r2.x
iadd r2.x, r0.z, r2.x
iadd r2.x, r1.w, r2.x
iadd r2.x, r0.w, r2.x
if_z r2.x
if_z vThreadIDInGroupFlattened.x
store_structured u0.xyzw, r0.x, l(0), l(0,0,0,0)
endif
ret
endif
mov r2.xy, vThreadGroupID.xyxx
mov r2.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r2.x, r2.xyzw, t0.xyzw
if_z vThreadIDInGroupFlattened.x
store_raw g3.x, l(0), l(0)
store_raw g4.x, l(0), l(0)
store_raw g5.x, l(0), l(0)
store_raw g6.x, l(0), l(0)
store_raw g7.x, l(0), l(0)
store_raw g8.x, l(0), l(0)
store_raw g9.x, l(0), l(0)
endif
utof r2.yz, vThreadGroupID.xxyx
mul r2.yz, r2.yyzy, cb0[4].zzwz
iadd r3.xy, vThreadGroupID.xyxx, l(1, 1, 0, 0)
utof r3.xy, r3.xyxx
mul r3.xy, r3.xyxx, cb0[4].zwzz
mad r2.yz, r2.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
mad r3.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
and r2.w, vThreadIDInGroupFlattened.x, l(3)
ushr r3.z, vThreadIDInGroupFlattened.x, l(2)
bfi r3.w, l(2), l(2), vThreadIDInGroupFlattened.x, l(0)
and r4.xy, r3.zzzz, l(4, 2, 0, 0)
movc r5.x, r4.x, r3.x, r2.y
movc r5.y, r4.y, -r3.y, -r2.z
ubfe r2.y, l(1), l(2), vThreadIDInGroupFlattened.x
movc r5.z, r2.y, l(1.000000), r2.x
mov r5.w, l(1.000000)
dp4 r2.x, r5.xyzw, cb0[r2.w + 0].xyzw
store_structured g0.x, r3.z, r3.w, r2.x
sync_g_t
ld_structured r2.x, r3.z, l(12), g0.xxxx
div r2.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x
ld_structured r2.y, r3.z, r3.w, g0.xxxx
mul r2.x, r2.x, r2.y
store_structured g0.x, r3.z, r3.w, r2.x
sync_g_t
ult r2.x, vThreadIDInGroupFlattened.x, l(4)
if_nz r2.x
ishl r2.x, vThreadIDInGroupFlattened.x, l(1)
imad r2.y, vThreadIDInGroupFlattened.x, l(2), l(1)
ld_structured r3.xyz, r2.x, l(0), g0.xyzx
ld_structured r2.yzw, r2.y, l(0), g0.xxyz
add r2.yzw, -r3.xxyz, r2.yyzw
dp3 r2.y, r2.yzwy, r2.yzwy
lt r2.z, l(0.000000), r2.y
div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y
and r2.y, r2.y, r2.z
store_structured g0.x, r2.x, l(12), r2.y
endif
sync_g_t
if_nz r1.y
mov r2.x, vThreadIDInGroupFlattened.x
loop
uge r2.y, r2.x, r1.y
breakc_nz r2.y
iadd r2.y, r1.x, r2.x
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.y, r2.y, l(0), t9.xxxx
ld_structured_indexable(structured_buffer, stride=112)(mixed,mixed,mixed,mixed) r3.xyzw, r2.y, l(0), t2.xyzw
ld_structured_indexable(structured_buffer, stride=112)(mixed,mixed,mixed,mixed) r2.zw, r2.y, l(80), t2.xxxy
div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
lt r4.x, r2.w, l(2.000000)
if_nz r4.x
ld_structured_indexable(structured_buffer, stride=112)(mixed,mixed,mixed,mixed) r4.xyz, r2.y, l(32), t2.xyzx
dp3 r4.w, r3.xyzx, r4.xyzx
mov r5.xy, l(0,0,0,0)
loop
uge r5.z, r5.x, l(8)
breakc_nz r5.z
ld_structured r6.xyz, r5.x, l(0), g0.xyzx
iadd r5.z, r5.x, l(1)
ld_structured r7.xyz, r5.z, l(0), g0.xyzx
dp3 r5.z, r4.xyzx, r6.xyzx
lt r5.z, r5.z, r4.w
and r5.z, r5.z, l(1)
or r5.z, r5.z, r5.y
dp3 r5.w, r4.xyzx, r7.xyzx
lt r5.w, r5.w, r4.w
and r5.w, r5.w, l(1)
or r5.y, r5.w, r5.z
iadd r5.x, r5.x, l(2)
endloop
if_z r5.y
mov r4.w, l(0)
endif
if_nz r5.y
div r2.z, r2.w, -r2.z
mul r2.z, r2.z, r2.z
mov r6.x, r4.w
mov r6.y, l(0)
mov r2.w, l(0)
loop
uge r5.x, r6.y, l(8)
mov r2.w, l(0)
breakc_nz r5.x
// first light poppin -- comment ld_structured r5.xzw, r6.y, l(0), g0.xxyz it out will leads to disable it, comment out add r5.xzw, -r3.xxyz, r5.xxzw will leads to squares arround the light
// ld_structured r5.xzw, r6.y, l(0), g0.xxyz
add r5.xzw, -r3.xxyz, r5.xxzw
iadd r6.z, r6.y, l(1)
ld_structured r7.xyz, r6.z, l(0), g0.xyzx
add r7.xyz, -r3.xyzx, r7.xyzx
dp3 r6.z, -r4.xyzx, r7.xyzx
ge r6.w, r6.z, l(0.000000)
mul r7.w, r6.z, r6.z
dp3 r8.x, r7.xyzx, r7.xyzx
mul r8.x, r2.z, r8.x
ge r7.w, r7.w, r8.x
and r6.w, r6.w, r7.w
dp3 r7.w, -r4.xyzx, r5.xzwx
ge r8.y, r7.w, l(0.000000)
mul r7.w, r7.w, r7.w
dp3 r8.z, r5.xzwx, r5.xzwx
mul r8.z, r2.z, r8.z
ge r7.w, r7.w, r8.z
and r7.w, r7.w, r8.y
and r7.w, r7.w, l(2)
bfi r6.w, l(1), l(0), r6.w, r7.w
ieq r7.w, r6.w, l(3)
if_nz r7.w
mov r8.y, l(-1)
endif
if_z r7.w
add r9.xyz, r5.xzwx, -r7.xyzx
dp3 r7.w, -r4.xyzx, r9.xyzx
dp3 r8.z, r9.xyzx, r9.xyzx
mul r8.z, r2.z, r8.z
mad r8.z, r7.w, r7.w, -r8.z
dp3 r8.w, r9.xyzx, r7.xyzx
mul r8.w, r2.z, r8.w
mad r7.w, r6.z, r7.w, -r8.w
add r8.w, r7.w, r7.w
mad r6.z, r6.z, r6.z, -r8.x
mul r6.z, r8.z, r6.z
mul r6.z, r6.z, l(4.000000)
mad r6.z, r8.w, r8.w, -r6.z
ne r8.x, r8.z, l(0.000000)
ge r8.w, r6.z, l(0.000000)
and r8.x, r8.w, r8.x
if_z r8.x
mov r8.y, l(0)
endif
if_nz r8.x
sqrt r6.z, r6.z
add r8.x, r8.z, r8.z
rcp r8.x, r8.x
mad r8.z, -r7.w, l(2.000000), r6.z
mul r8.z, r8.x, r8.z
mad r6.z, -r7.w, l(2.000000), -r6.z
mul r6.z, r8.x, r6.z
if_nz r6.w
lt r7.w, l(0.000000), r8.z
lt r8.x, r8.z, l(1.000000)
and r7.w, r7.w, r8.x
movc r7.w, r7.w, r8.z, r6.z
mad r10.xyz, r9.xyzx, r7.wwww, r7.xyzx
ieq r7.w, r6.w, l(1)
movc r7.xyz, r7.wwww, r7.xyzx, r10.xyzx
movc r5.xzw, r7.wwww, r10.xxyz, r5.xxzw
mov r8.y, l(-1)
endif
if_z r6.w
ge r6.w, l(0.000000), r8.z
ge r7.w, r8.z, l(1.000000)
or r6.w, r6.w, r7.w
if_nz r6.w
mov r8.y, l(0)
endif
if_z r6.w
mad r5.xzw, r9.xxyz, r6.zzzz, r7.xxyz
mad r7.xyz, r9.xyzx, r8.zzzz, r7.xyzx
dp3 r6.z, r7.xyzx, -r4.xyzx
ge r8.y, r6.z, l(0.000000)
endif
endif
endif
endif
add r7.xyz, -r5.xzwx, r7.xyzx
dp3 r6.z, r7.xyzx, r7.xyzx
lt r6.w, l(0.000000), r6.z
dp3 r7.w, r5.xzwx, r7.xyzx
div_sat r6.z, -r7.w, r6.z
and r6.z, r6.z, r6.w
mad r5.xzw, r7.xxyz, r6.zzzz, r5.xxzw
dp3 r5.x, r5.xzwx, r5.xzwx
lt r5.x, r5.x, r3.w
and r5.x, r8.y, r5.x
if_nz r5.x
mov r6.x, l(-1)
mov r2.w, l(-1)
break
endif
iadd r6.y, r6.y, l(2)
mov r2.w, r5.x
endloop
mov r4.w, r6.x
if_z r2.w
mov r4.w, l(0)
endif
endif
else
mov r2.z, l(0)
mov r4.x, l(0)
loop
uge r4.y, r4.x, l(4)
breakc_nz r4.y
ishl r4.y, r4.x, l(1)
ld_structured r7.xyzw, r4.y, l(0), g0.xyzw
imad r4.y, r4.x, l(2), l(1)
ld_structured r5.xzw, r4.y, l(0), g0.xxyz
add r5.xzw, -r7.xxyz, r5.xxzw
add r6.yzw, r3.xxyz, -r7.xxyz
dp3 r4.y, r6.yzwy, r5.xzwx
mul_sat r4.y, r7.w, r4.y
mad r5.xzw, r5.xxzw, r4.yyyy, r7.xxyz
add r5.xzw, r3.xxyz, -r5.xxzw
dp3 r4.y, r5.xzwx, r5.xzwx
lt r4.y, r4.y, r3.w
and r4.y, r4.y, l(1)
or r2.z, r2.z, r4.y
iadd r4.x, r4.x, l(1)
endloop
ine r4.w, r2.z, l(0)
endif
if_nz r4.w
imm_atomic_iadd r3.x, g4, l(0), l(1)
ult r3.y, r3.x, l(512)
if_nz r3.y
store_structured g2.x, r3.x, l(0), r2.y
endif
endif
iadd r2.x, r2.x, l(32)
endloop
sync_g_t
if_z vThreadIDInGroupFlattened.x
ld_raw r2.x, l(0), g4.xxxx
ld_raw r2.y, l(0), g3.xxxx
iadd r2.x, r2.x, r2.y
store_raw g3.x, l(0), r2.x
endif
iadd r1.x, r1.y, r1.x
sync_g_t
endif
if_nz r0.y
mov r1.y, vThreadIDInGroupFlattened.x
loop
uge r2.x, r1.y, r0.y
breakc_nz r2.x
iadd r2.x, r1.x, r1.y
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.x, r2.x, l(0), t9.xxxx
ld_structured_indexable(structured_buffer, stride=304)(mixed,mixed,mixed,mixed) r3.xyzw, r2.x, l(0), t3.xyzw
ld_structured_indexable(structured_buffer, stride=304)(mixed,mixed,mixed,mixed) r2.yz, r2.x, l(80), t3.xxyx
div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
lt r3.w, r2.z, l(2.000000)
if_nz r3.w
ld_structured_indexable(structured_buffer, stride=304)(mixed,mixed,mixed,mixed) r4.xyz, r2.x, l(32), t3.xyzx
dp3 r3.w, r3.xyzx, r4.xyzx
mov r4.w, l(0)
mov r5.x, l(0)
loop
uge r5.y, r4.w, l(8)
breakc_nz r5.y
ld_structured r5.yzw, r4.w, l(0), g0.xxyz
iadd r6.x, r4.w, l(1)
ld_structured r6.xyz, r6.x, l(0), g0.xyzx
dp3 r5.y, r4.xyzx, r5.yzwy
lt r5.y, r5.y, r3.w
and r5.y, r5.y, l(1)
or r5.y, r5.y, r5.x
dp3 r5.z, r4.xyzx, r6.xyzx
lt r5.z, r5.z, r3.w
and r5.z, r5.z, l(1)
or r5.x, r5.z, r5.y
iadd r4.w, r4.w, l(2)
endloop
if_z r5.x
mov r3.w, l(0)
endif
if_nz r5.x
div r2.y, r2.z, -r2.y
mul r2.y, r2.y, r2.y
mov r6.x, r3.w
mov r6.y, l(0)
mov r2.z, l(0)
loop
uge r4.w, r6.y, l(8)
mov r2.z, l(0)
breakc_nz r4.w
// second light popin
// ld_structured r5.yzw, r6.y, l(0), g0.xxyz
add r5.yzw, -r3.xxyz, r5.yyzw
iadd r4.w, r6.y, l(1)
ld_structured r7.xyz, r4.w, l(0), g0.xyzx
add r7.xyz, -r3.xyzx, r7.xyzx
dp3 r4.w, -r4.xyzx, r7.xyzx
ge r6.z, r4.w, l(0.000000)
mul r6.w, r4.w, r4.w
dp3 r7.w, r7.xyzx, r7.xyzx
mul r7.w, r2.y, r7.w
ge r6.w, r6.w, r7.w
and r6.z, r6.w, r6.z
dp3 r6.w, -r4.xyzx, r5.yzwy
ge r8.x, r6.w, l(0.000000)
mul r6.w, r6.w, r6.w
dp3 r8.y, r5.yzwy, r5.yzwy
mul r8.y, r2.y, r8.y
ge r6.w, r6.w, r8.y
and r6.w, r6.w, r8.x
and r6.w, r6.w, l(2)
bfi r6.z, l(1), l(0), r6.z, r6.w
ieq r6.w, r6.z, l(3)
if_nz r6.w
mov r8.x, l(-1)
endif
if_z r6.w
add r8.yzw, r5.yyzw, -r7.xxyz
dp3 r6.w, -r4.xyzx, r8.yzwy
dp3 r9.x, r8.yzwy, r8.yzwy
mul r9.x, r2.y, r9.x
mad r9.x, r6.w, r6.w, -r9.x
dp3 r9.y, r8.yzwy, r7.xyzx
mul r9.y, r2.y, r9.y
mad r6.w, r4.w, r6.w, -r9.y
add r9.y, r6.w, r6.w
mad r4.w, r4.w, r4.w, -r7.w
mul r4.w, r9.x, r4.w
mul r4.w, r4.w, l(4.000000)
mad r4.w, r9.y, r9.y, -r4.w
ne r7.w, r9.x, l(0.000000)
ge r9.y, r4.w, l(0.000000)
and r7.w, r7.w, r9.y
if_z r7.w
mov r8.x, l(0)
endif
if_nz r7.w
sqrt r4.w, r4.w
add r7.w, r9.x, r9.x
rcp r7.w, r7.w
mad r9.x, -r6.w, l(2.000000), r4.w
mul r9.x, r7.w, r9.x
mad r4.w, -r6.w, l(2.000000), -r4.w
mul r4.w, r7.w, r4.w
if_nz r6.z
lt r6.w, l(0.000000), r9.x
lt r7.w, r9.x, l(1.000000)
and r6.w, r6.w, r7.w
movc r6.w, r6.w, r9.x, r4.w
mad r9.yzw, r8.yyzw, r6.wwww, r7.xxyz
ieq r6.w, r6.z, l(1)
movc r7.xyz, r6.wwww, r7.xyzx, r9.yzwy
movc r5.yzw, r6.wwww, r9.yyzw, r5.yyzw
mov r8.x, l(-1)
endif
if_z r6.z
ge r6.z, l(0.000000), r9.x
ge r6.w, r9.x, l(1.000000)
or r6.z, r6.w, r6.z
if_nz r6.z
mov r8.x, l(0)
endif
if_z r6.z
mad r5.yzw, r8.yyzw, r4.wwww, r7.xxyz
mad r7.xyz, r8.yzwy, r9.xxxx, r7.xyzx
dp3 r4.w, r7.xyzx, -r4.xyzx
ge r8.x, r4.w, l(0.000000)
endif
endif
endif
endif
add r7.xyz, -r5.yzwy, r7.xyzx
dp3 r4.w, r7.xyzx, r7.xyzx
lt r6.z, l(0.000000), r4.w
dp3 r6.w, r5.yzwy, r7.xyzx
div_sat r4.w, -r6.w, r4.w
and r4.w, r4.w, r6.z
mad r5.yzw, r7.xxyz, r4.wwww, r5.yyzw
dp3 r4.w, r5.yzwy, r5.yzwy
lt r4.w, r4.w, r2.w
and r4.w, r8.x, r4.w
if_nz r4.w
mov r6.x, l(-1)
mov r2.z, l(-1)
break
endif
iadd r6.y, r6.y, l(2)
mov r2.z, r4.w
endloop
mov r3.w, r6.x
if_z r2.z
mov r3.w, l(0)
endif
endif
else
mov r2.y, l(0)
mov r4.x, l(0)
loop
uge r4.y, r4.x, l(4)
breakc_nz r4.y
ishl r4.y, r4.x, l(1)
ld_structured r7.xyzw, r4.y, l(0), g0.xyzw
imad r4.y, r4.x, l(2), l(1)
ld_structured r4.yzw, r4.y, l(0), g0.xxyz
add r4.yzw, -r7.xxyz, r4.yyzw
add r5.yzw, r3.xxyz, -r7.xxyz
dp3 r5.y, r5.yzwy, r4.yzwy
mul_sat r5.y, r7.w, r5.y
mad r4.yzw, r4.yyzw, r5.yyyy, r7.xxyz
add r4.yzw, r3.xxyz, -r4.yyzw
dp3 r4.y, r4.yzwy, r4.yzwy
lt r4.y, r4.y, r2.w
and r4.y, r4.y, l(1)
or r2.y, r2.y, r4.y
iadd r4.x, r4.x, l(1)
endloop
ine r3.w, r2.y, l(0)
endif
if_nz r3.w
imm_atomic_iadd r3.x, g5, l(0), l(1)
ld_raw r2.w, l(0), g3.xxxx
iadd r2.w, r2.w, r3.x
ult r3.x, r2.w, l(512)
if_nz r3.x
store_structured g2.x, r2.w, l(0), r2.x
endif
endif
iadd r1.y, r1.y, l(32)
endloop
sync_g_t
if_z vThreadIDInGroupFlattened.x
ld_raw r1.y, l(0), g5.xxxx
ld_raw r2.x, l(0), g3.xxxx
iadd r1.y, r1.y, r2.x
store_raw g3.x, l(0), r1.y
endif
iadd r1.x, r0.y, r1.x
sync_g_t
endif
if_nz r1.z
mov r0.y, vThreadIDInGroupFlattened.x
loop
uge r1.y, r0.y, r1.z
breakc_nz r1.y
iadd r1.y, r1.x, r0.y
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r1.y, r1.y, l(0), t9.xxxx
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r2.xyzw, r1.y, l(0), t4.xyzw
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r3.x, r1.y, l(112), t4.xxxx
div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w
mov r3.yz, l(0,0,0,0)
loop
uge r3.w, r3.z, l(4)
breakc_nz r3.w
ishl r3.w, r3.z, l(1)
ld_structured r4.xyzw, r3.w, l(0), g0.xyzw
imad r3.w, r3.z, l(2), l(1)
ld_structured r5.xyz, r3.w, l(0), g0.xyzx
add r5.xyz, -r4.xyzx, r5.xyzx
add r6.xyz, r2.xyzx, -r4.xyzx
dp3 r3.w, r6.xyzx, r5.xyzx
mul_sat r3.w, r4.w, r3.w
mad r4.xyz, r5.xyzx, r3.wwww, r4.xyzx
add r4.xyz, r2.xyzx, -r4.xyzx
dp3 r3.w, r4.xyzx, r4.xyzx
lt r3.w, r3.w, r2.w
and r3.w, r3.w, l(1)
or r3.y, r3.w, r3.y
iadd r3.z, r3.z, l(1)
endloop
ine r3.z, r3.y, l(0)
ftou r3.x, r3.x
ieq r3.xw, r3.xxxx, l(5, 0, 0, 4)
or r3.x, r3.w, r3.x
and r3.x, r3.x, r3.z
if_nz r3.x
ld_structured_indexable(structured_buffer, stride=144)(mixed,mixed,mixed,mixed) r4.xyz, r1.y, l(32), t4.xyzx
dp3 r3.x, r2.xyzx, r4.xyzx
mov r3.w, l(0)
mov r4.w, l(0)
loop
uge r5.x, r3.w, l(8)
breakc_nz r5.x
ld_structured r5.xyz, r3.w, l(0), g0.xyzx
iadd r5.w, r3.w, l(1)
ld_structured r6.xyz, r5.w, l(0), g0.xyzx
dp3 r5.x, r4.xyzx, r5.xyzx
lt r5.x, r5.x, r3.x
and r5.x, r5.x, l(1)
or r5.x, r4.w, r5.x
dp3 r5.y, r4.xyzx, r6.xyzx
lt r5.y, r5.y, r3.x
and r5.y, r5.y, l(1)
or r4.w, r5.y, r5.x
iadd r3.w, r3.w, l(2)
endloop
if_z r4.w
mov r3.z, l(0)
endif
if_nz r4.w
mov r3.xw, l(0,0,0,0)
loop
//third light popin
uge r4.x, r3.w, l(4)
breakc_nz r4.x
ishl r4.x, r3.w, l(1)
ld_structured r5.xyzw, r4.x, l(0), g0.xyzw
imad r4.x, r3.w, l(2), l(1)
ld_structured r4.xyz, r4.x, l(0), g0.xyzx
add r4.xyz, -r5.xyzx, r4.xyzx
add r6.xyz, r2.xyzx, -r5.xyzx
dp3 r6.x, r6.xyzx, r4.xyzx
mul_sat r5.w, r5.w, r6.x
mad r4.xyz, r4.xyzx, r5.wwww, r5.xyzx
add r4.xyz, r2.xyzx, -r4.xyzx
dp3 r4.x, r4.xyzx, r4.xyzx
lt r4.x, r4.x, r2.w
and r4.x, r4.x, l(1)
or r3.x, r3.x, r4.x
iadd r3.w, r3.w, l(1)
endloop
ine r3.z, r3.x, l(0)
endif
endif
if_nz r3.z
imm_atomic_iadd r2.x, g6, l(0), l(1)
ld_raw r2.y, l(0), g3.xxxx
iadd r2.x, r2.y, r2.x
ult r2.y, r2.x, l(512)
if_nz r2.y
store_structured g2.x, r2.x, l(0), r1.y
endif
endif
iadd r0.y, r0.y, l(32)
endloop
sync_g_t
if_z vThreadIDInGroupFlattened.x
ld_raw r0.y, l(0), g6.xxxx
ld_raw r1.y, l(0), g3.xxxx
iadd r0.y, r0.y, r1.y
store_raw g3.x, l(0), r0.y
endif
iadd r1.x, r1.z, r1.x
sync_g_t
endif
if_nz r0.z
mov r0.y, vThreadIDInGroupFlattened.x
loop
uge r1.y, r0.y, r0.z
breakc_nz r1.y
iadd r1.y, r1.x, r0.y
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r1.y, r1.y, l(0), t9.xxxx
ld_structured_indexable(structured_buffer, stride=336)(mixed,mixed,mixed,mixed) r2.xyzw, r1.y, l(0), t5.xyzw
ld_structured_indexable(structured_buffer, stride=336)(mixed,mixed,mixed,mixed) r1.z, r1.y, l(112), t5.xxxx
div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w
mov r3.xy, l(0,0,0,0)
loop
uge r3.z, r3.y, l(4)
breakc_nz r3.z
ishl r3.z, r3.y, l(1)
ld_structured r4.xyzw, r3.z, l(0), g0.xyzw
imad r3.z, r3.y, l(2), l(1)
ld_structured r5.xyz, r3.z, l(0), g0.xyzx
add r5.xyz, -r4.xyzx, r5.xyzx
add r6.xyz, r2.xyzx, -r4.xyzx
dp3 r3.z, r6.xyzx, r5.xyzx
mul_sat r3.z, r4.w, r3.z
mad r4.xyz, r5.xyzx, r3.zzzz, r4.xyzx
add r4.xyz, r2.xyzx, -r4.xyzx
dp3 r3.z, r4.xyzx, r4.xyzx
lt r3.z, r3.z, r2.w
and r3.z, r3.z, l(1)
or r3.x, r3.z, r3.x
iadd r3.y, r3.y, l(1)
endloop
ine r3.y, r3.x, l(0)
ftou r1.z, r1.z
ieq r3.zw, r1.zzzz, l(0, 0, 5, 4)
or r1.z, r3.w, r3.z
and r1.z, r1.z, r3.y
if_nz r1.z
ld_structured_indexable(structured_buffer, stride=336)(mixed,mixed,mixed,mixed) r4.xyz, r1.y, l(32), t5.xyzx
dp3 r1.z, r2.xyzx, r4.xyzx
mov r3.zw, l(0,0,0,0)
loop
uge r4.w, r3.z, l(8)
breakc_nz r4.w
ld_structured r5.xyz, r3.z, l(0), g0.xyzx
iadd r4.w, r3.z, l(1)
ld_structured r6.xyz, r4.w, l(0), g0.xyzx
dp3 r4.w, r4.xyzx, r5.xyzx
lt r4.w, r4.w, r1.z
and r4.w, r4.w, l(1)
or r4.w, r3.w, r4.w
dp3 r5.x, r4.xyzx, r6.xyzx
lt r5.x, r5.x, r1.z
and r5.x, r5.x, l(1)
or r3.w, r4.w, r5.x
iadd r3.z, r3.z, l(2)
endloop
if_z r3.w
mov r3.y, l(0)
endif
if_nz r3.w
mov r1.z, l(0)
mov r3.z, l(0)
loop
//4th popin light
uge r4.x, r3.z, l(4)
breakc_nz r4.x
ishl r4.x, r3.z, l(1)
ld_structured r4.xyzw, r4.x, l(0), g0.xyzw
imad r5.x, r3.z, l(2), l(1)
ld_structured r5.xyz, r5.x, l(0), g0.xyzx
add r5.xyz, -r4.xyzx, r5.xyzx
add r6.xyz, r2.xyzx, -r4.xyzx
dp3 r5.w, r6.xyzx, r5.xyzx
mul_sat r4.w, r4.w, r5.w
mad r4.xyz, r5.xyzx, r4.wwww, r4.xyzx
add r4.xyz, r2.xyzx, -r4.xyzx
dp3 r4.x, r4.xyzx, r4.xyzx
lt r4.x, r4.x, r2.w
and r4.x, r4.x, l(1)
or r1.z, r1.z, r4.x
iadd r3.z, r3.z, l(1)
endloop
ine r3.y, r1.z, l(0)
endif
endif
if_nz r3.y
imm_atomic_iadd r2.x, g7, l(0), l(1)
ld_raw r2.y, l(0), g3.xxxx
iadd r2.x, r2.y, r2.x
ult r2.y, r2.x, l(512)
if_nz r2.y
store_structured g2.x, r2.x, l(0), r1.y
endif
endif
iadd r0.y, r0.y, l(32)
endloop
sync_g_t
if_z vThreadIDInGroupFlattened.x
ld_raw r0.y, l(0), g7.xxxx
ld_raw r1.y, l(0), g3.xxxx
iadd r0.y, r0.y, r1.y
store_raw g3.x, l(0), r0.y
endif
iadd r1.x, r0.z, r1.x
sync_g_t
endif
if_nz r0.w
mov r2.w, l(1.000000)
mov r3.w, l(1.000000)
mov r0.y, vThreadIDInGroupFlattened.x
loop
uge r0.z, r0.y, r0.w
breakc_nz r0.z
iadd r0.z, r1.x, r0.y
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.z, r0.z, l(0), t9.xxxx
ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r4.xyzw, r0.z, l(0), t7.xyzw
mov r1.yz, l(0,0,0,0)
loop
uge r5.x, r1.z, l(4)
breakc_nz r5.x
ishl r5.x, r1.z, l(1)
ld_structured r5.xyzw, r5.x, l(0), g0.xyzw
imad r6.x, r1.z, l(2), l(1)
ld_structured r6.xyz, r6.x, l(0), g0.xyzx
add r6.xyz, -r5.xyzx, r6.xyzx
add r7.xyz, r4.xyzx, -r5.xyzx
dp3 r6.w, r7.xyzx, r6.xyzx
mul_sat r5.w, r5.w, r6.w
mad r5.xyz, r6.xyzx, r5.wwww, r5.xyzx
add r5.xyz, r4.xyzx, -r5.xyzx
dp3 r5.x, r5.xyzx, r5.xyzx
lt r5.x, r5.x, r4.w
and r5.x, r5.x, l(1)
or r1.y, r1.y, r5.x
iadd r1.z, r1.z, l(1)
endloop
if_nz r1.y
ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r4.xyzw, r0.z, l(16), t7.xyzw
ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r5.xyzw, r0.z, l(32), t7.xyzw
ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r6.xyzw, r0.z, l(48), t7.xyzw
ld_structured_indexable(structured_buffer, stride=256)(mixed,mixed,mixed,mixed) r7.xyz, r0.z, l(208), t7.xyzx
mov r1.z, l(0)
mov r7.w, l(0)
loop
uge r8.x, r7.w, l(8)
breakc_nz r8.x
ld_structured r2.xyz, r7.w, l(0), g0.xyzx
dp4 r8.x, r2.xyzw, r4.xyzw
dp4 r8.y, r2.xyzw, r5.xyzw
dp4 r8.z, r2.xyzw, r6.xyzw
iadd r2.x, r7.w, l(1)
ld_structured r3.xyz, r2.x, l(0), g0.xyzx
dp4 r2.x, r3.xyzw, r4.xyzw
dp4 r2.y, r3.xyzw, r5.xyzw
dp4 r2.z, r3.xyzw, r6.xyzw
add r9.xyzw, -r8.yzzx, r2.yzzx
mul r10.xyzw, r9.xyzw, l(0.500000, 0.500000, 0.500000, 0.500000)
mad r8.xyzw, r9.zxwz, l(0.500000, 0.500000, 0.500000, 0.500000), r8.zyxz
add r2.xyz, r7.xyzx, |r10.wxzw|
ge r2.xyz, r2.xyzx, |r8.zywz|
and r2.x, r2.x, r2.y
and r2.x, r2.x, r2.z
mul r2.yz, r8.yywy, r10.yywy
mad r2.yz, r10.xxzx, r8.xxzx, -r2.yyzy
dp2 r3.x, r7.zyzz, |r10.xzxx|
add r3.x, r3.x, l(0.001000)
ge r2.y, r3.x, |r2.y|
and r2.x, r2.x, r2.y
dp2 r2.y, r7.xzxx, |r10.zwzz|
add r2.y, r2.y, l(0.001000)
ge r2.y, r2.y, |r2.z|
and r2.x, r2.x, r2.y
mul r2.y, r8.z, r10.x
mad r2.y, r10.w, r8.y, -r2.y
dp2 r2.z, r7.xyxx, |r10.xwxx|
add r2.z, r2.z, l(0.001000)
ge r2.y, r2.z, |r2.y|
and r2.x, r2.x, r2.y
or r1.z, r1.z, r2.x
iadd r7.w, r7.w, l(2)
endloop
else
mov r1.z, l(0)
endif
if_nz r1.z
imm_atomic_iadd r4.x, g9, l(0), l(1)
ld_raw r2.x, l(0), g3.xxxx
iadd r2.x, r2.x, r4.x
ult r2.y, r2.x, l(512)
if_nz r2.y
store_structured g2.x, r2.x, l(0), r0.z
endif
endif
iadd r0.y, r0.y, l(32)
endloop
sync_g_t
if_z vThreadIDInGroupFlattened.x
ld_raw r0.y, l(0), g9.xxxx
ld_raw r0.z, l(0), g3.xxxx
iadd r0.y, r0.y, r0.z
store_raw g3.x, l(0), r0.y
endif
iadd r1.x, r0.w, r1.x
sync_g_t
endif
if_nz r1.w
mov r2.w, l(1.000000)
mov r3.w, l(1.000000)
mov r0.y, vThreadIDInGroupFlattened.x
loop
uge r0.z, r0.y, r1.w
breakc_nz r0.z
iadd r0.z, r1.x, r0.y
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.z, r0.z, l(0), t9.xxxx
ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r4.xyzw, r0.z, l(0), t6.xyzw
mov r0.w, l(0)
mov r1.y, l(0)
loop

// another light (Ground light) disable is better enables ground light)
uge r1.z, r1.y, l(4)
breakc_nz r1.z
ishl r1.z, r1.y, l(1)
// ld_structured r5.xyzw, r1.z, l(0), g0.xyzw
imad r1.z, r1.y, l(2), l(1)
ld_structured r6.xyz, r1.z, l(0), g0.xyzx
add r6.xyz, -r5.xyzx, r6.xyzx
add r7.xyz, r4.xyzx, -r5.xyzx
dp3 r1.z, r7.xyzx, r6.xyzx
mul_sat r1.z, r5.w, r1.z
mad r5.xyz, r6.xyzx, r1.zzzz, r5.xyzx
add r5.xyz, r4.xyzx, -r5.xyzx
dp3 r1.z, r5.xyzx, r5.xyzx
lt r1.z, r1.z, r4.w
and r1.z, r1.z, l(1)
or r0.w, r0.w, r1.z
iadd r1.y, r1.y, l(1)
endloop
if_nz r0.w
ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r4.xyzw, r0.z, l(16), t6.xyzw
ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r5.xyzw, r0.z, l(32), t6.xyzw
ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r6.xyzw, r0.z, l(48), t6.xyzw
ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r7.xyz, r0.z, l(80), t6.xyzx
mov r1.yz, l(0,0,0,0)
loop
uge r7.w, r1.z, l(8)
breakc_nz r7.w
// ld_structured r2.xyz, r1.z, l(0), g0.xyzx
dp4 r8.x, r2.xyzw, r4.xyzw
dp4 r8.y, r2.xyzw, r5.xyzw
dp4 r8.z, r2.xyzw, r6.xyzw
iadd r2.x, r1.z, l(1)
ld_structured r3.xyz, r2.x, l(0), g0.xyzx
dp4 r2.x, r3.xyzw, r4.xyzw
dp4 r2.y, r3.xyzw, r5.xyzw
dp4 r2.z, r3.xyzw, r6.xyzw
add r9.xyzw, -r8.yzzx, r2.yzzx
mul r10.xyzw, r9.xyzw, l(0.500000, 0.500000, 0.500000, 0.500000)
mad r8.xyzw, r9.zxwz, l(0.500000, 0.500000, 0.500000, 0.500000), r8.zyxz
add r2.xyz, r7.xyzx, |r10.wxzw|
ge r2.xyz, r2.xyzx, |r8.zywz|
and r2.x, r2.x, r2.y
and r2.x, r2.x, r2.z
mul r2.yz, r8.yywy, r10.yywy
mad r2.yz, r10.xxzx, r8.xxzx, -r2.yyzy
dp2 r3.x, r7.zyzz, |r10.xzxx|
add r3.x, r3.x, l(0.001000)
ge r2.y, r3.x, |r2.y|
and r2.x, r2.x, r2.y
dp2 r2.y, r7.xzxx, |r10.zwzz|
add r2.y, r2.y, l(0.001000)
ge r2.y, r2.y, |r2.z|
and r2.x, r2.x, r2.y
mul r2.y, r8.z, r10.x
mad r2.y, r10.w, r8.y, -r2.y
dp2 r2.z, r7.xyxx, |r10.xwxx|
add r2.z, r2.z, l(0.001000)
ge r2.y, r2.z, |r2.y|
and r2.x, r2.x, r2.y
or r1.y, r1.y, r2.x
iadd r1.z, r1.z, l(2)
endloop
else
mov r1.y, l(0)
endif
if_nz r1.y
imm_atomic_iadd r4.x, g8, l(0), l(1)
ld_raw r1.z, l(0), g3.xxxx
iadd r1.z, r1.z, r4.x
ult r2.x, r1.z, l(512)
if_nz r2.x
store_structured g2.x, r1.z, l(0), r0.z
endif
endif
iadd r0.y, r0.y, l(32)
endloop
sync_g_t
if_z vThreadIDInGroupFlattened.x
ld_raw r0.y, l(0), g8.xxxx
ld_raw r0.z, l(0), g3.xxxx
iadd r0.y, r0.y, r0.z
store_raw g3.x, l(0), r0.y
endif
sync_g_t
endif
if_z vThreadIDInGroupFlattened.x
ld_raw r0.y, l(0), g3.xxxx
if_nz r0.y
umin r0.y, r0.y, l(512)
store_raw g3.x, l(0), r0.y
imm_atomic_iadd r1.x, u2, l(0), r0.y
store_raw g1.x, l(0), r1.x
iadd r0.y, r0.y, r1.x
ult r0.y, cb0[5].z, r0.y
if_nz r0.y
store_raw g3.x, l(0), l(0)
endif
ld_raw r0.y, l(0), g5.xxxx
ld_raw r0.z, l(0), g4.xxxx
bfi r1.y, l(16), l(16), r0.y, r0.z
ld_raw r0.y, l(0), g7.xxxx
ld_raw r0.z, l(0), g6.xxxx
bfi r1.z, l(16), l(16), r0.y, r0.z
ld_raw r0.y, l(0), g9.xxxx
ld_raw r0.z, l(0), g8.xxxx
bfi r1.w, l(16), l(16), r0.y, r0.z
else
mov r1.xyzw, l(0,0,0,0)
endif
store_structured u0.xyzw, r0.x, l(0), r1.xyzw
endif
sync_g_t
ld_raw r0.x, l(0), g3.xxxx
if_nz r0.x
ld_raw r0.y, l(0), g1.xxxx
mov r0.z, vThreadIDInGroupFlattened.x
loop
uge r0.w, r0.z, r0.x
breakc_nz r0.w
iadd r0.w, r0.y, r0.z
//changed to G5 --- improving stability of crashes
ld_structured r1.x, r0.z, l(0), g5.xxxx
store_structured u1.x, r0.w, l(0), r1.x
iadd r0.z, r0.z, l(32)
endloop
endif
ret
// Approximately 0 instruction slots used

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 04/23/2017 07:34 PM   
Thanks for the shader. Normally you wouldn't need to modify anything in this shader as this one is called by another Compute shader. The problem with the game is the Frostbite3 Engine and 3D Vision Automatic FAILING to stereorize what it should stereorized. Some shaders are only CALLED for the RIGHT EYE for example! There isn't anything we can do about it to make it work:( (from what I know) I'll give your shader a go;) In the end is up to you how you want to make it work:) Regarding the crashes, I get zero crashes under Windows 7 but crashes alot on Windows 10.... Same driver... bah..
Thanks for the shader. Normally you wouldn't need to modify anything in this shader as this one is called by another Compute shader.

The problem with the game is the Frostbite3 Engine and 3D Vision Automatic FAILING to stereorize what it should stereorized.
Some shaders are only CALLED for the RIGHT EYE for example! There isn't anything we can do about it to make it work:( (from what I know)

I'll give your shader a go;) In the end is up to you how you want to make it work:)
Regarding the crashes, I get zero crashes under Windows 7 but crashes alot on Windows 10.... Same driver... bah..

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 04/23/2017 07:59 PM   
Re-Uploaded the v.60 fix. It has a few bad shaders that was preventing the F12 to work properly. One thing to note: If you don't modify any shaders (especially CS) F12 works as advertised. If you make your own modifications, you are on your own and F12 will break. You can always look into my fixed CS to see how to add the "if_nz" clause to check for the Key Press. Cheers!
Re-Uploaded the v.60 fix.
It has a few bad shaders that was preventing the F12 to work properly.
One thing to note: If you don't modify any shaders (especially CS) F12 works as advertised. If you make your own modifications, you are on your own and F12 will break.
You can always look into my fixed CS to see how to add the "if_nz" clause to check for the Key Press.

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)

Posted 04/23/2017 08:25 PM   
  18 / 27    
Scroll To Top