Dragon Age Inquisition
  10 / 83    
[quote="bo3b"]I plan to add some detail for how to use 3Dmigoto in the future, but in general, you use it the exact way that you use HelixMod. You shader hunt using the same keys, you mark shaders with the same keys, you reload shaders with F10. The differences are pretty minor, like the name of the override folder, and no red on-screen text. The code is HLSL instead of ASM, but is typically a lot easier to decipher. So, please don't hesitate to give it a try, you should rapidly see how it works.[/quote] The Problem for me is, that it didnt show the red line on the top of the screen or i cant use the NUM keys....it did not do anything by hitting theese keys. I have set HUNTUNG=1 in the ini file but nothing happens. So whats wrong? how can i activate shader selecting with MIGATO? i have used the 99.2 debug release. //EDIT OK the red text isn shown you wrote, but never the less it will not write any shaders in the folders or do any effect by pressing the num keys...
bo3b said:I plan to add some detail for how to use 3Dmigoto in the future, but in general, you use it the exact way that you use HelixMod. You shader hunt using the same keys, you mark shaders with the same keys, you reload shaders with F10.

The differences are pretty minor, like the name of the override folder, and no red on-screen text. The code is HLSL instead of ASM, but is typically a lot easier to decipher.

So, please don't hesitate to give it a try, you should rapidly see how it works.


The Problem for me is, that it didnt show the red line on the top of the screen or i cant use the NUM keys....it did not do anything by hitting theese keys. I have set HUNTUNG=1 in the ini file but nothing happens. So whats wrong? how can i activate shader selecting with MIGATO? i have used the 99.2 debug release.

//EDIT OK the red text isn shown you wrote, but never the less it will not write any shaders in the folders or do any effect by pressing the num keys...

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

Posted 11/26/2014 08:51 AM   
[quote="Losti"][quote="bo3b"]I plan to add some detail for how to use 3Dmigoto in the future, but in general, you use it the exact way that you use HelixMod. You shader hunt using the same keys, you mark shaders with the same keys, you reload shaders with F10. The differences are pretty minor, like the name of the override folder, and no red on-screen text. The code is HLSL instead of ASM, but is typically a lot easier to decipher. So, please don't hesitate to give it a try, you should rapidly see how it works.[/quote] The Problem for me is, that it didnt show the red line on the top of the screen or i cant use the NUM keys....it did not do anything by hitting theese keys. I have set HUNTUNG=1 in the ini file but nothing happens. So whats wrong? how can i activate shader selecting with MIGATO? i have used the 99.2 debug release. //EDIT OK the red text isn shown you wrote, but never the less it will not write any shaders in the folders or do any effect by pressing the num keys...[/quote] Ah! For this game, things are pretty dicey. This isn't a question of how to use the tool- it's that the tool doesn't work very well at all here. Mike was able to use the WatchDogs release DLLs with success, as long as SLI is disabled. Helixfax was able to use the DragonAge specific release with success. The debug version doesn't seem to work here. So for this specific game, you are in the elite front-guard where you get to take the extra arrows to the knee. If you want to keep looking here, that is no problem, just want you to know the status. To find out what's happening here, we need to look at the d3d11_log.txt file and see if the wrapper is loading properly and working. I'm looking into the problems between 3Dmigoto and DragonAge, but no ETA. Best bet if you haven't used the tool before is to run it against something where we know for sure it works. That gets you to familiarity with the work flow and what to expect. That is the sort of thing I will make a tutorial for at some point, where I run the tool against a known good game so that we can concentrate on the workflow.
Losti said:
bo3b said:I plan to add some detail for how to use 3Dmigoto in the future, but in general, you use it the exact way that you use HelixMod. You shader hunt using the same keys, you mark shaders with the same keys, you reload shaders with F10.

The differences are pretty minor, like the name of the override folder, and no red on-screen text. The code is HLSL instead of ASM, but is typically a lot easier to decipher.

So, please don't hesitate to give it a try, you should rapidly see how it works.

The Problem for me is, that it didnt show the red line on the top of the screen or i cant use the NUM keys....it did not do anything by hitting theese keys. I have set HUNTUNG=1 in the ini file but nothing happens. So whats wrong? how can i activate shader selecting with MIGATO? i have used the 99.2 debug release.

//EDIT OK the red text isn shown you wrote, but never the less it will not write any shaders in the folders or do any effect by pressing the num keys...

Ah! For this game, things are pretty dicey. This isn't a question of how to use the tool- it's that the tool doesn't work very well at all here.

Mike was able to use the WatchDogs release DLLs with success, as long as SLI is disabled.
Helixfax was able to use the DragonAge specific release with success.
The debug version doesn't seem to work here.

So for this specific game, you are in the elite front-guard where you get to take the extra arrows to the knee.

If you want to keep looking here, that is no problem, just want you to know the status. To find out what's happening here, we need to look at the d3d11_log.txt file and see if the wrapper is loading properly and working.


I'm looking into the problems between 3Dmigoto and DragonAge, but no ETA.

Best bet if you haven't used the tool before is to run it against something where we know for sure it works. That gets you to familiarity with the work flow and what to expect.

That is the sort of thing I will make a tutorial for at some point, where I run the tool against a known good game so that we can concentrate on the workflow.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 11/26/2014 09:09 AM   
Hm....seems not to be working for me, witched to windows 7 for that but nothing happens....what can i use as indecator for see if its working or not? Pressing NUM3/6/9 ir - should create a file in the ShaderCache folder am i right?
Hm....seems not to be working for me, witched to windows 7 for that but nothing happens....what can i use as indecator for see if its working or not?

Pressing NUM3/6/9 ir - should create a file in the ShaderCache folder am i right?

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

Posted 11/26/2014 09:31 AM   
You'll want to look for the log file. d3d11_log.txt. In d3dx.ini you want to have 'calls=1' to generate the log file. The WatchDog setup will have that set to 0 for playing. The others have it set to 1 by default. If you are getting a log file, that's sort of the red text- you know it's working and loading. If you mark a shader with 3 or 6, it will generate a file in the [i]ShaderFixes [/i]folder. And will also make a beep sound to let you know it worked. It will make a bonk sound if it failed to Decompile. No sound means something is wrong. There is also 'export_hlsl=3' which will generate shaders for ever shader seen, and put them in [i]ShaderCache[/i]. If the flag is set you should see thousands of shaders generated in ShaderCache.
You'll want to look for the log file. d3d11_log.txt.

In d3dx.ini you want to have 'calls=1' to generate the log file. The WatchDog setup will have that set to 0 for playing. The others have it set to 1 by default.

If you are getting a log file, that's sort of the red text- you know it's working and loading.

If you mark a shader with 3 or 6, it will generate a file in the ShaderFixes folder. And will also make a beep sound to let you know it worked. It will make a bonk sound if it failed to Decompile. No sound means something is wrong.

