Kingdom Come: Deliverance - 3D-Vision Ready Fix V3.11
  3 / 18    
[quote="chtiblue"]Yeah DSS is the master Jedi and you're the apprentice ;)[/quote] Jedi have Padawan, Sith have Apprentice. Since Losti doesn't seem to be in the Dark side of the Force, I would say he is the Padawan ;)
chtiblue said:Yeah DSS is the master Jedi and you're the apprentice ;)


Jedi have Padawan, Sith have Apprentice. Since Losti doesn't seem to be in the Dark side of the Force, I would say he is the Padawan ;)

#31
Posted 03/12/2018 09:21 AM   
[quote="Laast3D"][quote="chtiblue"]Yeah DSS is the master Jedi and you're the apprentice ;)[/quote] Jedi have Padawan, Sith have Apprentice. Since Losti doesn't seem to be in the Dark side of the Force, I would say he is the Padawan ;)[/quote] Yes that's what I looking for but I didn't remember it ;)
Laast3D said:
chtiblue said:Yeah DSS is the master Jedi and you're the apprentice ;)


Jedi have Padawan, Sith have Apprentice. Since Losti doesn't seem to be in the Dark side of the Force, I would say he is the Padawan ;)


Yes that's what I looking for but I didn't remember it ;)

http://photos.3dvisionlive.com/chtiblue/album/530b52d4cb85770d6e000049/3Dvision with 49" Philips 49PUS7100 interlieved 3D (3840x2160) overide mode, GTX 1080 GFA2 EXOC, core i5 @4.3GHz, 16Gb@2130, windows 7&10 64bit, Dolby Atmos 5.1.4 Marantz 6010 AVR

#32
Posted 03/12/2018 10:11 AM   
[quote="Losti"]Just have had an idea that I will quickly try if i come home this evening. I have found an approx. formula that may work with every convergence for scaling the light. This is nothing we realy need but let us set the convergence in game with STRG+F5/F6 and the light will be correct (actually you have to use fix values for conv. if my idea is working, convergence is also free to choose (in a bit of restricted range .... ) Ill give it a try ^^[/quote] // Given, for this mathematics my prof from the past should revise my math grade ^^ Lightening is now scaling with convergence hence you are free to choose convergence !!!! ==> DAMN FCK great understanding the operations ==> BIG THY do DSS again!!!, thats not a problem anymore but if will be complicated if there is will be a complete NEW fix to do no one hav hade fixed the game engine before or "marked" respective positions but i have found some new and fixed, hence there is hope to improve my knowledge on my way to become shaderhacker ^^ but annyway ... i am still a APPRENTICE (because i am from the dark side of life ^^) Found a mathematics behind the values of the convergence i have fixed in 1.2 and made a calculation in dependence on the separation range you are, because the value needed for fixing is not every time the same ^^ YEAH ok i am proud so i have to pose ^^ [code] //light convergence scaling correction --- LOSTI sqrt r80.w, r37.y lt r82.x, r37.y, l(3.51) lt r83.x, r37.y, l(2.91) lt r84.x, r37.y, l(2.31) lt r85.x, r37.y, l(1.71) lt r86.x, r37.y, l(1.11) lt r87.x, r37.y, l(0.51) if_nz r87.x ge r86.x, r37.y, l(0.01) if_nz r87.x div r80.w, r80.w, l(2.05) endif endif if_nz r86.x ge r86.x, r37.y, l(0.511) if_nz r86.x div r80.w, r80.w, l(2.10) endif endif if_nz r85.x ge r85.x, r37.y, l(1.111) if_nz r85.x div r80.w, r80.w, l(2.15) endif endif if_nz r84.x ge r84.x, r37.y, l(1.711) if_nz r84.x div r80.w, r80.w, l(2.2) endif endif if_nz r83.x ge r83.x, r37.y, l(2.311) if_nz r83.x div r80.w, r80.w, l(2.25) endif endif if_z r82.x div r80.w, r80.w, l(2.35) endif if_nz r82.x ge r82.x, r37.y, l(2.911) if_nz r82.x div r80.w, r80.w, l(2.3) endif endif //light convergence scaling correction --- LOSTI mul r39.w, r80.w, r39.w [/code] nothing else than simple mathematics that will correct the static value that fixed by DJ-RK (mul r39.w, l(VALUE), r39.w) by a calculated matching one in dependence of convergence. ==> i will have a look at some issues left with shadows, I think (even if the game is playable) SHOULD do this, even if its only for learning....i think i will end up in fixing nothing else....BUT i have sayed this often before so...who knows ^^ ==> hence no update yet until the end of this evening ^^ PS: have ro revert the STRG key (for dialog settings) because its is used for 3D settings, hence its not well definded with STRG ^^
Losti said:Just have had an idea that I will quickly try if i come home this evening. I have found an approx. formula that may work with every convergence for scaling the light. This is nothing we realy need but let us set the convergence in game with STRG+F5/F6 and the light will be correct (actually you have to use fix values for conv. if my idea is working, convergence is also free to choose (in a bit of restricted range .... )

Ill give it a try ^^


// Given, for this mathematics my prof from the past should revise my math grade ^^

Lightening is now scaling with convergence hence you are free to choose convergence !!!!

==> DAMN FCK great understanding the operations ==> BIG THY do DSS again!!!, thats not a problem anymore but if will be complicated if there is will be a complete NEW fix to do no one hav hade fixed the game engine before or "marked" respective positions but i have found some new and fixed, hence there is hope to improve my knowledge on my way to become shaderhacker ^^ but annyway ... i am still a APPRENTICE (because i am from the dark side of life ^^)

Found a mathematics behind the values of the convergence i have fixed in 1.2 and made a calculation in dependence on the separation range you are, because the value needed for fixing is not every time the same ^^

YEAH ok i am proud so i have to pose ^^

//light convergence scaling correction --- LOSTI

sqrt r80.w, r37.y

lt r82.x, r37.y, l(3.51)
lt r83.x, r37.y, l(2.91)
lt r84.x, r37.y, l(2.31)
lt r85.x, r37.y, l(1.71)
lt r86.x, r37.y, l(1.11)
lt r87.x, r37.y, l(0.51)

if_nz r87.x
ge r86.x, r37.y, l(0.01)
if_nz r87.x
div r80.w, r80.w, l(2.05)
endif
endif

if_nz r86.x
ge r86.x, r37.y, l(0.511)
if_nz r86.x
div r80.w, r80.w, l(2.10)
endif
endif

if_nz r85.x
ge r85.x, r37.y, l(1.111)
if_nz r85.x
div r80.w, r80.w, l(2.15)
endif
endif

if_nz r84.x
ge r84.x, r37.y, l(1.711)
if_nz r84.x
div r80.w, r80.w, l(2.2)
endif
endif

if_nz r83.x
ge r83.x, r37.y, l(2.311)
if_nz r83.x
div r80.w, r80.w, l(2.25)
endif
endif

if_z r82.x
div r80.w, r80.w, l(2.35)
endif

if_nz r82.x
ge r82.x, r37.y, l(2.911)
if_nz r82.x
div r80.w, r80.w, l(2.3)
endif
endif
//light convergence scaling correction --- LOSTI


mul r39.w, r80.w, r39.w


nothing else than simple mathematics that will correct the static value that fixed by DJ-RK (mul r39.w, l(VALUE), r39.w) by a calculated matching one in dependence of convergence.

==> i will have a look at some issues left with shadows, I think (even if the game is playable) SHOULD do this, even if its only for learning....i think i will end up in fixing nothing else....BUT i have sayed this often before so...who knows ^^

==> hence no update yet until the end of this evening ^^

PS: have ro revert the STRG key (for dialog settings) because its is used for 3D settings, hence its not well definded with STRG ^^

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

#33
Posted 03/12/2018 04:25 PM   
Sounds amazing. This is the Tip on the ice-cream or the Kirsche obendrauf. ;)
Sounds amazing. This is the Tip on the ice-cream or the Kirsche obendrauf. ;)

Intel Core i7-3820, 4 X 3,60 GHz overclocked to 4,50 GHz ; EVGA Titan X 12VRAM ; 16 GB Corsair Vengeance DDR-1600 (4x 4 GB) ; Asus VG278H 27-inch incl. 3D vision 2 glasses, integrated transmitter ; Xbox One Elite wireless controller ; Windows 10HTC VIVE 2,5 m2 roomscale3D VISION GAMERS - VISIT ME ON STEAM and feel free to add me: http://steamcommunity.com/profiles/76561198064106555 YOUTUBE: https://www.youtube.com/channel/UC1UE5TPoF0HX0HVpF_E4uPQ STEAM CURATOR: https://store.steampowered.com/curator/33611530-Streaming-Deluxe/ Image

#34
Posted 03/12/2018 05:50 PM   
[quote="mrorange55"]Sounds amazing. This is the Tip on the ice-cream or the Kirsche obendrauf. ;)[/quote] YES .-) I only have tro track down the dam one shadow that is left ..... (night scene) Its not game breaking but i take it as a chellange and continue learning ^^ Hab nur noch knapp 2 Stunden bevor die Frau wieder schreint O_o .... OK 145 Stunden am PC is jetzt auch nicht gerade wenig ^^
mrorange55 said:Sounds amazing. This is the Tip on the ice-cream or the Kirsche obendrauf. ;)


YES .-)

I only have tro track down the dam one shadow that is left ..... (night scene)

Its not game breaking but i take it as a chellange and continue learning ^^

Hab nur noch knapp 2 Stunden bevor die Frau wieder schreint O_o .... OK 145 Stunden am PC is jetzt auch nicht gerade wenig ^^

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

#35
Posted 03/12/2018 06:09 PM   
Congrats Losti! Keep the good work :)
Congrats Losti! Keep the good work :)

http://photos.3dvisionlive.com/chtiblue/album/530b52d4cb85770d6e000049/3Dvision with 49" Philips 49PUS7100 interlieved 3D (3840x2160) overide mode, GTX 1080 GFA2 EXOC, core i5 @4.3GHz, 16Gb@2130, windows 7&10 64bit, Dolby Atmos 5.1.4 Marantz 6010 AVR

#36
Posted 03/12/2018 07:01 PM   
[quote="chtiblue"]Congrats Losti! Keep the good work :)[/quote] HM... no improvements .. will update the post on page 1 soon.....its from my hands :-) cant find the position for the last issues or cant fix it ... i will inform dss tomorrow, no realy big issues left but the fare away one eye issue hurts me @ high separation ^^ someting in the wood.... annyway, find the update on page 1 for the free convergence selection //NOTE: you only have to update the 82c08ee7da67f710-cs.txt if you have allready made some changes in the d3d11.ini and you do not have to update if you go with convergences from 1.2 ^^ and are satisfied.
chtiblue said:Congrats Losti! Keep the good work :)


HM... no improvements ..

will update the post on page 1 soon.....its from my hands :-)

cant find the position for the last issues or cant fix it ... i will inform dss tomorrow, no realy big issues left but the fare away one eye issue hurts me @ high separation ^^ someting in the wood....

annyway, find the update on page 1 for the free convergence selection

//NOTE: you only have to update the 82c08ee7da67f710-cs.txt if you have allready made some changes in the d3d11.ini and you do not have to update if you go with convergences from 1.2 ^^ and are satisfied.

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

#37
Posted 03/12/2018 07:48 PM   
@Losti, very nice you decide to trying and fixing this game!. You start with cryengine, is a tricky engine to fix, so you start with a hard one...i bet you learn and still learning a lot. We need more shaderhackers! very glad to see more people trying it! If helps and if you want to give a try, you can use the same fixing pattern i use in Sniper3 to fix both of those CS you have semi-fixed. I don't know if DSS is already helping you, he probably will fix all...he fix cryengine in the first place... Looking both CS, in the 7c9794852e9729ae-cs, you made a mistake declaring some registers in the fixing code...you miss the "r" in the "r30"...so that shader won't be fixed at all. Probably you will se an orange or red error message in the overlay when pressing F10 (i suppose asm is included in those messages) and the 82c08ee7da67f710-cs, you grab the wrong contant buffer for the "NearFarClipDist" and the wrong depth value. Also the Regex i made in Sniper3 will not work here, but doing a couple of tweak will also work for both shaders (7c9794852e9729ae and 82c08ee7da67f710). The key here is to grab the "NearFarClipDist" from the main VS for shadows or Lights source (g_VS_NearFarClipDist). You can check the [Resource_NearFarClipDist] in the Sniper3 fix, i use in the CS Lights and Reflections REgex and CS Volumetric Lights. Hope this help! I don't have the game or planning to play it....too much RPG for me i think...i like more actions game (i can handle a very little RPG, but this seems to have too much for me) Cheers!!
@Losti, very nice you decide to trying and fixing this game!. You start with cryengine, is a tricky engine to fix, so you start with a hard one...i bet you learn and still learning a lot. We need more shaderhackers! very glad to see more people trying it!

If helps and if you want to give a try, you can use the same fixing pattern i use in Sniper3 to fix both of those CS you have semi-fixed. I don't know if DSS is already helping you, he probably will fix all...he fix cryengine in the first place...

Looking both CS, in the 7c9794852e9729ae-cs, you made a mistake declaring some registers in the fixing code...you miss the "r" in the "r30"...so that shader won't be fixed at all. Probably you will se an orange or red error message in the overlay when pressing F10 (i suppose asm is included in those messages)

and the 82c08ee7da67f710-cs, you grab the wrong contant buffer for the "NearFarClipDist" and the wrong depth value. Also the Regex i made in Sniper3 will not work here, but doing a couple of tweak will also work for both shaders (7c9794852e9729ae and 82c08ee7da67f710). The key here is to grab the "NearFarClipDist" from the main VS for shadows or Lights source (g_VS_NearFarClipDist). You can check the [Resource_NearFarClipDist] in the Sniper3 fix, i use in the CS Lights and Reflections REgex and CS Volumetric Lights.

Hope this help!


I don't have the game or planning to play it....too much RPG for me i think...i like more actions game (i can handle a very little RPG, but this seems to have too much for me)

Cheers!!

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#38
Posted 03/13/2018 11:59 AM   
Thx dhr i will have a look this evening. But a orange error did not occure. But i check tue issues you mentioned in detail when i come home today. I have used your sniper fix as template but dj was needed to update some regex patterns because the sniper one wasnt Working at all. //Damn there are some artefacts from my Programming left you are right....and of cause the r is missing. Will fix this this evening...Thx for Investigation :-) stupid fault
Thx dhr i will have a look this evening. But a orange error did not occure. But i check tue issues you mentioned in detail when i come home today. I have used your sniper fix as template but dj was needed to update some regex patterns because the sniper one wasnt Working at all.

//Damn there are some artefacts from my Programming left you are right....and of cause the r is missing. Will fix this this evening...Thx for Investigation :-) stupid fault

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

#39
Posted 03/14/2018 08:30 AM   
[quote="DHR"]I don't know if DSS is already helping you, he probably will fix all...he fix cryengine in the first place...[/quote]Yeah, finishing up some other things on my todo list first :) [quote]you miss the "r" in the "r30"...so that shader won't be fixed at all. Probably you will se an orange or red error message in the overlay when pressing F10 (i suppose asm is included in those messages)[/quote]Not yet - the assembler has come a long way since Flugan originally contributed it to 3DMigoto, but it still lacks error reporting for these type of problems, so typos like this just get silently discarded - usually resulting in the line just doing nothing. One of these days we'll improve this situation...
DHR said:I don't know if DSS is already helping you, he probably will fix all...he fix cryengine in the first place...
Yeah, finishing up some other things on my todo list first :)

you miss the "r" in the "r30"...so that shader won't be fixed at all. Probably you will se an orange or red error message in the overlay when pressing F10 (i suppose asm is included in those messages)
Not yet - the assembler has come a long way since Flugan originally contributed it to 3DMigoto, but it still lacks error reporting for these type of problems, so typos like this just get silently discarded - usually resulting in the line just doing nothing. One of these days we'll improve this situation...

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

#40
Posted 03/14/2018 10:25 AM   
@Losti Those mistake happens....and Yep, Sniper3 fix was not intented to work in other Cryengine game because was not shipped with any shadows, lights, reflecions, decals Regex (almost all was fixed manually), however the Halos Regex should work in this game. Also the CS lights and Reflections regex will work in this game with some minor tweaks....the one shipped in Sniper3 will work also in "Ryse son of rome" to fix those CS lights and reflections (i tested in that game)....the bad thing about this engine is you still need to manually track the #hash for the main VS for Shadows/lights to pass the cb with the g_VS_NearFarClipDist. @DSS Thanks for the info about asm and the error messages, and also good to know that will be add in the future. Thanks!!!
@Losti
Those mistake happens....and Yep, Sniper3 fix was not intented to work in other Cryengine game because was not shipped with any shadows, lights, reflecions, decals Regex (almost all was fixed manually), however the Halos Regex should work in this game. Also the CS lights and Reflections regex will work in this game with some minor tweaks....the one shipped in Sniper3 will work also in "Ryse son of rome" to fix those CS lights and reflections (i tested in that game)....the bad thing about this engine is you still need to manually track the #hash for the main VS for Shadows/lights to pass the cb with the g_VS_NearFarClipDist.


@DSS
Thanks for the info about asm and the error messages, and also good to know that will be add in the future. Thanks!!!

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#41
Posted 03/14/2018 11:35 AM   
Hey DHR i am out of understanding ^^ dont know how to correct all these things. These ini settings will be out of my current state of knowledge. Thats what i havnt understand yet ^^ The 82c08ee7da67f710-cs is near completely fixed but its not 100 % correct but i think there is more to do than with a regex. DJ-RK tryed it allready. But this is OK but i cant get the 7c9794852e9729ae-cs working well...even with the corrections. I have donated the game for the shader Hackers Account if you want to have a look
Hey DHR i am out of understanding ^^ dont know how to correct all these things. These ini settings will be out of my current state of knowledge. Thats what i havnt understand yet ^^

The 82c08ee7da67f710-cs is near completely fixed but its not 100 % correct but i think there is more to do than with a regex. DJ-RK tryed it allready. But this is OK but i cant get the 7c9794852e9729ae-cs working well...even with the corrections.

I have donated the game for the shader Hackers Account if you want to have a look

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

#42
Posted 03/14/2018 05:10 PM   
Ok, i will explain a little more so you can test. This is all based on the 82c08ee7da67f710-cs shipped in the WIP: 1) I add "cs-cb13 = Resource_NearFarClipDist" in the begginning of the Regex so now is not necessary to declare any #hash shader...so this will work for any settings in the game...if the shader # change when changing the settings. 2) I change in the search part of the Regex cb0[7] to cb0[11], because in this game the #cb change...we can make this more generic, but for this case will work. 3) I change the depth to r0.z (DepthRT t0), in Sniper3 is r0.y...we can make this more generic, but for this case will work. 4) i change the x resolution from cb0[7].x to cb0[8].x, , because in this game the #cb change...we can make this more generic, but for this case will work. Use this tweaked Regex from Sniper3 fix: [code];****************************************************************************************************************************************** ;CS LIGHTS AND REFLECTIONS ; ShaderRegex for CRYENGINE by DHR [ShaderRegex_CS_Lights_Reflections] shader_model = cs_4_0 cs_5_0 temps = stereo tmp1 tmp2 cs-cb13 = Resource_NearFarClipDist [ShaderRegex_CS_Lights_Reflections.Pattern] mul r\d+\.[xyzw]{2}, (?P<pos>r\d+)\.(?P<swizzle>[xyzw])\D+\, cb0\[11\]\.[xyzw]{4}\n \s*mad r\d+\.[xyzw]{1}, -r\d+\.[xyzw]{1}, cb0\[11\]\.z, l\(1\.000000\)\n \s*mad (?P<pos1>r\d+)\.[xyzw]{1}, -r\d+\.[xyzw]{1}, cb0\[11\]\.w, (?P=pos1)\.[xyzw]{1}\n [ShaderRegex_CS_Lights_Reflections.Pattern.Replace] \n // DHR ShaderRegex - CRYENGINE CS Lights and Reflections:\n ld_indexable(texture2d)(float,float,float,float) ${stereo}.xyzw, l(0, 0, 0, 0), t125.xyzw\n mul ${tmp1}.z, r0.z, cb13[9].y\n add ${tmp2}.w, ${tmp1}.z, -${stereo}.y\n mul ${tmp2}.w, ${stereo}.x, ${tmp2}.w\n div ${tmp2}.w, ${tmp2}.w, ${tmp1}.z\n mul ${tmp2}.w, ${tmp2}.w, cb0[8].x\n div ${tmp2}.w, ${tmp2}.w, l(2.000000)\n add ${pos}.${swizzle}, ${pos}.${swizzle}, -${tmp2}.w\n \n ${0} [ShaderRegex_CS_Lights_Reflections.InsertDeclarations] dcl_constantbuffer cb13[30], immediateIndexed dcl_resource_texture2d (float,float,float,float) t125[/code] In the d3dx.ini, you have declared this Override....for the description this suppose to be some main VS lights, and you also grab a resource from cb2...so this may work. Be sure that 21b2df9927b14117 have the g_VS_NearFarClipDist, otherwise you will need to grab other VS. [code];Lighting Related [ShaderOverrideVSLight1] hash=21b2df9927b14117 ResourceVSBuff=vs-cb2[/code] Add a couple of lines to define the Resourse to traspase g_VS_NearFarClipDist to any CS (by Regex) remember, in the Regex i declare this: cs-cb13 = Resource_NearFarClipDist ...and this: dcl_constantbuffer cb13[30], immediateIndexed So i will use it in every shader that match that Regex. Use this: [code][Resource_NearFarClipDist] max_copies_per_frame = 1 ;Lighting Related [ShaderOverrideVSLight1] hash=21b2df9927b14117 ResourceVSBuff=vs-cb2 Resource_NearFarClipDist = vs-cb2[/code] Hope this help for that CS. This is an accurate fix like in the Sniper3 fix. If that don't work, for sure DSS will nail this! cheers!
Ok, i will explain a little more so you can test.

This is all based on the 82c08ee7da67f710-cs shipped in the WIP:

1) I add "cs-cb13 = Resource_NearFarClipDist" in the begginning of the Regex so now is not necessary to declare any #hash shader...so this will work for any settings in the game...if the shader # change when changing the settings.
2) I change in the search part of the Regex cb0[7] to cb0[11], because in this game the #cb change...we can make this more generic, but for this case will work.
3) I change the depth to r0.z (DepthRT t0), in Sniper3 is r0.y...we can make this more generic, but for this case will work.
4) i change the x resolution from cb0[7].x to cb0[8].x, , because in this game the #cb change...we can make this more generic, but for this case will work.

Use this tweaked Regex from Sniper3 fix:
;******************************************************************************************************************************************
;CS LIGHTS AND REFLECTIONS
; ShaderRegex for CRYENGINE by DHR
[ShaderRegex_CS_Lights_Reflections]
shader_model = cs_4_0 cs_5_0
temps = stereo tmp1 tmp2
cs-cb13 = Resource_NearFarClipDist

[ShaderRegex_CS_Lights_Reflections.Pattern]
mul r\d+\.[xyzw]{2}, (?P<pos>r\d+)\.(?P<swizzle>[xyzw])\D+\, cb0\[11\]\.[xyzw]{4}\n
\s*mad r\d+\.[xyzw]{1}, -r\d+\.[xyzw]{1}, cb0\[11\]\.z, l\(1\.000000\)\n
\s*mad (?P<pos1>r\d+)\.[xyzw]{1}, -r\d+\.[xyzw]{1}, cb0\[11\]\.w, (?P=pos1)\.[xyzw]{1}\n

[ShaderRegex_CS_Lights_Reflections.Pattern.Replace]
\n
// DHR ShaderRegex - CRYENGINE CS Lights and Reflections:\n
ld_indexable(texture2d)(float,float,float,float) ${stereo}.xyzw, l(0, 0, 0, 0), t125.xyzw\n
mul ${tmp1}.z, r0.z, cb13[9].y\n
add ${tmp2}.w, ${tmp1}.z, -${stereo}.y\n
mul ${tmp2}.w, ${stereo}.x, ${tmp2}.w\n
div ${tmp2}.w, ${tmp2}.w, ${tmp1}.z\n
mul ${tmp2}.w, ${tmp2}.w, cb0[8].x\n
div ${tmp2}.w, ${tmp2}.w, l(2.000000)\n
add ${pos}.${swizzle}, ${pos}.${swizzle}, -${tmp2}.w\n
\n
${0}

[ShaderRegex_CS_Lights_Reflections.InsertDeclarations]
dcl_constantbuffer cb13[30], immediateIndexed
dcl_resource_texture2d (float,float,float,float) t125



In the d3dx.ini, you have declared this Override....for the description this suppose to be some main VS lights, and you also grab a resource from cb2...so this may work. Be sure that 21b2df9927b14117 have the g_VS_NearFarClipDist, otherwise you will need to grab other VS.
;Lighting Related
[ShaderOverrideVSLight1]
hash=21b2df9927b14117
ResourceVSBuff=vs-cb2


Add a couple of lines to define the Resourse to traspase g_VS_NearFarClipDist to any CS (by Regex)
remember, in the Regex i declare this: cs-cb13 = Resource_NearFarClipDist ...and this: dcl_constantbuffer cb13[30], immediateIndexed

So i will use it in every shader that match that Regex. Use this:
[Resource_NearFarClipDist]
max_copies_per_frame = 1

;Lighting Related
[ShaderOverrideVSLight1]
hash=21b2df9927b14117
ResourceVSBuff=vs-cb2
Resource_NearFarClipDist = vs-cb2



Hope this help for that CS.
This is an accurate fix like in the Sniper3 fix.


If that don't work, for sure DSS will nail this!

cheers!

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#43
Posted 03/14/2018 06:05 PM   
Thanks for working on the fix Losti, also thanks to DSS, DHR and all the guys helping him. Good luck. Will definitely play it when the fix is done, but I need a very big free time. :)
Thanks for working on the fix Losti, also thanks to DSS, DHR and all the guys helping him. Good luck. Will definitely play it when the fix is done, but I need a very big free time. :)

Asus Deluxe Gen3, Core i7 2700k@4.5Ghz, GTX 1080Ti, 16 GB RAM, Win 7 64bit
Samsung Pro 250 GB SSD, 4 TB WD Black (games)
Benq XL2720Z

