Bo3b's School For Shaderhackers
  29 / 87    
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]
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)


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
{
...

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 03/14/2015 12:46 PM   
[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).
Volnaiskra said:I'm just going through lesson 1. There's a bit of an oddity that I don't quite understand.
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).

Posted 03/14/2015 02:30 PM   
[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

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

Posted 03/15/2015 02:45 AM   
[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

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

Posted 03/15/2015 02:53 AM   
[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.
helifax said:Quick question:

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

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

Posted 03/15/2015 03:19 AM   
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

Posted 03/15/2015 04:08 AM   
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.

ImageVolnaPC.com - Tips, tweaks, performance comparisons (PhysX card, SLI scaling, etc)

Posted 03/18/2015 09:07 AM   
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).

Posted 03/18/2015 09:44 AM   
aren't the beeps only in 3dmigoto?
aren't the beeps only in 3dmigoto?

ImageVolnaPC.com - Tips, tweaks, performance comparisons (PhysX card, SLI scaling, etc)

Posted 03/18/2015 11:29 AM   
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.

Posted 03/18/2015 12:17 PM   
No probs. Yeah, I'm back in migoto now. I was in helix doing the lessons. I'm not going to miss that assembly language, I can tell you that!
No probs. Yeah, I'm back in migoto now. I was in helix doing the lessons. I'm not going to miss that assembly language, I can tell you that!

ImageVolnaPC.com - Tips, tweaks, performance comparisons (PhysX card, SLI scaling, etc)

Posted 03/18/2015 01:43 PM   
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. [code] // // Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022 // // Parameters: // // float3 ambient_cube_fb[2]; // float3 ambient_cube_lr[2]; // float3 ambient_cube_tb[2]; // float3 camera_position; // float4 g_clip_rect; // float g_fog_clear_distance; // float g_fog_colour_blend; // float g_fog_distance_scale; // float g_fog_distance_start; // float g_fog_distance_strength; // float g_fog_height_bottom; // float g_fog_height_strength; // float g_fog_height_top; // float g_hdr_on; // float g_inv_gamma_output; // float3 g_volume_fog_colour; // sampler2D s_diffuse_map; // samplerCUBE s_environment; // sampler2D s_gloss_map; // sampler2D s_normal_map; // samplerCUBE s_sky; // sampler2D s_specular_colour_map; // float3 sun_colour; // float3 sun_direction; // float4x4 view_projection; // // // Registers: // // Name Reg Size // ----------------------- ----- ---- // view_projection c0 4 // ambient_cube_lr c4 2 // ambient_cube_tb c6 2 // ambient_cube_fb c8 2 // g_inv_gamma_output c10 1 // camera_position c11 1 // g_clip_rect c12 1 // sun_direction c13 1 // sun_colour c14 1 // g_hdr_on c15 1 // g_volume_fog_colour c16 1 // g_fog_distance_start c17 1 // g_fog_distance_strength c18 1 // g_fog_distance_scale c19 1 // g_fog_height_bottom c20 1 // g_fog_height_top c21 1 // g_fog_height_strength c22 1 // g_fog_colour_blend c23 1 // g_fog_clear_distance c24 1 // s_sky s0 1 // s_environment s1 1 // s_diffuse_map s2 1 // s_specular_colour_map s3 1 // s_normal_map s4 1 // s_gloss_map s5 1 // ps_3_0 def c25, 0, 0.212599993, 0.715200007, 0.0722000003 def c26, -0.501960814, 0.00196078443, 2, -1 def c27, 5, 0.200000003, 8, 0.5 def c28, 1, 273, 0.00400000019, 360 def c29, 0.00100000005, 1.5, 0, 0 def c30, 1.41421354, 0.0174532924, -9.99999975e-005, 10000 def c31, -0.0174532924, 0.0174532924, 0.707106769, 1000 def c32, 0.140012279, 1.27323949, 1, 1.44269502 def c33, 60, 2.5, 1, 4 def c34, -0.0187292993, 0.0742610022, -0.212114394, 1.57072878 def c35, -2, 3.14159274, 0.99984771, 1.00015235 def c36, 0.979900002, 0.0199999996, 1, 0.999000013 def c37, -9.96578407, 4.95061684, 0.346573591, 4.54688501 def c38, 8, -4, -2, 3 def c39, -0.0123413419, 0.0123413419, -0, -1 dcl_texcoord v0.xyz dcl_texcoord1_pp v1 dcl_texcoord2_pp v2.xyz dcl_texcoord3_pp v3.xyz dcl_texcoord5_pp v4.xyz dcl_texcoord7 v5.xy dcl_cube s0 dcl_cube s1 dcl_2d s2 dcl_2d s3 dcl_2d s4 dcl_2d s5 texld_pp r0, v1, s2 add r1, r0.w, c26.x texkill r1 mad r1, v0.xyzx, -c39.wwwz, -c39.zzzw dp4 r0.w, r1, c3 rcp r0.w, r0.w dp4 r2.x, r1, c0 dp4 r2.y, r1, c1 mad r1.xy, r2, -r0.w, c12.zwzw mad r1.zw, r2.xyxy, r0.w, -c12.xyxy cmp r0.w, r1.y, c39.w, c39.z cmp r0.w, r1.w, r0.w, -c25.x cmp r0.w, r1.x, r0.w, -c25.x cmp r0.w, r1.z, r0.w, -c25.x cmp r1, r0.w, c39.w, c39.z texkill r1 texld r1, v1, s5 mul r0.w, r1.x, r1.x mad r0.w, r0.w, c36.x, c36.y mad r0.w, r0.w, c27.w, c27.w mad r0.w, r0.w, c26.z, c26.w mad r1.zw, r0.w, -r0.w, c36 log r0.w, r1.z cmp r0.w, r1.w, r0.w, c37.x mul r1.z, r0.w, c37.y mad r0.w, r0.w, c37.z, c37.w mad r1.z, r0.w, r0.w, -r1.z rsq r1.z, r1.z rcp r1.z, r1.z add r0.w, -r0.w, r1.z max r1.z, r0.w, c25.x rsq r0.w, r1.z rcp r0.w, r0.w mul r0.w, r0.w, c30.x rcp r0.w, r0.w mul r1.z, r0.w, c30.y mad r0.w, r0.w, c30.y, c30.z rcp r1.z, r1.z cmp r0.w, r0.w, r1.z, c30.w cmp r1.z, -r0.w, c39.z, c39.w mul r2.xy, r0.w, c39 mul r2.xz, r2.xyyw, r2.xyyw cmp r1.w, -r2.y, -c39.z, -c39.w mad r3, r2.xxzz, c32.x, c32.yzyz rcp r2.y, r3.y mul r2.y, r2.y, r3.x mul r2.x, r2.y, -r2.x mul r2.x, r2.x, c32.w exp r2.x, r2.x add r2.x, -r2.x, -c26.w rsq r2.x, r2.x rcp r2.x, r2.x mad r1.z, r1.z, r2.x, -c26.w mul r1.z, r1.z, c27.w rcp r2.x, r3.w mul r2.x, r2.x, r3.z mul r2.x, r2.x, -r2.z mul r2.x, r2.x, c32.w exp r2.x, r2.x add r2.x, -r2.x, -c26.w rsq r2.x, r2.x rcp r2.x, r2.x mad r1.w, r1.w, r2.x, -c26.w mad r1.z, r1.w, c27.w, -r1.z nrm_pp r2.xyz, v3 nrm_pp r3.xyz, v4 texld_pp r4, v1.zwzw, s4 add r4.xy, r4.wyzw, c26.y mad r4.xy, r4, c26.z, c26.w mul r3.xyz, r3, r4.y mad r2.xyz, r4.x, r2, r3 dp2add r1.w, r4, -r4, -c26.w max r2.w, r1.w, c25.x rsq r1.w, r2.w rcp r1.w, r1.w nrm_pp r3.xyz, v2 mad r2.xyz, r1.w, r3, r2 nrm r3.xyz, r2 add r2.xyz, -c11, v0 dp3 r1.w, r2, r2 rsq r1.w, r1.w mul r4.xyz, r1.w, r2 rcp r1.w, r1.w dp3 r3.w, r4, r3 add r3.w, r3.w, r3.w mad r5.xyz, r3, -r3.w, r4 dp3 r3.w, r5, r4 dp3 r4.x, -c13, r4 add r4.y, -r3.w, -c30.z pow r4.z, r3.w, c33.x mad r1.y, v5.y, -r1.y, r1.y add r1.x, -r1.x, -c26.w mul r5.w, r1.x, c27.z texldl r6, r5, s1 dp3 r1.x, -c13, r5 max r3.w, c26.w, r1.x min r1.x, r3.w, -c26.w mad r1.y, v5.x, -r1.y, r1.y add r3.w, -r1.y, -c26.w mul r4.z, r3.w, r4.z cmp r4.y, r4.y, c25.x, r4.z add r4.y, r1.y, r4.y lrp r5.x, r4.y, r1.z, r1.y max r4.y, r1.y, r5.x mul r4.yzw, r4.y, r6.xxyz texld_pp r5, v1, s3 dp3 r1.z, r5, c25.yzww lrp r6.xyz, v5.y, r1.z, r5 mul r4.yzw, r4, r6.xxyz mul r4.yzw, r4, c33.y dp3 r1.z, r0, c25.yzww lrp r5.xyz, v5.y, r1.z, r0 mad r0.xyz, r5, c27.x, c27.y lrp_sat r7.xyz, v5.x, r0, r5 mul r0.xyz, r3, c33.zwzw dp3 r1.z, r3, -c13 nrm r3.xyz, r0 mov r0.xyz, c4 cmp r0.xyz, r3.x, r0, c5 mov r5.xyz, c6 cmp r5.xyz, r3.y, r5, c7 mul r8.xyz, r3, r3 mov r9.xyz, c8 cmp r3.xyz, r3.z, r9, c9 mul r5.xyz, r5, r8.y mad r0.xyz, r8.x, r0, r5 mad r0.xyz, r8.z, r3, r0 mov r5, c28 cmp r3.xyz, -c15.x, r5.xxyw, r5.zwxw mul r0.xyz, r0, r3.y mul r0.xyz, r7, r0 mul r5.xyz, r1.z, r7 mul r5.xyz, r5, c14 cmp r5.xyz, r1.z, r5, c25.x add r1.z, r1.z, c35.z mul_sat r1.z, r1.z, c35.w mul r0.xyz, r3.w, r0 mad r0.xyz, r0, r3.x, r4.yzww mad r3.y, r1_abs.x, c34.x, c34.y mad r3.y, r3.y, r1_abs.x, c34.z mad r3.y, r3.y, r1_abs.x, c34.w add r4.y, -r1_abs.x, -c26.w cmp r1.x, r1.x, -c39.z, -c39.w rsq r4.y, r4.y rcp r4.y, r4.y mul r3.y, r3.y, r4.y mad r4.y, r3.y, c35.x, c35.y mad r1.x, r4.y, r1.x, r3.y add r4.yz, r1.x, c31.xxyw mul r4.yz, r0.w, r4 cmp r0.w, r4.y, c39.z, c39.w mul r4.yz, r4, c31.z cmp r7.xy, -r4.yzzw, -c39.z, -c39.w mul r4.yz, r4, r4 add r0.w, r0.w, r7.x mad r8, r4.yyzz, c32.x, c32.yzyz rcp r1.x, r8.y mul r1.x, r1.x, r8.x mul r1.x, r1.x, -r4.y mul r1.x, r1.x, c32.w exp r1.x, r1.x add r1.x, -r1.x, -c26.w rsq r1.x, r1.x rcp r1.x, r1.x mad r0.w, r0.w, r1.x, -c26.w mul r0.w, r0.w, c27.w rcp r1.x, r8.w mul r1.x, r1.x, r8.z mul r1.x, r1.x, -r4.z mul r1.x, r1.x, c32.w exp r1.x, r1.x add r1.x, -r1.x, -c26.w rsq r1.x, r1.x rcp r1.x, r1.x mad r1.x, r7.y, r1.x, -c26.w mad r0.w, r1.x, c27.w, -r0.w mul r0.w, r0.w, r1.z pow r1.x, r4.x, c33.x add r1.z, -r4.x, -c30.z mul r1.x, r3.w, r1.x cmp r1.x, r1.z, c25.x, r1.x add r1.x, r1.x, r1.y mul r0.w, r0.w, r1.x cmp r1.x, -r1.y, -c39.z, -c39.w mul r0.w, r0.w, r1.x max r3.y, r0.w, r1.y mul_sat r0.w, r3.z, r0.w mul r1.xyz, r6, r0.w add r0.w, -r3.y, -c26.w mul r3.yzw, r0.w, r5.xxyz mul r3.yzw, r3.x, r3 mad r1.xyz, r1, c14, r3.yzww add r0.xyz, r0, r1 add r0.w, c21.x, -v0.y add r0.w, r0.w, -c20.x mov r1.x, c21.x add r1.x, r1.x, -c20.x rcp r1.x, r1.x mul_sat r0.w, r0.w, r1.x mad r1.x, r0.w, c38.z, c38.w mul r0.w, r0.w, r0.w mul r0.w, r0.w, r1.x mov r3.w, c26.w add r1.x, -r3.w, -c18.x mul r1.x, r1.x, c31.w rcp r1.x, r1.x add r1.y, -r3.w, -c17.x mad r1.y, r1.y, c38.x, c38.y mad r1.x, r1.w, r1.x, r1.y mul r1.x, r1.x, c32.w exp r1.x, r1.x rcp r1.x, r1.x mad_sat r1.x, c19.x, -r1.x, c19.x mad r0.w, c22.x, r0.w, r1.x mov r4.x, c25.x dp2add_sat r1.x, r1.x, c23.x, r4.x mov r4.x, c29.x add r1.y, r4.x, -c24.x rcp r1.z, c24.x cmp r1.y, r1.y, c31.w, r1.z mul_sat r1.y, r1.y, r1.w mad r1.z, r1.y, c38.z, c38.w mul r1.y, r1.y, r1.y mul r1.y, r1.y, r1.z mul_sat r0.w, r0.w, r1.y max r2.w, r2.y, c25.x texld r2, r2.xwzw, s0 mov r4.xyz, c14 mul r1.yzw, r4.xxyz, c16.xxyz mul r1.yzw, r1, c29.y abs r2.w, c13.y mul r1.yzw, r1, r2.w mad r2.xyz, r1.yzww, -r3.x, r2 mul r1.yzw, r3.x, r1 mad r1.xyz, r1.x, r2, r1.yzww lrp_sat r2.xyz, r0.w, r1, r0 log r0.x, r2.x log r0.y, r2.y log r0.z, r2.z mul r0.xyz, r0, c10.x exp_sat oC0.x, r0.x exp_sat oC0.y, r0.y exp_sat oC0.z, r0.z mov oC0.w, -c26.w // approximately 261 instruction slots used (7 texture, 254 arithmetic) [/code] 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?
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.

//
// Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022
//
// Parameters:
//
// float3 ambient_cube_fb[2];
// float3 ambient_cube_lr[2];
// float3 ambient_cube_tb[2];
// float3 camera_position;
// float4 g_clip_rect;
// float g_fog_clear_distance;
// float g_fog_colour_blend;
// float g_fog_distance_scale;
// float g_fog_distance_start;
// float g_fog_distance_strength;
// float g_fog_height_bottom;
// float g_fog_height_strength;
// float g_fog_height_top;
// float g_hdr_on;
// float g_inv_gamma_output;
// float3 g_volume_fog_colour;
// sampler2D s_diffuse_map;
// samplerCUBE s_environment;
// sampler2D s_gloss_map;
// sampler2D s_normal_map;
// samplerCUBE s_sky;
// sampler2D s_specular_colour_map;
// float3 sun_colour;
// float3 sun_direction;
// float4x4 view_projection;
//
//
// Registers:
//
// Name Reg Size
// ----------------------- ----- ----
// view_projection c0 4
// ambient_cube_lr c4 2
// ambient_cube_tb c6 2
// ambient_cube_fb c8 2
// g_inv_gamma_output c10 1
// camera_position c11 1
// g_clip_rect c12 1
// sun_direction c13 1
// sun_colour c14 1
// g_hdr_on c15 1
// g_volume_fog_colour c16 1
// g_fog_distance_start c17 1
// g_fog_distance_strength c18 1
// g_fog_distance_scale c19 1
// g_fog_height_bottom c20 1
// g_fog_height_top c21 1
// g_fog_height_strength c22 1
// g_fog_colour_blend c23 1
// g_fog_clear_distance c24 1
// s_sky s0 1
// s_environment s1 1
// s_diffuse_map s2 1
// s_specular_colour_map s3 1
// s_normal_map s4 1
// s_gloss_map s5 1
//

ps_3_0
def c25, 0, 0.212599993, 0.715200007, 0.0722000003
def c26, -0.501960814, 0.00196078443, 2, -1
def c27, 5, 0.200000003, 8, 0.5
def c28, 1, 273, 0.00400000019, 360
def c29, 0.00100000005, 1.5, 0, 0
def c30, 1.41421354, 0.0174532924, -9.99999975e-005, 10000
def c31, -0.0174532924, 0.0174532924, 0.707106769, 1000
def c32, 0.140012279, 1.27323949, 1, 1.44269502
def c33, 60, 2.5, 1, 4
def c34, -0.0187292993, 0.0742610022, -0.212114394, 1.57072878
def c35, -2, 3.14159274, 0.99984771, 1.00015235
def c36, 0.979900002, 0.0199999996, 1, 0.999000013
def c37, -9.96578407, 4.95061684, 0.346573591, 4.54688501
def c38, 8, -4, -2, 3
def c39, -0.0123413419, 0.0123413419, -0, -1
dcl_texcoord v0.xyz
dcl_texcoord1_pp v1
dcl_texcoord2_pp v2.xyz
dcl_texcoord3_pp v3.xyz
dcl_texcoord5_pp v4.xyz
dcl_texcoord7 v5.xy
dcl_cube s0
dcl_cube s1
dcl_2d s2
dcl_2d s3
dcl_2d s4
dcl_2d s5
texld_pp r0, v1, s2
add r1, r0.w, c26.x
texkill r1
mad r1, v0.xyzx, -c39.wwwz, -c39.zzzw
dp4 r0.w, r1, c3
rcp r0.w, r0.w
dp4 r2.x, r1, c0
dp4 r2.y, r1, c1
mad r1.xy, r2, -r0.w, c12.zwzw
mad r1.zw, r2.xyxy, r0.w, -c12.xyxy
cmp r0.w, r1.y, c39.w, c39.z
cmp r0.w, r1.w, r0.w, -c25.x
cmp r0.w, r1.x, r0.w, -c25.x
cmp r0.w, r1.z, r0.w, -c25.x
cmp r1, r0.w, c39.w, c39.z
texkill r1
texld r1, v1, s5
mul r0.w, r1.x, r1.x
mad r0.w, r0.w, c36.x, c36.y
mad r0.w, r0.w, c27.w, c27.w
mad r0.w, r0.w, c26.z, c26.w
mad r1.zw, r0.w, -r0.w, c36
log r0.w, r1.z
cmp r0.w, r1.w, r0.w, c37.x
mul r1.z, r0.w, c37.y
mad r0.w, r0.w, c37.z, c37.w
mad r1.z, r0.w, r0.w, -r1.z
rsq r1.z, r1.z
rcp r1.z, r1.z
add r0.w, -r0.w, r1.z
max r1.z, r0.w, c25.x
rsq r0.w, r1.z
rcp r0.w, r0.w
mul r0.w, r0.w, c30.x
rcp r0.w, r0.w
mul r1.z, r0.w, c30.y
mad r0.w, r0.w, c30.y, c30.z
rcp r1.z, r1.z
cmp r0.w, r0.w, r1.z, c30.w
cmp r1.z, -r0.w, c39.z, c39.w
mul r2.xy, r0.w, c39
mul r2.xz, r2.xyyw, r2.xyyw
cmp r1.w, -r2.y, -c39.z, -c39.w
mad r3, r2.xxzz, c32.x, c32.yzyz
rcp r2.y, r3.y
mul r2.y, r2.y, r3.x
mul r2.x, r2.y, -r2.x
mul r2.x, r2.x, c32.w
exp r2.x, r2.x
add r2.x, -r2.x, -c26.w
rsq r2.x, r2.x
rcp r2.x, r2.x
mad r1.z, r1.z, r2.x, -c26.w
mul r1.z, r1.z, c27.w
rcp r2.x, r3.w
mul r2.x, r2.x, r3.z
mul r2.x, r2.x, -r2.z
mul r2.x, r2.x, c32.w
exp r2.x, r2.x
add r2.x, -r2.x, -c26.w
rsq r2.x, r2.x
rcp r2.x, r2.x
mad r1.w, r1.w, r2.x, -c26.w
mad r1.z, r1.w, c27.w, -r1.z
nrm_pp r2.xyz, v3
nrm_pp r3.xyz, v4
texld_pp r4, v1.zwzw, s4
add r4.xy, r4.wyzw, c26.y
mad r4.xy, r4, c26.z, c26.w
mul r3.xyz, r3, r4.y
mad r2.xyz, r4.x, r2, r3
dp2add r1.w, r4, -r4, -c26.w
max r2.w, r1.w, c25.x
rsq r1.w, r2.w
rcp r1.w, r1.w
nrm_pp r3.xyz, v2
mad r2.xyz, r1.w, r3, r2
nrm r3.xyz, r2
add r2.xyz, -c11, v0
dp3 r1.w, r2, r2
rsq r1.w, r1.w
mul r4.xyz, r1.w, r2
rcp r1.w, r1.w
dp3 r3.w, r4, r3
add r3.w, r3.w, r3.w
mad r5.xyz, r3, -r3.w, r4
dp3 r3.w, r5, r4
dp3 r4.x, -c13, r4
add r4.y, -r3.w, -c30.z
pow r4.z, r3.w, c33.x
mad r1.y, v5.y, -r1.y, r1.y
add r1.x, -r1.x, -c26.w
mul r5.w, r1.x, c27.z
texldl r6, r5, s1
dp3 r1.x, -c13, r5
max r3.w, c26.w, r1.x
min r1.x, r3.w, -c26.w
mad r1.y, v5.x, -r1.y, r1.y
add r3.w, -r1.y, -c26.w
mul r4.z, r3.w, r4.z
cmp r4.y, r4.y, c25.x, r4.z
add r4.y, r1.y, r4.y
lrp r5.x, r4.y, r1.z, r1.y
max r4.y, r1.y, r5.x
mul r4.yzw, r4.y, r6.xxyz
texld_pp r5, v1, s3
dp3 r1.z, r5, c25.yzww
lrp r6.xyz, v5.y, r1.z, r5
mul r4.yzw, r4, r6.xxyz
mul r4.yzw, r4, c33.y
dp3 r1.z, r0, c25.yzww
lrp r5.xyz, v5.y, r1.z, r0
mad r0.xyz, r5, c27.x, c27.y
lrp_sat r7.xyz, v5.x, r0, r5
mul r0.xyz, r3, c33.zwzw
dp3 r1.z, r3, -c13
nrm r3.xyz, r0
mov r0.xyz, c4
cmp r0.xyz, r3.x, r0, c5
mov r5.xyz, c6
cmp r5.xyz, r3.y, r5, c7
mul r8.xyz, r3, r3
mov r9.xyz, c8
cmp r3.xyz, r3.z, r9, c9
mul r5.xyz, r5, r8.y
mad r0.xyz, r8.x, r0, r5
mad r0.xyz, r8.z, r3, r0
mov r5, c28
cmp r3.xyz, -c15.x, r5.xxyw, r5.zwxw
mul r0.xyz, r0, r3.y
mul r0.xyz, r7, r0
mul r5.xyz, r1.z, r7
mul r5.xyz, r5, c14
cmp r5.xyz, r1.z, r5, c25.x
add r1.z, r1.z, c35.z
mul_sat r1.z, r1.z, c35.w
mul r0.xyz, r3.w, r0
mad r0.xyz, r0, r3.x, r4.yzww
mad r3.y, r1_abs.x, c34.x, c34.y
mad r3.y, r3.y, r1_abs.x, c34.z
mad r3.y, r3.y, r1_abs.x, c34.w
add r4.y, -r1_abs.x, -c26.w
cmp r1.x, r1.x, -c39.z, -c39.w
rsq r4.y, r4.y
rcp r4.y, r4.y
mul r3.y, r3.y, r4.y
mad r4.y, r3.y, c35.x, c35.y
mad r1.x, r4.y, r1.x, r3.y
add r4.yz, r1.x, c31.xxyw
mul r4.yz, r0.w, r4
cmp r0.w, r4.y, c39.z, c39.w
mul r4.yz, r4, c31.z
cmp r7.xy, -r4.yzzw, -c39.z, -c39.w
mul r4.yz, r4, r4
add r0.w, r0.w, r7.x
mad r8, r4.yyzz, c32.x, c32.yzyz
rcp r1.x, r8.y
mul r1.x, r1.x, r8.x
mul r1.x, r1.x, -r4.y
mul r1.x, r1.x, c32.w
exp r1.x, r1.x
add r1.x, -r1.x, -c26.w
rsq r1.x, r1.x
rcp r1.x, r1.x
mad r0.w, r0.w, r1.x, -c26.w
mul r0.w, r0.w, c27.w
rcp r1.x, r8.w
mul r1.x, r1.x, r8.z
mul r1.x, r1.x, -r4.z
mul r1.x, r1.x, c32.w
exp r1.x, r1.x
add r1.x, -r1.x, -c26.w
rsq r1.x, r1.x
rcp r1.x, r1.x
mad r1.x, r7.y, r1.x, -c26.w
mad r0.w, r1.x, c27.w, -r0.w
mul r0.w, r0.w, r1.z
pow r1.x, r4.x, c33.x
add r1.z, -r4.x, -c30.z
mul r1.x, r3.w, r1.x
cmp r1.x, r1.z, c25.x, r1.x
add r1.x, r1.x, r1.y
mul r0.w, r0.w, r1.x
cmp r1.x, -r1.y, -c39.z, -c39.w
mul r0.w, r0.w, r1.x
max r3.y, r0.w, r1.y
mul_sat r0.w, r3.z, r0.w
mul r1.xyz, r6, r0.w
add r0.w, -r3.y, -c26.w
mul r3.yzw, r0.w, r5.xxyz
mul r3.yzw, r3.x, r3
mad r1.xyz, r1, c14, r3.yzww
add r0.xyz, r0, r1
add r0.w, c21.x, -v0.y
add r0.w, r0.w, -c20.x
mov r1.x, c21.x
add r1.x, r1.x, -c20.x
rcp r1.x, r1.x
mul_sat r0.w, r0.w, r1.x
mad r1.x, r0.w, c38.z, c38.w
mul r0.w, r0.w, r0.w
mul r0.w, r0.w, r1.x
mov r3.w, c26.w
add r1.x, -r3.w, -c18.x
mul r1.x, r1.x, c31.w
rcp r1.x, r1.x
add r1.y, -r3.w, -c17.x
mad r1.y, r1.y, c38.x, c38.y
mad r1.x, r1.w, r1.x, r1.y
mul r1.x, r1.x, c32.w
exp r1.x, r1.x
rcp r1.x, r1.x
mad_sat r1.x, c19.x, -r1.x, c19.x
mad r0.w, c22.x, r0.w, r1.x
mov r4.x, c25.x
dp2add_sat r1.x, r1.x, c23.x, r4.x
mov r4.x, c29.x
add r1.y, r4.x, -c24.x
rcp r1.z, c24.x
cmp r1.y, r1.y, c31.w, r1.z
mul_sat r1.y, r1.y, r1.w
mad r1.z, r1.y, c38.z, c38.w
mul r1.y, r1.y, r1.y
mul r1.y, r1.y, r1.z
mul_sat r0.w, r0.w, r1.y
max r2.w, r2.y, c25.x
texld r2, r2.xwzw, s0
mov r4.xyz, c14
mul r1.yzw, r4.xxyz, c16.xxyz
mul r1.yzw, r1, c29.y
abs r2.w, c13.y
mul r1.yzw, r1, r2.w
mad r2.xyz, r1.yzww, -r3.x, r2
mul r1.yzw, r3.x, r1
mad r1.xyz, r1.x, r2, r1.yzww
lrp_sat r2.xyz, r0.w, r1, r0
log r0.x, r2.x
log r0.y, r2.y
log r0.z, r2.z
mul r0.xyz, r0, c10.x
exp_sat oC0.x, r0.x
exp_sat oC0.y, r0.y
exp_sat oC0.z, r0.z
mov oC0.w, -c26.w


// 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?

Posted 03/18/2015 02:08 PM   
@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.

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

Posted 03/19/2015 12:31 AM   
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.

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

Posted 03/19/2015 12:34 AM   
Thanks again guys! I smell another learning opportunity :D EDIT: there's easily over a hundred ps involved here. Is performance going to be an issue?
Thanks again guys! I smell another learning opportunity :D

EDIT: there's easily over a hundred ps involved here. Is performance going to be an issue?

Posted 03/19/2015 10:03 AM   
  29 / 87    
Scroll To Top