There is also 'export_hlsl=3' which will generate shaders for ever shader seen, and put them in ShaderCache. If the flag is set you should see thousands of shaders generated in ShaderCache.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 11/26/2014 10:04 AM   
OK the log is beeing created but...no sound pressing 3/6 and no files will be created. tryed Dragon Age Version 99.5 / the Debug Version 99.2, the release version 99.6 and 99.1 from whatch dogs.... :-(
OK the log is beeing created but...no sound pressing 3/6 and no files will be created. tryed Dragon Age Version 99.5 / the Debug Version 99.2, the release version 99.6 and 99.1 from whatch dogs.... :-(

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

Posted 11/26/2014 10:23 AM   
OK I have tryed a lot of things...nothing leads to sucess. I have tryed Aline Isolation with the fix and setting hunting=1 .... nothing happens when hitting the keys if the NUM-block. So Something is completely wrong with me....
OK I have tryed a lot of things...nothing leads to sucess. I have tryed Aline Isolation with the fix and setting hunting=1 .... nothing happens when hitting the keys if the NUM-block.

So Something is completely wrong with me....

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

Posted 11/26/2014 03:19 PM   
OK, i have found the answer its because of my GERMAN windows so i have to change the language for the keys and for the input device.... Input=Tastatur ; rotate through all VISIBLE pixel shaders at the current scene. next_pixelshader=2 (ZEHNERTASTATUR) previous_pixelshader=1 (ZEHNERTASTATUR) mark_pixelshader=3 (ZEHNERTASTATUR) ; rotate through all VISIBLE vertex shaders at the current scene. next_vertexshader=5 (ZEHNERTASTATUR) previous_vertexshader=4 (ZEHNERTASTATUR) mark_vertexshader=6 (ZEHNERTASTATUR) ; rotate through all USED index buffers at the current scene. next_indexbuffer=8 (ZEHNERTASTATUR) previous_indexbuffer=7 (ZEHNERTASTATUR) mark_indexbuffer=9 (ZEHNERTASTATUR)
OK, i have found the answer its because of my GERMAN windows so i have to change the language for the keys and for the input device....

Input=Tastatur

; rotate through all VISIBLE pixel shaders at the current scene.
next_pixelshader=2 (ZEHNERTASTATUR)
previous_pixelshader=1 (ZEHNERTASTATUR)
mark_pixelshader=3 (ZEHNERTASTATUR)

; rotate through all VISIBLE vertex shaders at the current scene.
next_vertexshader=5 (ZEHNERTASTATUR)
previous_vertexshader=4 (ZEHNERTASTATUR)
mark_vertexshader=6 (ZEHNERTASTATUR)

; rotate through all USED index buffers at the current scene.
next_indexbuffer=8 (ZEHNERTASTATUR)
previous_indexbuffer=7 (ZEHNERTASTATUR)
mark_indexbuffer=9 (ZEHNERTASTATUR)

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

Posted 11/26/2014 04:07 PM   
@losti, There is something very important if you want to hunt and your OS is in a different lenguage or the names of the input device change....follow this step; 1) In the d3dx.ini change "input" to 1 and load the game and exit. If is already in 1 skip this step. [code]; Log Input key actions input=1[/code] 2) Open the d3d11_log.txt and in the beginning you will see something like that (i will use mine for the example....My OS is in spanish): [code]----------------------------------------- Detected DirectInput device: instance = Mouse, id = 0 Detected DirectInput device: instance = Teclado, id = 0 Using DirectInput device: instance = Teclado, id = 0 Using keyboard data format. Found input item "ESC" Found input item "1" Found input item "2" Found input item "3"[/code] And a lot of "Found input item "X"....this will show all the keys and names. You will see that my Keyboard name is "Teclado"....is the traslation to spanish. Remember this name! Also for the "input names" you have to look the exact name....in my case for example Num 6 --> NUMERO 6 3) Open the d3dx.ini and edit the hunting part using the correct names for your OS/Computer. Mine looks like this: [code][Hunting] ; Release mode is with shader hunting disabled, optimized for speed. hunting=1 ; Use a DirectX input device for input. Input=Teclado ; Highlight mode of currently selected shader / rendertarget. ; "skip" = skip shader. don't render anything using the currently selected shader. ; "original" = fall back to original shader if the currently selected shader was patched. ; "mono" = disable stereo for the selected shader / rendertarget. ; "zero" = shader output is all zero. NOTE: this has a big performance impact. marking_mode=skip ; rotate through all VISIBLE pixel shaders at the current scene. next_pixelshader=NUMERO 2 previous_pixelshader=NUMERO 1 mark_pixelshader=NUMERO 3 ; rotate through all VISIBLE vertex shaders at the current scene. next_vertexshader=NUMERO 5 previous_vertexshader=NUMERO 4 mark_vertexshader=NUMERO 6 ; rotate through all USED index buffers at the current scene. next_indexbuffer=NUMERO 8 previous_indexbuffer=NUMERO 7 mark_indexbuffer=NUMERO 9 [/code] Hope this helps... ***EDIT....you just post the answer in the same time i post this.....hope this helps others.
@losti,

There is something very important if you want to hunt and your OS is in a different lenguage or the names of the input device change....follow this step;

1) In the d3dx.ini change "input" to 1 and load the game and exit. If is already in 1 skip this step.

; Log Input key actions
input=1


2) Open the d3d11_log.txt and in the beginning you will see something like that (i will use mine for the example....My OS is in spanish):

