[quote="DarkStarSword"][quote="helifax"]Ok, managed to get the CS working! yey!!!
(I'll come back to this a bit later on).[/quote]What was the issue with that?[/quote]
Awesome JOB DarkStarSword! I'll wrap everything tonight and do some testing;) Can you please make a video recording (like you did the one for hunting shadows) but that shows how you used 3D Migoto to hunt down the CS shader responsible for the Tile Lighting? I read you post again and I gave it a try...but I didn't get that far... Do you think I might have missed a step of a setting in the ini file?? If is not too much hussle a quick, dirty video showing this would be awesome for all future games at it seems it becomes more and more main-stream to use TIle Lighting;)
Back to the question:
Initially I did like this:
[code]
ult r4.x, r3.y, r0.x
ieq r4.yz, r3.wwww, l(0, 0, 1, 0)
or r4.y, r4.z, r4.y
and r4.x, r4.y, r4.x
breakc_z r4.x
// STiledLightData.vPosition:
ld_indexable(texture2d)(float,float,float,float) r13.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r4.xyzw, r3.z, l(0), t4.xyzw
add r13.w, r4.z, -r13.y
mul r13.w, r13.w, r13.x
mul r13.w, r13.w, l(0.5)
add r4.x, r4.x, r13.w
ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r5.xyz, r3.z, l(16), t4.xyzx
ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r6.xy, r3.z, l(104), t4.xyxx
ieq r5.w, r6.x, l(1)
movc r5.w, r5.w, l(1), l(4)
mov r6.x, r3.w
mov r6.zw, l(0,0,0,0)
loop
[/code]
Like I said before this had NO result. F10 reported the compilation was working, but no visual indication of anything actually fixed.
But, when I did it like this, IT WORKED. I think the compiler might optimize the code and for some reason this doesn't work:(
[code]
ult r4.x, r3.y, r0.x
ieq r4.yz, r3.wwww, l(0, 0, 1, 0)
or r4.y, r4.z, r4.y
and r4.x, r4.y, r4.x
breakc_z r4.x
// STiledLightData.vPosition:
ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r4.xyzw, r3.z, l(0), t4.xyzw
ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r5.xyz, r3.z, l(16), t4.xyzx
ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r6.xy, r3.z, l(104), t4.xyxx
// Move the stereo correction HERE after all "ld_structured_indexable" are executed
ld_indexable(texture2d)(float,float,float,float) r13.xyzw, l(0, 0, 0, 0), t125.xyzw
add r13.w, r4.z, -r13.y
mul r13.w, r13.w, r13.x
mul r13.w, r13.w, l(0.5)
add r4.x, r4.x, r13.w
ieq r5.w, r6.x, l(1)
movc r5.w, r5.w, l(1), l(4)
mov r6.x, r3.w
mov r6.zw, l(0,0,0,0)
loop
[/code]
Any ideas why this behaviour??
Best Regards,
Helifax
helifax said:Ok, managed to get the CS working! yey!!!
(I'll come back to this a bit later on).
What was the issue with that?
Awesome JOB DarkStarSword! I'll wrap everything tonight and do some testing;) Can you please make a video recording (like you did the one for hunting shadows) but that shows how you used 3D Migoto to hunt down the CS shader responsible for the Tile Lighting? I read you post again and I gave it a try...but I didn't get that far... Do you think I might have missed a step of a setting in the ini file?? If is not too much hussle a quick, dirty video showing this would be awesome for all future games at it seems it becomes more and more main-stream to use TIle Lighting;)
// Move the stereo correction HERE after all "ld_structured_indexable" are executed
ld_indexable(texture2d)(float,float,float,float) r13.xyzw, l(0, 0, 0, 0), t125.xyzw
add r13.w, r4.z, -r13.y
mul r13.w, r13.w, r13.x
mul r13.w, r13.w, l(0.5)
add r4.x, r4.x, r13.w
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
I checked the version you posted on pastebin and the problem was the tabs you used for indentation - Flugan's assembler was written to interpret only what the MS disassembler would produce, not all the variations that a human might do - and since the MS disassembler only ever uses spaces for indentation that's all that Flugan's assembler will accept. The _reasm.txt files we produce are there so you can check it's result and make sure it hasn't silently dropped an instruction.
Ultimately I want to improve this situation (and the indentation issue is one that we should be able to solve relatively easily), but since it works as long as you are careful and since Flugan has verified it against shaders from a huge number of games and since any changes I make introduce the risk of breaking it in subtle ways it has been a lower priority.
In the latest 3DMigoto release I included a command line decompiler, which also has Flugan's assembler hooked up (which took writing another 650 LOC and a whole new parser so that Flugan's assembler could work stand-alone, which it was not designed to do). Part of the motivation for that was so that I will be able to address issues like this more easily and add regression tests to minimise the risk of breaking anything.
I'm tracking these issues here:
https://github.com/bo3b/3Dmigoto/issues/36
For the video - sure, I'll try to find some time this weekend to record it.
I checked the version you posted on pastebin and the problem was the tabs you used for indentation - Flugan's assembler was written to interpret only what the MS disassembler would produce, not all the variations that a human might do - and since the MS disassembler only ever uses spaces for indentation that's all that Flugan's assembler will accept. The _reasm.txt files we produce are there so you can check it's result and make sure it hasn't silently dropped an instruction.
Ultimately I want to improve this situation (and the indentation issue is one that we should be able to solve relatively easily), but since it works as long as you are careful and since Flugan has verified it against shaders from a huge number of games and since any changes I make introduce the risk of breaking it in subtle ways it has been a lower priority.
In the latest 3DMigoto release I included a command line decompiler, which also has Flugan's assembler hooked up (which took writing another 650 LOC and a whole new parser so that Flugan's assembler could work stand-alone, which it was not designed to do). Part of the motivation for that was so that I will be able to address issues like this more easily and add regression tests to minimise the risk of breaking anything.
[quote="DarkStarSword"]I checked the version you posted on pastebin and the problem was the tabs you used for indentation - Flugan's assembler was written to interpret only what the MS disassembler would produce, not all the variations that a human might do - and since the MS disassembler only ever uses spaces for indentation that's all that Flugan's assembler will accept. The _reasm.txt files we produce are there so you can check it's result and make sure it hasn't silently dropped an instruction.
Ultimately I want to improve this situation (and the indentation issue is one that we should be able to solve relatively easily), but since it works as long as you are careful and since Flugan has verified it against shaders from a huge number of games and since any changes I make introduce the risk of breaking it in subtle ways it has been a lower priority.
In the latest 3DMigoto release I included a command line decompiler, which also has Flugan's assembler hooked up (which took writing another 650 LOC and a whole new parser so that Flugan's assembler could work stand-alone, which it was not designed to do). Part of the motivation for that was so that I will be able to address issues like this more easily and add regression tests to minimise the risk of breaking anything.
I'm tracking these issues here:
https://github.com/bo3b/3Dmigoto/issues/36
For the video - sure, I'll try to find some time this weekend to record it.[/quote]
Big awesome for the clarification! In any programming IDE I use tabs exactly to avoid any weird indentation if the source code is "moving" around:) I didn't realize that tabs are not ignored and the compiler just drops the lines;)
Good to know now;) Only to use spaces;)
Big thank you for the movie;) For me it will be very helpful for any future reference;) I have a few other games where I want to fix compute shaders and now that I understand the workflow it would be awesome if I would be able to do it;)
Thank you again!
DarkStarSword said:I checked the version you posted on pastebin and the problem was the tabs you used for indentation - Flugan's assembler was written to interpret only what the MS disassembler would produce, not all the variations that a human might do - and since the MS disassembler only ever uses spaces for indentation that's all that Flugan's assembler will accept. The _reasm.txt files we produce are there so you can check it's result and make sure it hasn't silently dropped an instruction.
Ultimately I want to improve this situation (and the indentation issue is one that we should be able to solve relatively easily), but since it works as long as you are careful and since Flugan has verified it against shaders from a huge number of games and since any changes I make introduce the risk of breaking it in subtle ways it has been a lower priority.
In the latest 3DMigoto release I included a command line decompiler, which also has Flugan's assembler hooked up (which took writing another 650 LOC and a whole new parser so that Flugan's assembler could work stand-alone, which it was not designed to do). Part of the motivation for that was so that I will be able to address issues like this more easily and add regression tests to minimise the risk of breaking anything.
For the video - sure, I'll try to find some time this weekend to record it.
Big awesome for the clarification! In any programming IDE I use tabs exactly to avoid any weird indentation if the source code is "moving" around:) I didn't realize that tabs are not ignored and the compiler just drops the lines;)
Good to know now;) Only to use spaces;)
Big thank you for the movie;) For me it will be very helpful for any future reference;) I have a few other games where I want to fix compute shaders and now that I understand the workflow it would be awesome if I would be able to do it;)
Thank you again!
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
Anyone has any idea?:) what I might do wrong? Doing the correction there makes absolutely no difference...
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
Actually I think the HAIR shader is this:
http://pastebin.com/fhA5Yrzx
(Shader was too long to post here)
But have no idea how to make it stereo...hmmm.. Any idea? DarkStarSword, a helping hand pretty please? ^_^
Actually I think the HAIR shader is this:
http://pastebin.com/fhA5Yrzx (Shader was too long to post here)
But have no idea how to make it stereo...hmmm.. Any idea? DarkStarSword, a helping hand pretty please? ^_^
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
Something is not quite rights... Hmm... I think I need to run the script again through all 28k shaders.... :(
Damn!
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
[quote="DarkStarSword"]All fixed. The remaining clipping was coming from LightMinMaxBuffer, which was generated from yet another shader that I tracked down in the same way as before. I also moved the correction in the shader I looked at last night as once I got into the game it was clear that it wasn't quite right.
[img]http://darkstarsword.net/rottr/ROTTR%20-%202016-02-19%20-%20173926.0.jps[/img]
[img]http://darkstarsword.net/rottr/ROTTR%20-%202016-02-19%20-%20172053.0.jps[/img]
And using a custom shader on the [Present] call to show the output of the tile lighting pixel shader in real time ;-)
[img]http://darkstarsword.net/rottr/ROTTR%20-%202016-02-19%20-%20173036.0.jps[/img]
Here's the shaders:
[url]http://darkstarsword.net/rottr/f72d0d363421b2a2-cs.txt[/url] (LightMinMaxBuffer)
[url]http://darkstarsword.net/rottr/7f7bfaf4107cba4e-cs.txt[/url] (LightIndexBuffer)
Plus the pixel shader Mike fixed that consumes LightIndexBuffer.
[/quote]
Great news! I am somewhat confused at what I was doing wrong though - I had identified the two CS's and vPosition as the variable to fix, but nothing ever happened when I made a correction. Absolutely nothing. I'd even figured out it was view space due to the way the coords were combined elsewhere in the shader. I wonder if it was the same issue that Helifax reported with tabs/spaces or whatnot? Grrrrr.... lol. Anyway, it's sorted now so that is fantastic :-)
**EDIT Actually looks like I missed shader f72... afterall (at least I can't find any attempt to fix it) so that would explain why I never got it working ;-)
DarkStarSword said:All fixed. The remaining clipping was coming from LightMinMaxBuffer, which was generated from yet another shader that I tracked down in the same way as before. I also moved the correction in the shader I looked at last night as once I got into the game it was clear that it wasn't quite right.
And using a custom shader on the [Present] call to show the output of the tile lighting pixel shader in real time ;-)
Plus the pixel shader Mike fixed that consumes LightIndexBuffer.
Great news! I am somewhat confused at what I was doing wrong though - I had identified the two CS's and vPosition as the variable to fix, but nothing ever happened when I made a correction. Absolutely nothing. I'd even figured out it was view space due to the way the coords were combined elsewhere in the shader. I wonder if it was the same issue that Helifax reported with tabs/spaces or whatnot? Grrrrr.... lol. Anyway, it's sorted now so that is fantastic :-)
**EDIT Actually looks like I missed shader f72... afterall (at least I can't find any attempt to fix it) so that would explain why I never got it working ;-)
[quote="helifax"]Something is not quite rights... Hmm... I think I need to run the script again through all 28k shaders.... :(
Damn![/quote]
Hi Helifax - what's not right?
I'll take a look at the hair
[quote="helifax"]Something is not quite rights... Hmm... I think I need to run the script again through all 28k shaders.... :(
Damn![/quote]Would you mind sending me a copy of the script? I can't promise anything in the short term, but at some point I'd like to add scripting support to 3DMigoto and this seems to be the game that will most benefit from it.
helifax said:Something is not quite rights... Hmm... I think I need to run the script again through all 28k shaders.... :(
Damn!
Would you mind sending me a copy of the script? I can't promise anything in the short term, but at some point I'd like to add scripting support to 3DMigoto and this seems to be the game that will most benefit from it.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Hair fixed:
[img]http://darkstarsword.net/rottr/ROTTR%20-%202016-02-20%20-%20184529.0.jps[/img]
Two shaders for this - one is used when the game is paused, the other while the physics are live:
[url]http://darkstarsword.net/rottr/28847888d80b0843-vs.txt[/url]
[url]http://darkstarsword.net/rottr/609b69e7ffa478fa-vs.txt[/url]
There might still be a problem with physics - it looks fine where I am in the game, but the UAV 4 output (VelocityBuffer) from the corresponding pixel shader looks very wrong in 3D.
2D VelocityBuffer (delta before / after draw call):
[img]http://darkstarsword.net/rottr/2016-02-20_00001.jpg[/img]
3D VelocityBuffer (delta before / after draw call):
[img]http://darkstarsword.net/rottr/ROTTR%20-%202016-02-20%20-%20190658.0.jps[/img]
If the hair behaves fine then whatever, but if there are any issues with it, or if it seems to affect other physics in the game we might revisit that.
There might still be a problem with physics - it looks fine where I am in the game, but the UAV 4 output (VelocityBuffer) from the corresponding pixel shader looks very wrong in 3D.
2D VelocityBuffer (delta before / after draw call):
3D VelocityBuffer (delta before / after draw call):
If the hair behaves fine then whatever, but if there are any issues with it, or if it seems to affect other physics in the game we might revisit that.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
DAMN! Big thanks DarkStarSword!
I swear to God I tried to correct it in the VS before (as normally would go when geometry is rendered in 2D), but nothing seemed to work:( I know where are 2 VS for the hair but for some reason it didn't work:( Maybe I had to correct both of them in the same time, rather than 1 at a time and look for results:))
Regarding the PhysX I wouldn't care too much. There is some flickering in SLI on tessellated geometry and grass in some parts of the game. And the PhysX seems to be a bit funky at times...
[quote="DarkStarSword"]I'll take a look at the hair
[quote="helifax"]Something is not quite rights... Hmm... I think I need to run the script again through all 28k shaders.... :(
Damn![/quote]Would you mind sending me a copy of the script? I can't promise anything in the short term, but at some point I'd like to add scripting support to 3DMigoto and this seems to be the game that will most benefit from it.[/quote]
Sure! I can send you the script I have from Mike;)
Nothing to worry about regarding the other 28K shader pass;) Already fixed it yesterday;) Basically Mike's script generated a lot of FALSE positives;) A double correction is needed for decals and other elements;)
However, the script was too broad and it also affecting geometry Rendering shaders;)
Applying the second correction made the Ambient occlusion cast on the geometry to look wrong (like a HALO) effect.
Now, per scene are around 600 shaders PS and 100+ VS. Each object has at least 2PS (one for geometry and one for reflections/other VFX). From these 2 PS per object the geometry one doesn't need the double correction;)
Having all the shaders double-corrected made the image look very wrong the moment you moved. You couldn't say exactly what was wrong (as the effect was so subtle) but ENOUGH that your brain said "something" is wrong;)
To be fair, I didn't noticed it too much on a single screen until I started the game on Surround (where due to the huge screen size everything that is not properly "align" gets even more miss-aligned) and there I saw it plain as day;)
I fixed all the problems using Regex regular expressions and found very handy tool to mass process multi-line regex expressions. I can send you the regular expression that I used to run another pass:)
I think if you will add support to 3DMigoto for mass replacement you should use regular expressions. I haven't look to see if there is a library for C/C++ that does this BUT I know Python has support. I expect a library on C/C++ will exist though;)
I swear to God I tried to correct it in the VS before (as normally would go when geometry is rendered in 2D), but nothing seemed to work:( I know where are 2 VS for the hair but for some reason it didn't work:( Maybe I had to correct both of them in the same time, rather than 1 at a time and look for results:))
Regarding the PhysX I wouldn't care too much. There is some flickering in SLI on tessellated geometry and grass in some parts of the game. And the PhysX seems to be a bit funky at times...
DarkStarSword said:I'll take a look at the hair
helifax said:Something is not quite rights... Hmm... I think I need to run the script again through all 28k shaders.... :(
Damn!
Would you mind sending me a copy of the script? I can't promise anything in the short term, but at some point I'd like to add scripting support to 3DMigoto and this seems to be the game that will most benefit from it.
Sure! I can send you the script I have from Mike;)
Nothing to worry about regarding the other 28K shader pass;) Already fixed it yesterday;) Basically Mike's script generated a lot of FALSE positives;) A double correction is needed for decals and other elements;)
However, the script was too broad and it also affecting geometry Rendering shaders;)
Applying the second correction made the Ambient occlusion cast on the geometry to look wrong (like a HALO) effect.
Now, per scene are around 600 shaders PS and 100+ VS. Each object has at least 2PS (one for geometry and one for reflections/other VFX). From these 2 PS per object the geometry one doesn't need the double correction;)
Having all the shaders double-corrected made the image look very wrong the moment you moved. You couldn't say exactly what was wrong (as the effect was so subtle) but ENOUGH that your brain said "something" is wrong;)
To be fair, I didn't noticed it too much on a single screen until I started the game on Surround (where due to the huge screen size everything that is not properly "align" gets even more miss-aligned) and there I saw it plain as day;)
I fixed all the problems using Regex regular expressions and found very handy tool to mass process multi-line regex expressions. I can send you the regular expression that I used to run another pass:)
I think if you will add support to 3DMigoto for mass replacement you should use regular expressions. I haven't look to see if there is a library for C/C++ that does this BUT I know Python has support. I expect a library on C/C++ will exist though;)
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
There is native support for regular expressions in C++, but I tried using it once and found that Microsoft's implementation is a total buggy mess for just about anything more sophisticated than .* (I don't recall exactly what I was trying to do, but it was relatively basic and the same regular expression worked fine in Python, so that didn't inspire me with much confidence to rely on their implementation for anything actually advanced).
I'm sure there's other regular expression libraries I could integrate, but I'm leaning more towards integrating Python support since it's my favorite language and regular expressions work flawlessly in it, plus I already have a bunch of Python code for manipulating HLSL and assembly shaders, including some fairly advanced routines to handle halo fixes with all sorts of edge case (check auto_fix_vertex_halo() and scan_shader() implemented in both hlsltool.py and shadertool.py).
There is native support for regular expressions in C++, but I tried using it once and found that Microsoft's implementation is a total buggy mess for just about anything more sophisticated than .* (I don't recall exactly what I was trying to do, but it was relatively basic and the same regular expression worked fine in Python, so that didn't inspire me with much confidence to rely on their implementation for anything actually advanced).
I'm sure there's other regular expression libraries I could integrate, but I'm leaning more towards integrating Python support since it's my favorite language and regular expressions work flawlessly in it, plus I already have a bunch of Python code for manipulating HLSL and assembly shaders, including some fairly advanced routines to handle halo fixes with all sorts of edge case (check auto_fix_vertex_halo() and scan_shader() implemented in both hlsltool.py and shadertool.py).
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Really appreciate your efforts here.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD
Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword
Awesome JOB DarkStarSword! I'll wrap everything tonight and do some testing;) Can you please make a video recording (like you did the one for hunting shadows) but that shows how you used 3D Migoto to hunt down the CS shader responsible for the Tile Lighting? I read you post again and I gave it a try...but I didn't get that far... Do you think I might have missed a step of a setting in the ini file?? If is not too much hussle a quick, dirty video showing this would be awesome for all future games at it seems it becomes more and more main-stream to use TIle Lighting;)
Back to the question:
Initially I did like this:
Like I said before this had NO result. F10 reported the compilation was working, but no visual indication of anything actually fixed.
But, when I did it like this, IT WORKED. I think the compiler might optimize the code and for some reason this doesn't work:(
Any ideas why this behaviour??
Best Regards,
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)
Ultimately I want to improve this situation (and the indentation issue is one that we should be able to solve relatively easily), but since it works as long as you are careful and since Flugan has verified it against shaders from a huge number of games and since any changes I make introduce the risk of breaking it in subtle ways it has been a lower priority.
In the latest 3DMigoto release I included a command line decompiler, which also has Flugan's assembler hooked up (which took writing another 650 LOC and a whole new parser so that Flugan's assembler could work stand-alone, which it was not designed to do). Part of the motivation for that was so that I will be able to address issues like this more easily and add regression tests to minimise the risk of breaking anything.
I'm tracking these issues here:
https://github.com/bo3b/3Dmigoto/issues/36
For the video - sure, I'll try to find some time this weekend to record it.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD
Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword
Big awesome for the clarification! In any programming IDE I use tabs exactly to avoid any weird indentation if the source code is "moving" around:) I didn't realize that tabs are not ignored and the compiler just drops the lines;)
Good to know now;) Only to use spaces;)
Big thank you for the movie;) For me it will be very helpful for any future reference;) I have a few other games where I want to fix compute shaders and now that I understand the workflow it would be awesome if I would be able to do it;)
Thank you again!
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)
I found a shader for the HAIR but I am having trouble trying to stereorize it:
And this is the HLSL output:
Anyone has any idea?:) what I might do wrong? Doing the correction there makes absolutely no difference...
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)
http://pastebin.com/fhA5Yrzx
(Shader was too long to post here)
But have no idea how to make it stereo...hmmm.. Any idea? DarkStarSword, a helping hand pretty please? ^_^
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)
Damn!
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)
Great news! I am somewhat confused at what I was doing wrong though - I had identified the two CS's and vPosition as the variable to fix, but nothing ever happened when I made a correction. Absolutely nothing. I'd even figured out it was view space due to the way the coords were combined elsewhere in the shader. I wonder if it was the same issue that Helifax reported with tabs/spaces or whatnot? Grrrrr.... lol. Anyway, it's sorted now so that is fantastic :-)
**EDIT Actually looks like I missed shader f72... afterall (at least I can't find any attempt to fix it) so that would explain why I never got it working ;-)
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
Hi Helifax - what's not right?
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
Would you mind sending me a copy of the script? I can't promise anything in the short term, but at some point I'd like to add scripting support to 3DMigoto and this seems to be the game that will most benefit from it.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD
Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword
Two shaders for this - one is used when the game is paused, the other while the physics are live:
http://darkstarsword.net/rottr/28847888d80b0843-vs.txt
http://darkstarsword.net/rottr/609b69e7ffa478fa-vs.txt
There might still be a problem with physics - it looks fine where I am in the game, but the UAV 4 output (VelocityBuffer) from the corresponding pixel shader looks very wrong in 3D.
2D VelocityBuffer (delta before / after draw call):
3D VelocityBuffer (delta before / after draw call):
If the hair behaves fine then whatever, but if there are any issues with it, or if it seems to affect other physics in the game we might revisit that.
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD
Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword
I swear to God I tried to correct it in the VS before (as normally would go when geometry is rendered in 2D), but nothing seemed to work:( I know where are 2 VS for the hair but for some reason it didn't work:( Maybe I had to correct both of them in the same time, rather than 1 at a time and look for results:))
Regarding the PhysX I wouldn't care too much. There is some flickering in SLI on tessellated geometry and grass in some parts of the game. And the PhysX seems to be a bit funky at times...
Sure! I can send you the script I have from Mike;)
Nothing to worry about regarding the other 28K shader pass;) Already fixed it yesterday;) Basically Mike's script generated a lot of FALSE positives;) A double correction is needed for decals and other elements;)
However, the script was too broad and it also affecting geometry Rendering shaders;)
Applying the second correction made the Ambient occlusion cast on the geometry to look wrong (like a HALO) effect.
Now, per scene are around 600 shaders PS and 100+ VS. Each object has at least 2PS (one for geometry and one for reflections/other VFX). From these 2 PS per object the geometry one doesn't need the double correction;)
Having all the shaders double-corrected made the image look very wrong the moment you moved. You couldn't say exactly what was wrong (as the effect was so subtle) but ENOUGH that your brain said "something" is wrong;)
To be fair, I didn't noticed it too much on a single screen until I started the game on Surround (where due to the huge screen size everything that is not properly "align" gets even more miss-aligned) and there I saw it plain as day;)
I fixed all the problems using Regex regular expressions and found very handy tool to mass process multi-line regex expressions. I can send you the regular expression that I used to run another pass:)
I think if you will add support to 3DMigoto for mass replacement you should use regular expressions. I haven't look to see if there is a library for C/C++ that does this BUT I know Python has support. I expect a library on C/C++ will exist though;)
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)
I'm sure there's other regular expression libraries I could integrate, but I'm leaning more towards integrating Python support since it's my favorite language and regular expressions work flawlessly in it, plus I already have a bunch of Python code for manipulating HLSL and assembly shaders, including some fairly advanced routines to handle halo fixes with all sorts of edge case (check auto_fix_vertex_halo() and scan_shader() implemented in both hlsltool.py and shadertool.py).
2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit
Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD
Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword