Quick question:
Using 3DMigoto: StereParams.x = stereo value; StereoParams.y = convergence;
What about the z and w components? What do these hold ?
Another question:
Is it possible to add back the ability to have access of Resolution in the sahders?
You can do this from NvApi directly:
This is a copy-paste from my wrapper showing how you can get all the information (including SLI/NON Sli, Surround info)
[code]
NvAPI_Status retVal;
NvU32 displayID = 0;
retVal = NvAPI_DISP_GetGDIPrimaryDisplayId(&displayID);
if (retVal == NVAPI_OK)
{
NV_RECT viewports[NV_MOSAIC_MAX_DISPLAYS];
NvU8 isBezelCorrected;
retVal = NvAPI_Mosaic_GetDisplayViewportsByResolution(displayID, g_width, g_height, viewports, &isBezelCorrected);
if (retVal == NVAPI_OK)
{
//NVIDIA Surround is enabled.
add_log("NVIDIA Surround is enabled.");
g_NvSurround = TRUE;
}
else if (retVal == NVAPI_MOSAIC_NOT_ACTIVE)
{
// No Surround
g_NvSurround = FALSE;
add_log("NVIDIA Single Screen is enabled.");
}
}
// Check for SLI
NvLogicalGpuHandle *nvGPUHandleLog = new NvLogicalGpuHandle;
NvPhysicalGpuHandle *nvGPUHandlePhys = new NvPhysicalGpuHandle;
NvU32 countLogical;
NvU32 countPhysical;
NvAPI_EnumLogicalGPUs(nvGPUHandleLog, &countLogical);
NvAPI_EnumPhysicalGPUs(nvGPUHandlePhys, &countPhysical);
// If we have more than 1 physical GPU and logical is 1 (SLI enabled)
if ((countPhysical >= 2) && (countLogical < countPhysical))
{
// SLI enabled
g_NvSLI = TRUE;
// If we are in fullscreen
if (g_fullscreen)
{
// And Surround is enabled
if (g_NvSurround)
{
//g_fullscreen = TRUE;
add_log("Fullscreen flag is set.");
}
else
{
//fullscreen = FALSE;
add_log("Fullscreen flag is NOT set.");
}
}
}
else // we have a single GPU
{
...
[/code]
// If we have more than 1 physical GPU and logical is 1 (SLI enabled)
if ((countPhysical >= 2) && (countLogical < countPhysical))
{
// SLI enabled
g_NvSLI = TRUE;
// If we are in fullscreen
if (g_fullscreen)
{
// And Surround is enabled
if (g_NvSurround)
{
//g_fullscreen = TRUE;
add_log("Fullscreen flag is set.");
}
else
{
//fullscreen = FALSE;
add_log("Fullscreen flag is NOT set.");
}
}
}
else // we have a single GPU
{
...
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="Volnaiskra"]I'm just going through lesson 1. There's a bit of an oddity that I don't quite understand.[/quote] I had this too. I just manually moved the dumps folder to the correct location. Not sure why it happens (and it's only happened with The Ball for me).
[quote="eroc_remag"]1110 & 0001 did not fix the effect. I tried commenting out all the lines after ps_3_0 line but that disables the tree trunks. The same thing happens when I use texkill command.[/quote]
Ok, then it seems you won't be able to disable the effect as a whole, and you will either have to fix it, or find a way to only partially disable it.
- Try setting each of the texcoord outputs from the vertex shader to 0 in turn to see if any of them kill the bad part of the effect without removing the trees.
- Look for any texld* instructions in the pixel shader and try inserting a mov instruction afterwards to replace their result with 0 (or 1).
I don't see anything obvious to suggest to fix the vertex shader you posted. It's possible it's not the right place for the fix - maybe the effect needs to be fixed in the pixel shader, or maybe you need to find another set of related shaders (it could easily be the shaders for the background haze or the shaders for the trees). I'd suggest experimenting with it (disable or adjust outputs) to see what kind of ways it can alter the effect, which might provide some insight into how it works and whether it is the right place to fix the effect or not.
eroc_remag said:1110 & 0001 did not fix the effect. I tried commenting out all the lines after ps_3_0 line but that disables the tree trunks. The same thing happens when I use texkill command.
Ok, then it seems you won't be able to disable the effect as a whole, and you will either have to fix it, or find a way to only partially disable it.
- Try setting each of the texcoord outputs from the vertex shader to 0 in turn to see if any of them kill the bad part of the effect without removing the trees.
- Look for any texld* instructions in the pixel shader and try inserting a mov instruction afterwards to replace their result with 0 (or 1).
I don't see anything obvious to suggest to fix the vertex shader you posted. It's possible it's not the right place for the fix - maybe the effect needs to be fixed in the pixel shader, or maybe you need to find another set of related shaders (it could easily be the shaders for the background haze or the shaders for the trees). I'd suggest experimenting with it (disable or adjust outputs) to see what kind of ways it can alter the effect, which might provide some insight into how it works and whether it is the right place to fix the effect or not.
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
[quote="Volnaiskra"]The lesson refers to LOG.txt and a Dumps folder in The Ball\Binaries\Win32.
However, even after running The Ball with helixmod a few times, cycling through shaders and all that, I didn't have those in those locations. I had both LOG.TXT and the Dumps folder in The Ball\ (ie. the root folder). The Dumps folder had the AllShaders and SingleShaders folder inside, but they were both empty. [/quote]This seems to be pretty common on many (but not all) Unreal Engine games, which change their working directory after launch. Different UE games seem to behave slightly differently in this regard, so I'm not sure if there is any definitive way to deal with this. This is a comment I left for myself in the DX9Settings.ini when I fixed Eleusis, which is the worst I've found so far in that the shaders wouldn't even dump without this:
[code]
; Required for Eleusis. Additionally, the dumps directory & subdirectories must
; be manually created under the Win32 directory for dumping to work. LOG.txt
; still ends up under base Eleusis directory.
GetCurDirAtLoad = true
[/code]
Volnaiskra said:The lesson refers to LOG.txt and a Dumps folder in The Ball\Binaries\Win32.
However, even after running The Ball with helixmod a few times, cycling through shaders and all that, I didn't have those in those locations. I had both LOG.TXT and the Dumps folder in The Ball\ (ie. the root folder). The Dumps folder had the AllShaders and SingleShaders folder inside, but they were both empty.
This seems to be pretty common on many (but not all) Unreal Engine games, which change their working directory after launch. Different UE games seem to behave slightly differently in this regard, so I'm not sure if there is any definitive way to deal with this. This is a comment I left for myself in the DX9Settings.ini when I fixed Eleusis, which is the worst I've found so far in that the shaders wouldn't even dump without this:
; Required for Eleusis. Additionally, the dumps directory & subdirectories must
; be manually created under the Win32 directory for dumping to work. LOG.txt
; still ends up under base Eleusis directory.
GetCurDirAtLoad = true
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
[quote="helifax"]Quick question:
Using 3DMigoto: StereParams.x = stereo value; StereoParams.y = convergence;
What about the z and w components? What do these hold ?[/quote]StereoParams.Load(0).x = separation calibrated for the monitor size
StereoParams.Load(0).y = convergence
StereoParams.Load(0).z = 1 for left eye, -1 for right eye
StereoParams.Load(0).w = eyesign * raw separation percentage
StereoParams.Load(1).xyzw = Four tunable values for (e.g.) dialing in shadow fixes (must be enabled in the d3dx.ini)
StereoParams.Load(2).x = Screen width (currently broken)
StereoParams.Load(2).y = Screen height (currently broken)
The code that sets these is in the nvstereo.h file in the root of the 3Dmigoto repository.
[quote]Another question:
Is it possible to add back the ability to have access of Resolution in the sahders?[/quote]Short answer is yes, but someone needs to do code it up. It slipped on my priority list a little after I realised I had an alternative way to get the resolution to fix the god rays in Far Cry 4, but we definitely need it sooner or later (also - the special casing 3Dmigoto does when hashing textures/render targets the same size as the screen is broken because of this).
If you wanted to take a shot at adding this to 3Dmigoto I'm sure bo3b would be willing to accept a pull request (or maybe even grant you direct commit access), otherwise bo3b or myself will add it when we get some time.
It needs to be valid whenever G->mSwapChainInfo.width/height is used (definitely when CreateTexture2D() uses it since the hashing special case depends on it being valid at that point, while ClearRenderTargetView() can afford to be a bit more relaxed), so it would make sense to call a function to update it from both of those places.
Using 3DMigoto: StereParams.x = stereo value; StereoParams.y = convergence;
What about the z and w components? What do these hold ?
StereoParams.Load(0).x = separation calibrated for the monitor size
StereoParams.Load(0).y = convergence
StereoParams.Load(0).z = 1 for left eye, -1 for right eye
StereoParams.Load(0).w = eyesign * raw separation percentage
StereoParams.Load(1).xyzw = Four tunable values for (e.g.) dialing in shadow fixes (must be enabled in the d3dx.ini)
StereoParams.Load(2).x = Screen width (currently broken)
StereoParams.Load(2).y = Screen height (currently broken)
The code that sets these is in the nvstereo.h file in the root of the 3Dmigoto repository.
Another question:
Is it possible to add back the ability to have access of Resolution in the sahders?
Short answer is yes, but someone needs to do code it up. It slipped on my priority list a little after I realised I had an alternative way to get the resolution to fix the god rays in Far Cry 4, but we definitely need it sooner or later (also - the special casing 3Dmigoto does when hashing textures/render targets the same size as the screen is broken because of this).
If you wanted to take a shot at adding this to 3Dmigoto I'm sure bo3b would be willing to accept a pull request (or maybe even grant you direct commit access), otherwise bo3b or myself will add it when we get some time.
It needs to be valid whenever G->mSwapChainInfo.width/height is used (definitely when CreateTexture2D() uses it since the hashing special case depends on it being valid at that point, while ClearRenderTargetView() can afford to be a bit more relaxed), so it would make sense to call a function to update it from both of those places.
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
Given that the nvstereo.h is already hacked up, it might make sense to go ahead and use Helifax's code there, directly in nvstereo.h when it is updating the stereo texture. Calls out to nvapi at that point would make good sense, as it would also match other updates to those textures.
I looked into getting the resolution from Direct3D, but Microsoft doesn't really flesh out their APIs, so it's not as easy as I'd expect. I really expected to be able to do a D3DDevice->GetResolution, but of course that doesn't exist, and you need to go to DXGI to get that. Which we presently don't have any data structure to.
Easiest for this seems to be to get it from nvapi.
We tend to do an on-demand sort of development, so if someone needs this feature, that pushes it up in the list. Just let us know.
Given that the nvstereo.h is already hacked up, it might make sense to go ahead and use Helifax's code there, directly in nvstereo.h when it is updating the stereo texture. Calls out to nvapi at that point would make good sense, as it would also match other updates to those textures.
I looked into getting the resolution from Direct3D, but Microsoft doesn't really flesh out their APIs, so it's not as easy as I'd expect. I really expected to be able to do a D3DDevice->GetResolution, but of course that doesn't exist, and you need to go to DXGI to get that. Which we presently don't have any data structure to.
Easiest for this seems to be to get it from nvapi.
We tend to do an on-demand sort of development, so if someone needs this feature, that pushes it up in the list. Just let us know.
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
In helixmod, F10 is supposed to reload any files in ShaderOverride\VertexShaders and ShaderOverride\PixelShaders, right? I was sure it was working before, but now it's not. I need to reload the game to see my changes.
In helixmod, F10 is supposed to reload any files in ShaderOverride\VertexShaders and ShaderOverride\PixelShaders, right? I was sure it was working before, but now it's not. I need to reload the game to see my changes.
Yeah, F10 should reload shaders. I've seen a few shaders that don't reload, but most do. You should get a high beep if it reloads correctly. If you get a low beep, that indicates an error (usually because you've modified a shader in an incorrect way).
Yeah, F10 should reload shaders. I've seen a few shaders that don't reload, but most do. You should get a high beep if it reloads correctly. If you get a low beep, that indicates an error (usually because you've modified a shader in an incorrect way).
Oops, my mistake. I believe so, yes. I had assumed you were working with 3dmigoto as I knew you were looking at the crew. I should have paid more attention to your post.
Oops, my mistake. I believe so, yes. I had assumed you were working with 3dmigoto as I knew you were looking at the crew. I should have paid more attention to your post.
Hey guys, I need help! Again. I'm trying to fix the depth of animated portraits in the UI. Seems I cannot do anything with the vertex shader, because it seems to be "shared" between the portrait in the UI and the figurine on the campaign map. So, now I'm looking at the pixel shaders and having a hard time figuring out where (if anywhere) I could change the depth.
These shaders affect only pieces of the portraits and there's a lot of them. As in, one will fix one bit of clothing, another the face etc.. Setting all output to 0 does turn the object black, and seeing how I cannot isolate the portrait from the campaign map model in the vertex shaders I wouldn't know where else to look.
// approximately 261 instruction slots used (7 texture, 254 arithmetic)
The projection section near the top doesn't seem to affect the position of the object at all. Anything done in this part at best seems to affect how it gets clipped (I'm guessing that's what the bits of code ending with "texkill" are for? If not here, though, where else should I be looking?
@Muizer: It sounds like what you need for this purpose is HelixMod's texture separation feature. We haven't talked about that, but it allows you separate out specific textures to be fixed, while leaving others untouched for a given shader.
Check out the awesome writeup (thanks DarksStarSword!) on the Wiki:
[url]http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#Texture_Hunting_and_Filtering[/url]
There are several examples of where this is used, in fact most game fixes use this technique. You might look at my Psychonauts fix for this, because I documented it fairly well as I built the fix.
@Muizer: It sounds like what you need for this purpose is HelixMod's texture separation feature. We haven't talked about that, but it allows you separate out specific textures to be fixed, while leaving others untouched for a given shader.
There are several examples of where this is used, in fact most game fixes use this technique. You might look at my Psychonauts fix for this, because I documented it fairly well as I built the fix.
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
The position will have already been set by the time the pixel shader runs, so this has to be adjusted in the vertex shader, or you may prefer to force the render target for the portraits to mono.
Since the vertex shaders affect multiple things, you might want to look at this technique to adjust them based on the matching pixel shader:
[url]http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#Overriding_a_Vertex_Shader_Based_on_the_Matching_Pixel_Shader[/url]
Edit: or as Bo3b suggested, texture separation may work as well, but it might also turn out that the same textures are used for the in world models. Only one way to find out, and that's to try it ;-)
It might be easier to try to force the render target for the portraits to mono instead. It's a bit tricky as there's no easy way to tell which render targets you will need to change, but it can be done. Read the first paragraph of this reference and see if you can make sense of it:
[url]http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#.5BSFn.5D[/url]
Here's an example of this - here I was actually forcing the portraits to stereo (because they were mono by default and that was causing trouble with the rest of the fix), so you would use DefMode = 2 instead of DefMode = 1 to force them to mono.
[url]https://github.com/DarkStarSword/3d-fixes/commit/ee715abf29f1867d79522de73474b131905f34eb[/url]
You can see a comment I left for myself as I was working out which render targets/surfaces I needed to change - I found all the unique surface creation lines in the LOG.txt and tried changing half of them at a time, until I had narrowed it down to three I needed to change. It is very likely you will need to change at least two (if not more) - one for the colour buffer and one for the depth buffer.
The position will have already been set by the time the pixel shader runs, so this has to be adjusted in the vertex shader, or you may prefer to force the render target for the portraits to mono.
Edit: or as Bo3b suggested, texture separation may work as well, but it might also turn out that the same textures are used for the in world models. Only one way to find out, and that's to try it ;-)
It might be easier to try to force the render target for the portraits to mono instead. It's a bit tricky as there's no easy way to tell which render targets you will need to change, but it can be done. Read the first paragraph of this reference and see if you can make sense of it: http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#.5BSFn.5D
You can see a comment I left for myself as I was working out which render targets/surfaces I needed to change - I found all the unique surface creation lines in the LOG.txt and tried changing half of them at a time, until I had narrowed it down to three I needed to change. It is very likely you will need to change at least two (if not more) - one for the colour buffer and one for the depth buffer.
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
Using 3DMigoto: StereParams.x = stereo value; StereoParams.y = convergence;
What about the z and w components? What do these hold ?
Another question:
Is it possible to add back the ability to have access of Resolution in the sahders?
You can do this from NvApi directly:
This is a copy-paste from my wrapper showing how you can get all the information (including SLI/NON Sli, Surround info)
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)
Ok, then it seems you won't be able to disable the effect as a whole, and you will either have to fix it, or find a way to only partially disable it.
- Try setting each of the texcoord outputs from the vertex shader to 0 in turn to see if any of them kill the bad part of the effect without removing the trees.
- Look for any texld* instructions in the pixel shader and try inserting a mov instruction afterwards to replace their result with 0 (or 1).
I don't see anything obvious to suggest to fix the vertex shader you posted. It's possible it's not the right place for the fix - maybe the effect needs to be fixed in the pixel shader, or maybe you need to find another set of related shaders (it could easily be the shaders for the background haze or the shaders for the trees). I'd suggest experimenting with it (disable or adjust outputs) to see what kind of ways it can alter the effect, which might provide some insight into how it works and whether it is the right place to fix the effect or not.
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
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
StereoParams.Load(0).y = convergence
StereoParams.Load(0).z = 1 for left eye, -1 for right eye
StereoParams.Load(0).w = eyesign * raw separation percentage
StereoParams.Load(1).xyzw = Four tunable values for (e.g.) dialing in shadow fixes (must be enabled in the d3dx.ini)
StereoParams.Load(2).x = Screen width (currently broken)
StereoParams.Load(2).y = Screen height (currently broken)
The code that sets these is in the nvstereo.h file in the root of the 3Dmigoto repository.
Short answer is yes, but someone needs to do code it up. It slipped on my priority list a little after I realised I had an alternative way to get the resolution to fix the god rays in Far Cry 4, but we definitely need it sooner or later (also - the special casing 3Dmigoto does when hashing textures/render targets the same size as the screen is broken because of this).
If you wanted to take a shot at adding this to 3Dmigoto I'm sure bo3b would be willing to accept a pull request (or maybe even grant you direct commit access), otherwise bo3b or myself will add it when we get some time.
It needs to be valid whenever G->mSwapChainInfo.width/height is used (definitely when CreateTexture2D() uses it since the hashing special case depends on it being valid at that point, while ClearRenderTargetView() can afford to be a bit more relaxed), so it would make sense to call a function to update it from both of those places.
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 looked into getting the resolution from Direct3D, but Microsoft doesn't really flesh out their APIs, so it's not as easy as I'd expect. I really expected to be able to do a D3DDevice->GetResolution, but of course that doesn't exist, and you need to go to DXGI to get that. Which we presently don't have any data structure to.
Easiest for this seems to be to get it from nvapi.
We tend to do an on-demand sort of development, so if someone needs this feature, that pushes it up in the list. Just let us know.
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
These shaders affect only pieces of the portraits and there's a lot of them. As in, one will fix one bit of clothing, another the face etc.. Setting all output to 0 does turn the object black, and seeing how I cannot isolate the portrait from the campaign map model in the vertex shaders I wouldn't know where else to look.
The projection section near the top doesn't seem to affect the position of the object at all. Anything done in this part at best seems to affect how it gets clipped (I'm guessing that's what the bits of code ending with "texkill" are for? If not here, though, where else should I be looking?
Check out the awesome writeup (thanks DarksStarSword!) on the Wiki:
http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#Texture_Hunting_and_Filtering
There are several examples of where this is used, in fact most game fixes use this technique. You might look at my Psychonauts fix for this, because I documented it fairly well as I built the fix.
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
Since the vertex shaders affect multiple things, you might want to look at this technique to adjust them based on the matching pixel shader:
http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#Overriding_a_Vertex_Shader_Based_on_the_Matching_Pixel_Shader
Edit: or as Bo3b suggested, texture separation may work as well, but it might also turn out that the same textures are used for the in world models. Only one way to find out, and that's to try it ;-)
It might be easier to try to force the render target for the portraits to mono instead. It's a bit tricky as there's no easy way to tell which render targets you will need to change, but it can be done. Read the first paragraph of this reference and see if you can make sense of it:
http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#.5BSFn.5D
Here's an example of this - here I was actually forcing the portraits to stereo (because they were mono by default and that was causing trouble with the rest of the fix), so you would use DefMode = 2 instead of DefMode = 1 to force them to mono.
https://github.com/DarkStarSword/3d-fixes/commit/ee715abf29f1867d79522de73474b131905f34eb
You can see a comment I left for myself as I was working out which render targets/surfaces I needed to change - I found all the unique surface creation lines in the LOG.txt and tried changing half of them at a time, until I had narrowed it down to three I needed to change. It is very likely you will need to change at least two (if not more) - one for the colour buffer and one for the depth buffer.
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
EDIT: there's easily over a hundred ps involved here. Is performance going to be an issue?