-----------------------------------------
Detected DirectInput device: instance = Mouse, id = 0
Detected DirectInput device: instance = Teclado, id = 0
Using DirectInput device: instance = Teclado, id = 0
Using keyboard data format.
Found input item "ESC"
Found input item "1"
Found input item "2"
Found input item "3"


And a lot of "Found input item "X"....this will show all the keys and names.
You will see that my Keyboard name is "Teclado"....is the traslation to spanish. Remember this name!
Also for the "input names" you have to look the exact name....in my case for example Num 6 --> NUMERO 6

3) Open the d3dx.ini and edit the hunting part using the correct names for your OS/Computer. Mine looks like this:

[Hunting]

; Release mode is with shader hunting disabled, optimized for speed.
hunting=1

; Use a DirectX input device for input.
Input=Teclado

; Highlight mode of currently selected shader / rendertarget.
; "skip" = skip shader. don't render anything using the currently selected shader.
; "original" = fall back to original shader if the currently selected shader was patched.
; "mono" = disable stereo for the selected shader / rendertarget.
; "zero" = shader output is all zero. NOTE: this has a big performance impact.
marking_mode=skip

; rotate through all VISIBLE pixel shaders at the current scene.
next_pixelshader=NUMERO 2
previous_pixelshader=NUMERO 1
mark_pixelshader=NUMERO 3

; rotate through all VISIBLE vertex shaders at the current scene.
next_vertexshader=NUMERO 5
previous_vertexshader=NUMERO 4
mark_vertexshader=NUMERO 6

; rotate through all USED index buffers at the current scene.
next_indexbuffer=NUMERO 8
previous_indexbuffer=NUMERO 7
mark_indexbuffer=NUMERO 9


Hope this helps...