#44
Posted 03/14/2018 06:08 PM   
[quote="DHR"]Ok, i will explain a little more so you can test. This is all based on the 82c08ee7da67f710-cs shipped in the WIP: 1) I add "cs-cb13 = Resource_NearFarClipDist" in the begginning of the Regex so now is not necessary to declare any #hash shader...so this will work for any settings in the game...if the shader # change when changing the settings. 2) I change in the search part of the Regex cb0[7] to cb0[11], because in this game the #cb change...we can make this more generic, but for this case will work. 3) I change the depth to r0.z (DepthRT t0), in Sniper3 is r0.y...we can make this more generic, but for this case will work. 4) i change the x resolution from cb0[7].x to cb0[8].x, , because in this game the #cb change...we can make this more generic, but for this case will work. Use this tweaked Regex from Sniper3 fix: [code];****************************************************************************************************************************************** ;CS LIGHTS AND REFLECTIONS ; ShaderRegex for CRYENGINE by DHR [ShaderRegex_CS_Lights_Reflections] shader_model = cs_4_0 cs_5_0 temps = stereo tmp1 tmp2 cs-cb13 = Resource_NearFarClipDist [ShaderRegex_CS_Lights_Reflections.Pattern] mul r\d+\.[xyzw]{2}, (?P<pos>r\d+)\.(?P<swizzle>[xyzw])\D+\, cb0\[11\]\.[xyzw]{4}\n \s*mad r\d+\.[xyzw]{1}, -r\d+\.[xyzw]{1}, cb0\[11\]\.z, l\(1\.000000\)\n \s*mad (?P<pos1>r\d+)\.[xyzw]{1}, -r\d+\.[xyzw]{1}, cb0\[11\]\.w, (?P=pos1)\.[xyzw]{1}\n [ShaderRegex_CS_Lights_Reflections.Pattern.Replace] \n // DHR ShaderRegex - CRYENGINE CS Lights and Reflections:\n ld_indexable(texture2d)(float,float,float,float) ${stereo}.xyzw, l(0, 0, 0, 0), t125.xyzw\n mul ${tmp1}.z, r0.z, cb13[9].y\n add ${tmp2}.w, ${tmp1}.z, -${stereo}.y\n mul ${tmp2}.w, ${stereo}.x, ${tmp2}.w\n div ${tmp2}.w, ${tmp2}.w, ${tmp1}.z\n mul ${tmp2}.w, ${tmp2}.w, cb0[8].x\n div ${tmp2}.w, ${tmp2}.w, l(2.000000)\n add ${pos}.${swizzle}, ${pos}.${swizzle}, -${tmp2}.w\n \n ${0} [ShaderRegex_CS_Lights_Reflections.InsertDeclarations] dcl_constantbuffer cb13[30], immediateIndexed dcl_resource_texture2d (float,float,float,float) t125[/code] In the d3dx.ini, you have declared this Override....for the description this suppose to be some main VS lights, and you also grab a resource from cb2...so this may work. Be sure that 21b2df9927b14117 have the g_VS_NearFarClipDist, otherwise you will need to grab other VS. [code];Lighting Related [ShaderOverrideVSLight1] hash=21b2df9927b14117 ResourceVSBuff=vs-cb2[/code] Add a couple of lines to define the Resourse to traspase g_VS_NearFarClipDist to any CS (by Regex) remember, in the Regex i declare this: cs-cb13 = Resource_NearFarClipDist ...and this: dcl_constantbuffer cb13[30], immediateIndexed So i will use it in every shader that match that Regex. Use this: [code][Resource_NearFarClipDist] max_copies_per_frame = 1 ;Lighting Related [ShaderOverrideVSLight1] hash=21b2df9927b14117 ResourceVSBuff=vs-cb2 Resource_NearFarClipDist = vs-cb2[/code] Hope this help for that CS. This is an accurate fix like in the Sniper3 fix. If that don't work, for sure DSS will nail this! cheers! [/quote] Ähm ... WTF .... that fixed the complete problems left (except the 7c9794852e9729ae-cs) ... are you serious???? ... really all problems left fixed !! shadows, glitches, lights.......have to check something else but WTF .... Hey one thing is left that i have fixed that i have to implement in the shader so i cant use the regex for this ^^ this is the camp fire shadow glitch ... but WHOOOOT ..... ... have to track down the problem with 7c9794852e9729ae-cs but fir will create the complete fixed light CS shader ... wtf... i have used it (i have tryed this also and get the regex applyed based on the 82c... shader but the trick was: [code] [ShaderOverrideCS_LIGHTS-DHR] hash=82c08ee7da67f710 ResourceVSBuff=vs-cb2 Resource_NearFarClipDist = vs-cb2 [/code] This will fix ... ok i am repeating ALL the issues we have manually fixed (also not 100% and with issues left ....) damn....sepend so much time in it and you came here ans fix it in 5 minutes ^^ i am really impresses and i see....still verry verrry much to learn.... //there are some shadow problems in day sceenes i have to track down.......it appears left/right from the source with the fixed cs 82c shader ... HM....
DHR said:Ok, i will explain a little more so you can test.

This is all based on the 82c08ee7da67f710-cs shipped in the WIP:

1) I add "cs-cb13 = Resource_NearFarClipDist" in the begginning of the Regex so now is not necessary to declare any #hash shader...so this will work for any settings in the game...if the shader # change when changing the settings.
2) I change in the search part of the Regex cb0[7] to cb0[11], because in this game the #cb change...we can make this more generic, but for this case will work.
3) I change the depth to r0.z (DepthRT t0), in Sniper3 is r0.y...we can make this more generic, but for this case will work.
4) i change the x resolution from cb0[7].x to cb0[8].x, , because in this game the #cb change...we can make this more generic, but for this case will work.