***EDIT....you just post the answer in the same time i post this.....hope this helps others.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 11/26/2014 04:09 PM   
OOOOK one day of trying and thats what i got: The Shader-Hunting is working with the MIGOTO WatchDogs release, setting the hunting=1 and .... THX DHR, changing the keys if its not an english Windows you use....BUT: ATL+TAB will disable MIGOTO so you have to use a second PC for fixing files ... First PC is running the game and hunting shaders, second PC is changing values and putting it back to PC 1 via LAN so that PC 1 can press F10 and se what happens....So...I do not have a second PC :-( Not in this room... The CM Mode will crash on .... several issues.... and the values for the CM postet here: https://forums.geforce.com/default/topic/791450/3d-vision/guide-how-to-enable-and-tweak-3d-compatibility-mode-in-any-dx11-game/ ....will give me a flat screen, only if i screw me around it is 3D.... Only value that works is the Battlefield 4 value, but with halo around me and with some UI problems (wouldnt be that big problem, if it were stable....) ....would be nice to understand how to set a value, whats the clue to it? Why ise which hexcode? What does they mean? If i had any clue to disable effects and....how to influence the values i would get my second pc working in the room of my frist but....i havnt. And for today, im sad...trying so much and reached nothing. So i decided to play it in 2D and come back later for the 3D fixed version i Think...if there will be one. Anyway, SweetFX is working :) I have created a profile... http://sfx.thelazy.net/games/preset/2602/ So thats better than nothing. Hopefully NVidia/EA will fix the driver problems so that we can play in CM without crashes thats better than nothing more than one times. Finally: GOOD LUCK IN FIXING THAT GAME...Any hints how we could support you??? (Mike, Bob, Heli??)...Ill do my best to give you some help!!(the little help i can be/give ^^)
OOOOK one day of trying and thats what i got:

The Shader-Hunting is working with the MIGOTO WatchDogs release, setting the hunting=1 and .... THX DHR, changing the keys if its not an english Windows you use....BUT: ATL+TAB will disable MIGOTO so you have to use a second PC for fixing files ... First PC is running the game and hunting shaders, second PC is changing values and putting it back to PC 1 via LAN so that PC 1 can press F10 and se what happens....So...I do not have a second PC :-( Not in this room...

The CM Mode will crash on .... several issues.... and the values for the CM postet here:
https://forums.geforce.com/default/topic/791450/3d-vision/guide-how-to-enable-and-tweak-3d-compatibility-mode-in-any-dx11-game/

....will give me a flat screen, only if i screw me around it is 3D.... Only value that works is the Battlefield 4 value, but with halo around me and with some UI problems (wouldnt be that big problem, if it were stable....)
....would be nice to understand how to set a value, whats the clue to it? Why ise which hexcode? What does they mean?

If i had any clue to disable effects and....how to influence the values i would get my second pc working in the room of my frist but....i havnt. And for today, im sad...trying so much and reached nothing.

So i decided to play it in 2D and come back later for the 3D fixed version i Think...if there will be one.

Anyway, SweetFX is working :) I have created a profile...

http://sfx.thelazy.net/games/preset/2602/

So thats better than nothing. Hopefully NVidia/EA will fix the driver problems so that we can play in CM without crashes thats better than nothing more than one times.

Finally: GOOD LUCK IN FIXING THAT GAME...Any hints how we could support you??? (Mike, Bob, Heli??)...Ill do my best to give you some help!!(the little help i can be/give ^^)

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

Posted 11/26/2014 05:59 PM   
OK, it's awesome that you worked out the real problem which was the needed translation to German key names. For trying your hand on Dragon Age, I do have to say that you are trying to run before you can walk. This game is [i]by far[/i] the hardest game to work upon right now, even Mike is having trouble with it. It is awesome that you are enthusiastic enough to give it a try, but working on something this hard and unstable is going to be frustrating. There's no way around that right now. For reference purposes, and other people finding this thread- Alien Isolation is a very good choice to start with in terms of understanding the wrapper and getting the early problems solved. Alien is a very nicely behaved game, and the tool works very well there. For DA:I, we are chipping away at it. We haven't given up yet. Mike has cracked the main problems of fixing shadows. Don't be in rush to play it, and it's likely you can play it in true-3D. Is it not clear that this game was shipped unfinished? I've never understood the need to play the games in their broken state, but probably it's a personal level of how much abuse each person is willing to accept in order to play.
OK, it's awesome that you worked out the real problem which was the needed translation to German key names.

For trying your hand on Dragon Age, I do have to say that you are trying to run before you can walk.

This game is by far the hardest game to work upon right now, even Mike is having trouble with it. It is awesome that you are enthusiastic enough to give it a try, but working on something this hard and unstable is going to be frustrating. There's no way around that right now.


For reference purposes, and other people finding this thread- Alien Isolation is a very good choice to start with in terms of understanding the wrapper and getting the early problems solved. Alien is a very nicely behaved game, and the tool works very well there.


For DA:I, we are chipping away at it. We haven't given up yet. Mike has cracked the main problems of fixing shadows. Don't be in rush to play it, and it's likely you can play it in true-3D.

Is it not clear that this game was shipped unfinished? I've never understood the need to play the games in their broken state, but probably it's a personal level of how much abuse each person is willing to accept in order to play.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 11/26/2014 06:27 PM   
The main problem for me is, that i have not any idea of the entries in such a shader file, thats not logical for me so ... without any idea i cant reach the next level. Even the first level, diabeling shaders i did not get managed. With HELIX i could do that, because there is a tutorial. I have tryed some things but did not get disabled shaders. I didnt know the modifications to do with in the shader files which i want to disable. Second thing is, that i will not be able to run a game in 3D without full screen which makes trying something to understand it (changing a value, see what happens to get a clue of it) difficult. Id like to have 3D in windowed mode, game left, shader file right....changing a value going into the game and press F10 to see what it does. Sure i could read ....i should read the helix posted tutorials in unterstanding 3D Vision but....hard stuff for me reading all that in english with my little time a day i got ^^ .... Im a scientist so i like try and error :-) Is there any explaination arround for understanding the values in a shader file? for example: [code] float DefaultHeight : packoffset(c0) = float(1.000000e+002); . . . row_major float4x4 k_mObjectToWorld_3DSMAX_ : packoffset(c17); . . . r1.w = k_mModelObjectNodes[r0.x].x * k_mModelObjectNodes[r0.x].z + -r5.z; . . . [/code] and so on.... theese r0.x / r13.xyzw / -r7.xyzx ---- values makes me crazy and didnt make any sense for me ^^ OK thats the problem i did not understand how 3D Vision is working right now but.... ill be pleased to hear any hints or get any nice links to understand theese things :-)
The main problem for me is, that i have not any idea of the entries in such a shader file, thats not logical for me so ... without any idea i cant reach the next level. Even the first level, diabeling shaders i did not get managed. With HELIX i could do that, because there is a tutorial. I have tryed some things but did not get disabled shaders. I didnt know the modifications to do with in the shader files which i want to disable.

Second thing is, that i will not be able to run a game in 3D without full screen which makes trying something to understand it (changing a value, see what happens to get a clue of it) difficult. Id like to have 3D in windowed mode, game left, shader file right....changing a value going into the game and press F10 to see what it does. Sure i could read ....i should read the helix posted tutorials in unterstanding 3D Vision but....hard stuff for me reading all that in english with my little time a day i got ^^ .... Im a scientist so i like try and error :-)

Is there any explaination arround for understanding the values in a shader file?

for example:

float DefaultHeight : packoffset(c0) = float(1.000000e+002);
.
.
.
row_major float4x4 k_mObjectToWorld_3DSMAX_ : packoffset(c17);
.
.
.
r1.w = k_mModelObjectNodes[r0.x].x * k_mModelObjectNodes[r0.x].z + -r5.z;
.
.
.


and so on....

theese r0.x / r13.xyzw / -r7.xyzx ---- values makes me crazy and didnt make any sense for me ^^

OK thats the problem i did not understand how 3D Vision is working right now but.... ill be pleased to hear any hints or get any nice links to understand theese things :-)

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

Posted 11/26/2014 06:39 PM   
Ah, OK, good. Thanks for the explanation. Trial and error is completely fine as a strategy as well. For the main difference here, you will want to take a look at the High-Level-Shader-Language (HLSL) definition. That will explain the variable declarations and stuff like packoffset, and row_major. Here is a decent primer for HLSL that ties together the ASM to the HLSL: http://www.catalinzima.com/xna/tutorials/crash-course-in-hlsl/ You can also skim the Microsoft programming guide: [url]http://msdn.microsoft.com/en-us/library/windows/desktop/bb509635(v=vs.85).aspx[/url] For the r0, r13 type variables, those are just variables. HLSL is very much like C code. Those are just variables like you'd normally see in C, just with bad names. The names come from the ASM that has been converted back to HLSL and correspond to the ASM. They are all just temporary variables. In the HLSL files I now add the original ASM code at the bottom as comments, so that you can see the original ASM and maybe tie that back to the HLSL that you see. In general, the code isn't going to make any sense to us, because we don't have the original code, only the ASM. So if you are expecting to read it like C, that's unlikely to happen. Or maybe it's like C code written by a terrible programmer with no comments and no sense, so that understanding exactly what it is doing is nearly out of the question. We don't need to fully understand things to be able to make a difference though.
Ah, OK, good. Thanks for the explanation. Trial and error is completely fine as a strategy as well.

For the main difference here, you will want to take a look at the High-Level-Shader-Language (HLSL) definition. That will explain the variable declarations and stuff like packoffset, and row_major.

Here is a decent primer for HLSL that ties together the ASM to the HLSL:


http://www.catalinzima.com/xna/tutorials/crash-course-in-hlsl/


You can also skim the Microsoft programming guide:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb509635(v=vs.85).aspx


For the r0, r13 type variables, those are just variables. HLSL is very much like C code. Those are just variables like you'd normally see in C, just with bad names. The names come from the ASM that has been converted back to HLSL and correspond to the ASM. They are all just temporary variables.

In the HLSL files I now add the original ASM code at the bottom as comments, so that you can see the original ASM and maybe tie that back to the HLSL that you see.

In general, the code isn't going to make any sense to us, because we don't have the original code, only the ASM. So if you are expecting to read it like C, that's unlikely to happen. Or maybe it's like C code written by a terrible programmer with no comments and no sense, so that understanding exactly what it is doing is nearly out of the question.