Use this tweaked Regex from Sniper3 fix:
;******************************************************************************************************************************************
;CS LIGHTS AND REFLECTIONS
; ShaderRegex for CRYENGINE by DHR
[ShaderRegex_CS_Lights_Reflections]
shader_model = cs_4_0 cs_5_0
temps = stereo tmp1 tmp2
cs-cb13 = Resource_NearFarClipDist

[ShaderRegex_CS_Lights_Reflections.Pattern]
mul r\d+\.[xyzw]{2}, (?P<pos>r\d+)\.(?P<swizzle>[xyzw])\D+\, cb0\[11\]\.[xyzw]{4}\n
\s*mad r\d+\.[xyzw]{1}, -r\d+\.[xyzw]{1}, cb0\[11\]\.z, l\(1\.000000\)\n
\s*mad (?P<pos1>r\d+)\.[xyzw]{1}, -r\d+\.[xyzw]{1}, cb0\[11\]\.w, (?P=pos1)\.[xyzw]{1}\n

[ShaderRegex_CS_Lights_Reflections.Pattern.Replace]
\n
// DHR ShaderRegex - CRYENGINE CS Lights and Reflections:\n
ld_indexable(texture2d)(float,float,float,float) ${stereo}.xyzw, l(0, 0, 0, 0), t125.xyzw\n
mul ${tmp1}.z, r0.z, cb13[9].y\n
add ${tmp2}.w, ${tmp1}.z, -${stereo}.y\n
mul ${tmp2}.w, ${stereo}.x, ${tmp2}.w\n
div ${tmp2}.w, ${tmp2}.w, ${tmp1}.z\n
mul ${tmp2}.w, ${tmp2}.w, cb0[8].x\n
div ${tmp2}.w, ${tmp2}.w, l(2.000000)\n
add ${pos}.${swizzle}, ${pos}.${swizzle}, -${tmp2}.w\n
\n
${0}

[ShaderRegex_CS_Lights_Reflections.InsertDeclarations]
dcl_constantbuffer cb13[30], immediateIndexed
dcl_resource_texture2d (float,float,float,float) t125



In the d3dx.ini, you have declared this Override....for the description this suppose to be some main VS lights, and you also grab a resource from cb2...so this may work. Be sure that 21b2df9927b14117 have the g_VS_NearFarClipDist, otherwise you will need to grab other VS.
;Lighting Related
[ShaderOverrideVSLight1]
hash=21b2df9927b14117
ResourceVSBuff=vs-cb2


Add a couple of lines to define the Resourse to traspase g_VS_NearFarClipDist to any CS (by Regex)
remember, in the Regex i declare this: cs-cb13 = Resource_NearFarClipDist ...and this: dcl_constantbuffer cb13[30], immediateIndexed

So i will use it in every shader that match that Regex. Use this:
[Resource_NearFarClipDist]
max_copies_per_frame = 1

;Lighting Related
[ShaderOverrideVSLight1]
hash=21b2df9927b14117
ResourceVSBuff=vs-cb2
Resource_NearFarClipDist = vs-cb2



Hope this help for that CS.
This is an accurate fix like in the Sniper3 fix.


If that don't work, for sure DSS will nail this!

cheers!




Ähm ... WTF .... that fixed the complete problems left (except the 7c9794852e9729ae-cs) ... are you serious???? ... really all problems left fixed !! shadows, glitches, lights.......have to check something else but WTF ....

Hey one thing is left that i have fixed that i have to implement in the shader so i cant use the regex for this ^^ this is the camp fire shadow glitch ... but WHOOOOT .....

... have to track down the problem with 7c9794852e9729ae-cs but fir will create the complete fixed light CS shader ... wtf...

i have used it (i have tryed this also and get the regex applyed based on the 82c... shader but the trick was:
[ShaderOverrideCS_LIGHTS-DHR]
hash=82c08ee7da67f710
ResourceVSBuff=vs-cb2
Resource_NearFarClipDist = vs-cb2


This will fix ... ok i am repeating ALL the issues we have manually fixed (also not 100% and with issues left ....) damn....sepend so much time in it and you came here ans fix it in 5 minutes ^^ i am really impresses and i see....still verry verrry much to learn....

//there are some shadow problems in day sceenes i have to track down.......it appears left/right from the source with the fixed cs 82c shader ... HM....

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

#45
Posted 03/14/2018 06:52 PM   
  3 / 18    
Scroll To Top