We don't need to fully understand things to be able to make a difference though.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 11/26/2014 07:40 PM   
The same basic premise for disabling a shader works in HLSL as well. We want to zero the output. In a pixel shader for example, we might see: [code]... void main( float4 v0 : TEXCOORD0, float4 v1 : TEXCOORD1, out float4 o0 : SV_Target0) { ... o0.xyz = HDR_EncodeScale.zzz * r0.xyz; o0.w = 1.000000000e+000; return; } [/code] To disable that shader we'd do this: [code]... void main( float4 v0 : TEXCOORD0, float4 v1 : TEXCOORD1, out float4 o0 : SV_Target0) { ... o0.xyz = HDR_EncodeScale.zzz * r0.xyz; o0.w = 1.000000000e+000; // Disable the effect o0 = 0; return; } [/code] By reading about HLSL you can find that o0 is the output for this shader, the color that will be produced. By setting it all to zero, we do the same thing we did in ASM. It's easier because we can just make it the last instruction, and the HLSL compiler will know to generate very simple code.
The same basic premise for disabling a shader works in HLSL as well. We want to zero the output.

In a pixel shader for example, we might see:

...
void main(
float4 v0 : TEXCOORD0,
float4 v1 : TEXCOORD1,
out float4 o0 : SV_Target0)
{
...
o0.xyz = HDR_EncodeScale.zzz * r0.xyz;
o0.w = 1.000000000e+000;
return;
}


To disable that shader we'd do this:

...
void main(
float4 v0 : TEXCOORD0,
float4 v1 : TEXCOORD1,
out float4 o0 : SV_Target0)
{
...
o0.xyz = HDR_EncodeScale.zzz * r0.xyz;
o0.w = 1.000000000e+000;

// Disable the effect
o0 = 0;
return;
}



By reading about HLSL you can find that o0 is the output for this shader, the color that will be produced.

By setting it all to zero, we do the same thing we did in ASM.

It's easier because we can just make it the last instruction, and the HLSL compiler will know to generate very simple code.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 11/26/2014 07:46 PM   
[quote="Losti"]OOOOK one day of trying and thats what i got: .............. The CM Mode will crash on .... several issues.... and the values for the CM postet here: https://forums.geforce.com/default/topic/791450/3d-vision/guide-how-to-enable-and-tweak-3d-compatibility-mode-in-any-dx11-game/ ....will give me a flat screen, only if i screw me around it is 3D.... Only value that works is the Battlefield 4 value, but with halo around me and with some UI problems (wouldnt be that big problem, if it were stable....) [/quote] The value do work as you can see in the image and the video.. Probably you forgot to reimport the profile correctly after changing them....
Losti said:OOOOK one day of trying and thats what i got:

..............

The CM Mode will crash on .... several issues.... and the values for the CM postet here:

https://forums.geforce.com/default/topic/791450/3d-vision/guide-how-to-enable-and-tweak-3d-compatibility-mode-in-any-dx11-game/


....will give me a flat screen, only if i screw me around it is 3D.... Only value that works is the Battlefield 4 value, but with halo around me and with some UI problems (wouldnt be that big problem, if it were stable....)



The value do work as you can see in the image and the video.. Probably you forgot to reimport the profile correctly after changing them....

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


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

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

Posted 11/26/2014 08:05 PM   
Oh my ... thx for that... I have played some minutes and decided not to go in further because i need the immersion of 3D :-) So much thx for your words, ill going into detail for tomorrow. Basically not for fixing DA:I....more for learning by doing a better job in upcoming games and may be i will/can support you a little^^ //Aunt Edith means: Ill have to order a Pizza and from bear 2 of a kind so that i will be able to do something in reading and understanding tonight ^^
Oh my ... thx for that... I have played some minutes and decided not to go in further because i need the immersion of 3D :-)

So much thx for your words, ill going into detail for tomorrow. Basically not for fixing DA:I....more for learning by doing a better job in upcoming games and may be i will/can support you a little^^

//Aunt Edith means: Ill have to order a Pizza and from bear 2 of a kind so that i will be able to do something in reading and understanding tonight ^^

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

Posted 11/26/2014 08:07 PM   
  10 / 83    
Scroll To Top