Rise of the Tomb Raider (3D Vision Ready Support)
  35 / 41    
[quote="helifax"][quote="ImNutz4NvSLI"]using official patch and get options for 3D - is there supposed to be an actual "3D Vision' setting along with 'SBS' & 'ON?' I ask because I can't get 3D to work, it kicks in but the screen remains blank, can hear it running and can move the cursor for menu items as well. I am running 3D Surround and a fresh install of the latest driver 362.00, been messing with this all day! CM mode worked fine, but can't get this. I will prob use your Fix, but i'd like to solve this and check it out first. So, anyone else with a black screen after 3D enabled? ~Nutz [/quote] Looks like a broken profile there... Are you using the official profile? If it doesn't work have you tried my profile? If still fails try DDU and install 361.91 and see if that solves it. Haven't tried 362.00 or the official patch yet.[/quote] Well, after reading your post and a few splintered nerves I decided to give the community (your) fix a try and wouldn't you know it... IT FIRED RIGHT UP! IT LOOKS BREATH TAKING Congrats on this Helifax and Gang, you have all achieved something that quite simply seems to 1-up the DEV's Patch a few times over! 1) DL'ing the NIP profile - piece of cake 2) Convergence Setting = Customizable 3) Performance is Great Your Instructions leave no room for user error, very concise and clear - the end result is amazing. When I first read the topic today, I got excited cuz HeliFax informed us the fix was ready and will be available later today.. I kept reading and my heart did a quick jump and then and a longer dip. I instantly knew that this was bitter sweet, you shaderhackers worked SO hard on this, and obviously the DEV's KNEW you were doing this, you would think they could have let us know this was in the works! Anyway, i'm glad they didn't inform you guys.. you might/probably would have shelved this, AT LEAST until the patch was released and then choose to finish it or simply concede to the possibly slightly inferior official/rush job release. Instead you have managed to make them look the kid that always waited till the last minute only to throw together some kind of "c+" type solution just to get it done. Don't get me wrong, I think it's AMAZING that the DEV's ACTUALLY added S3D RETROACTIVELY, based on popular demand and it simply bolsters my opinion of them (and therefore my willingness to spend the $$$ on their releases) that much more. It just so happens, you guys cared THAT MUCH more by putting your heart's and soul's into this, and you accomplished that with little to no funding and then you guys put it out there FOR FREE! You should all be proud of what you have done with this and it is extremely appreciated! Thank You! ~Nutz
helifax said:
ImNutz4NvSLI said:using official patch and get options for 3D - is there supposed to be an actual "3D Vision' setting along with 'SBS' & 'ON?'

I ask because I can't get 3D to work, it kicks in but the screen remains blank, can hear it running and can move the cursor for menu items as well.

I am running 3D Surround and a fresh install of the latest driver 362.00, been messing with this all day!

CM mode worked fine, but can't get this. I will prob use your Fix, but i'd like to solve this and check it out first.

So, anyone else with a black screen after 3D enabled?

~Nutz


Looks like a broken profile there... Are you using the official profile? If it doesn't work have you tried my profile?
If still fails try DDU and install 361.91 and see if that solves it.
Haven't tried 362.00 or the official patch yet.


Well, after reading your post and a few splintered nerves I decided to give the community (your) fix a try and wouldn't you know it...

IT FIRED RIGHT UP!

IT LOOKS BREATH TAKING

Congrats on this Helifax and Gang, you have all achieved something that quite simply seems to 1-up the DEV's Patch a few times over!

1) DL'ing the NIP profile - piece of cake
2) Convergence Setting = Customizable
3) Performance is Great

Your Instructions leave no room for user error, very concise and clear - the end result is amazing.

When I first read the topic today, I got excited cuz HeliFax informed us the fix was ready and will be available later today.. I kept reading and my heart did a quick jump and then and a longer dip. I instantly knew that this was bitter sweet, you shaderhackers worked SO hard on this, and obviously the DEV's KNEW you were doing this, you would think they could have let us know this was in the works!

Anyway, i'm glad they didn't inform you guys.. you might/probably would have shelved this, AT LEAST until the patch was released and then choose to finish it or simply concede to the possibly slightly inferior official/rush job release.

Instead you have managed to make them look the kid that always waited till the last minute only to throw together some kind of "c+" type solution just to get it done.

Don't get me wrong, I think it's AMAZING that the DEV's ACTUALLY added S3D RETROACTIVELY, based on popular demand and it simply bolsters my opinion of them (and therefore my willingness to spend the $$$ on their releases) that much more.

It just so happens, you guys cared THAT MUCH more by putting your heart's and soul's into this, and you accomplished that with little to no funding and then you guys put it out there FOR FREE!

You should all be proud of what you have done with this and it is extremely appreciated!

Thank You!

~Nutz

---- Core System Components ----

(MBD) EVGA® Classified™ (x58) E760
(CPU) Intel® i7™ '980x' (OC'd) @ 4.8Ghz
(CPU) Corsair® (CPU) Cooling™ (H50)
(MEM) Corsair® (MEM) Dominator(GT)™ 12GB @ 2000Mhz
(PSU) PC)P&C™ (PSU)'T12W' @ 1200w
(CSE) Cooler Master® Stacker™ (830)

---- (3D) Graphics Sub'Sys ----

(2x) EVGA® GTX'970 (SC) - Nvidia® SLi™
(1x) EVGA® GTX'660 (Ti) - Nvidia® PhysX™

(1x) ACER® (GN) 246(HL) - Nvidia® 3DVision™
(1x) ASUS® (VG) 248(QE) - Nvidia® 3DVision™
(1x) ACER® (GN) 246(HL) - Nvidia® 3DVision™

---- Audio & System Control ----

(1x) ASUS® - Xonar™ (HDAV1.3)
(1x) VL'Sys® - MPlay202+ 'GUI' & (RF) Remote

---- Storage (HDD's) & Media (ODD's) PB & REC ----

(1x) (SSD) Samsung® - 850(PRO) '3D'Vertical™
(1x) (2TB) Seagate® - Hybrid Series™
(4x) (2TB) W.Digital® - 'Blacks'™
(2x) (ODD) LG® BluRay™ - 'Play'n'Burn'

---- Nvidia® (WHQL) Drivers (x64) In Use ----

(NV®)DR - v347.88 (WHQL) - Primary (GTA V)
(NV®)DR - v350.12 (WHQL) - Testing (Stable)
(NV®)DR - v353.06 (WHQL) - All Other Titles

Posted 03/01/2016 10:39 PM   
Big thanks for the feedback "ImNutz4NvSLI" ! Really glad that you like it and having no issues with it;) Some fixes are still pending;) So keep an eye here;)
Big thanks for the feedback "ImNutz4NvSLI" !
Really glad that you like it and having no issues with it;) Some fixes are still pending;) So keep an eye here;)

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/01/2016 10:45 PM   
[quote="helifax"]Hmm it seems the Crosshair to depth is not working quite right... I think is a scaling issue it seems. So I started playing a bit more with it... Now I have this shader: [code] // Bow crosshair + second UI // Pixel Shader 3020ae9d794bc65e cbuffer WorldBuffer : register(b0) { struct { row_major float4x4 ViewProject; struct { row_major float4x4 World; row_major float4x4 WorldViewProject; } PerInstance[256]; } WorldParameters : packoffset(c0); } cbuffer MaterialBuffer : register(b4) { float4 MaterialParams[512] : packoffset(c0); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); // Depth buffer copied from other shaders to this input with 3Dmigoto: Texture2D<float4> DepthBuffer : register(t110); static const float near = 0.1; static const float far = 40000; float world_z_from_depth_buffer(float x, float y) { uint width, height; float z; DepthBuffer.GetDimensions(width, height); x = min(max((x / 2 + 0.5) * width, 0), width - 1); y = min(max((-y / 2 + 0.5) * height, 0), height - 1); z = DepthBuffer.Load(int3(x, y, 0)); return z *10; /// THIS DOESN'T SEEM TO WORK OR DON'T SEE ANY DIFFERENCE! // Derive world Z from depth buffer. This is a kluge since I don't know // the correct scaling, and the Z buffer seems to be (1 - what I expected). // Might be able to determine the correct way to scale it from other shaders. return far*near/(((1-z)*near) + (far*z)); } void main( float4 v0 : COLOR0, float3 v1 : POSITION0, uint v2 : SV_InstanceID0, uint v3 : SV_VertexID0, out float4 o0 : SV_POSITION0, out float4 o1 : COLOR0, out uint o2 : PSIZE0) { float4 r0,r1; uint4 bitmask, uiDest; float4 fDest; r0.x = (uint)v2.x << 3; r1.xyzw = WorldParameters.PerInstance[r0.x/4].WorldViewProject._m10_m11_m12_m13 * v1.yyyy; r1.xyzw = v1.xxxx * WorldParameters.PerInstance[r0.x/4].WorldViewProject._m00_m01_m02_m03 + r1.xyzw; r1.xyzw = v1.zzzz * WorldParameters.PerInstance[r0.x/4].WorldViewProject._m20_m21_m22_m23 + r1.xyzw; o0.xyzw = WorldParameters.PerInstance[r0.x/4].WorldViewProject._m30_m31_m32_m33 + r1.xyzw; r0.xyzw = max(float4(0,0,0,0), v0.xyzw); r0.xyzw = log2(r0.xyzw); r0.xyzw = MaterialParams[0].xxxx * r0.xyzw; o1.xyzw = exp2(r0.xyzw); o2.x = v2.x; float4 stereo = StereoParams.Load(0); float4 iniParams = IniParams.Load(0); float4 tex_filter = IniParams.Load(int2(2,0)); o0.x -= stereo.x * (o0.w - stereo.y); float temp = world_z_from_depth_buffer(0,0); float factor = 1.0; // Surround Mode? if (iniParams.w == 1.0 && iniParams.y == 1) factor = 3.0; if (tex_filter.x == 1) { if ((o0.x > -8000.60) && (o0.x < 8000.60) && (o0.y > -5000.60) && (o0.y < 5000.60)) { if (iniParams.z == 1) o0.x += (stereo.x * (o0.w - stereo.y) * (10 - temp)) * factor; } } return; } [/code] Now I noticed: - If I return z * 10 I get a better granularity of the depth. - If I do the above code (10- temp) when I aim near I get the correct depth, but when I aim far away to the sky I get 2D depth (which means that "temp == 10" so my "z == 1". Anyone can help me understand how to properly scale the depth buffer returned value? Much appreciated! and big thanks in advance![/quote] So did some more digging and it seems that the depth value changes only when I am AIM up and down, but it doesn't change when I look at an object (like a tree and go further or closer to it...) Hmmm... I think I am not sampling the depth buffer right.... Or the scaling is totally off...
helifax said:Hmm it seems the Crosshair to depth is not working quite right...
I think is a scaling issue it seems. So I started playing a bit more with it...

Now I have this shader:
// Bow crosshair + second UI
// Pixel Shader 3020ae9d794bc65e
cbuffer WorldBuffer : register(b0)
{

struct
{
row_major float4x4 ViewProject;

struct
{
row_major float4x4 World;
row_major float4x4 WorldViewProject;
} PerInstance[256];

} WorldParameters : packoffset(c0);

}

cbuffer MaterialBuffer : register(b4)
{
float4 MaterialParams[512] : packoffset(c0);
}



// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);

// Depth buffer copied from other shaders to this input with 3Dmigoto:
Texture2D<float4> DepthBuffer : register(t110);

static const float near = 0.1;
static const float far = 40000;

float world_z_from_depth_buffer(float x, float y)
{
uint width, height;
float z;

DepthBuffer.GetDimensions(width, height);

x = min(max((x / 2 + 0.5) * width, 0), width - 1);
y = min(max((-y / 2 + 0.5) * height, 0), height - 1);
z = DepthBuffer.Load(int3(x, y, 0));

return z *10;


/// THIS DOESN'T SEEM TO WORK OR DON'T SEE ANY DIFFERENCE!

// Derive world Z from depth buffer. This is a kluge since I don't know
// the correct scaling, and the Z buffer seems to be (1 - what I expected).
// Might be able to determine the correct way to scale it from other shaders.
return far*near/(((1-z)*near) + (far*z));
}

void main(
float4 v0 : COLOR0,
float3 v1 : POSITION0,
uint v2 : SV_InstanceID0,
uint v3 : SV_VertexID0,
out float4 o0 : SV_POSITION0,
out float4 o1 : COLOR0,
out uint o2 : PSIZE0)
{
float4 r0,r1;
uint4 bitmask, uiDest;
float4 fDest;

r0.x = (uint)v2.x << 3;
r1.xyzw = WorldParameters.PerInstance[r0.x/4].WorldViewProject._m10_m11_m12_m13 * v1.yyyy;
r1.xyzw = v1.xxxx * WorldParameters.PerInstance[r0.x/4].WorldViewProject._m00_m01_m02_m03 + r1.xyzw;
r1.xyzw = v1.zzzz * WorldParameters.PerInstance[r0.x/4].WorldViewProject._m20_m21_m22_m23 + r1.xyzw;
o0.xyzw = WorldParameters.PerInstance[r0.x/4].WorldViewProject._m30_m31_m32_m33 + r1.xyzw;
r0.xyzw = max(float4(0,0,0,0), v0.xyzw);
r0.xyzw = log2(r0.xyzw);
r0.xyzw = MaterialParams[0].xxxx * r0.xyzw;
o1.xyzw = exp2(r0.xyzw);
o2.x = v2.x;

float4 stereo = StereoParams.Load(0);
float4 iniParams = IniParams.Load(0);
float4 tex_filter = IniParams.Load(int2(2,0));
o0.x -= stereo.x * (o0.w - stereo.y);
float temp = world_z_from_depth_buffer(0,0);

float factor = 1.0;
// Surround Mode?
if (iniParams.w == 1.0 && iniParams.y == 1)
factor = 3.0;

if (tex_filter.x == 1)
{
if ((o0.x > -8000.60) && (o0.x < 8000.60) && (o0.y > -5000.60) && (o0.y < 5000.60))
{
if (iniParams.z == 1)
o0.x += (stereo.x * (o0.w - stereo.y) * (10 - temp)) * factor;
}
}
return;
}


Now I noticed:
- If I return z * 10 I get a better granularity of the depth.
- If I do the above code (10- temp) when I aim near I get the correct depth, but when I aim far away to the sky I get 2D depth (which means that "temp == 10" so my "z == 1".

Anyone can help me understand how to properly scale the depth buffer returned value?

Much appreciated! and big thanks in advance!


So did some more digging and it seems that the depth value changes only when I am AIM up and down, but it doesn't change when I look at an object (like a tree and go further or closer to it...) Hmmm...
I think I am not sampling the depth buffer right.... Or the scaling is totally off...

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/01/2016 10:46 PM   
Keep the good work man, dynamic cross hair is the only thing missing in your marvelous fix
Keep the good work man, dynamic cross hair is the only thing missing in your marvelous fix

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

Posted 03/01/2016 11:14 PM   
[quote="helifax"]Hmm it seems the Crosshair to depth is not working quite right... I think is a scaling issue it seems. So I started playing a bit more with it... <snip> Anyone can help me understand how to properly scale the depth buffer returned value?[/quote]Trial and error is difficult to get the right results because of the way depth buffers are scaled - the best bet by far is to copy whatever the game uses when it scales the depth buffer for deferred rendering, e.g. in 05845fdfcf6059bb-ps.txt I see this: [code] ld_indexable(texture2d)(float,float,float,float) r1.x, r0.xyww, t1.xyzw mad r1.x, r1.x, cb2[20].x, cb2[20].y div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x [/code] Which should translate into: [code] return 1 / (z * DepthToW.x + DepthToW.y); [/code] You may need to define SceneBuffer in the target shaders to get DepthToW if it is not already there. I don't think you will need to copy it in with 3DMigoto in this case - as far as I can tell this game always has it bound in Register(b2) for vertex shaders, so just defining it should be enough. The other day I came up with a generic solution to scale the depth buffer based on the projection matrix - but it will only work if the game doesn't rescale the depth value before placing it in the output Z coordinate (e.g. this won't work for any games using a logarithmic depth buffer). If the game does it's own scaling like ROTTR you should still go with that, but if you are trying to add this to a game that doesn't use any deferred rendering and never scales the depth buffer this might help (I was looking at Akiba's Trip to move the waypoint markers to depth): [code] return Projection._m32 / (z + Projection._m22); [/code]
helifax said:Hmm it seems the Crosshair to depth is not working quite right...
I think is a scaling issue it seems. So I started playing a bit more with it...

<snip>

Anyone can help me understand how to properly scale the depth buffer returned value?
Trial and error is difficult to get the right results because of the way depth buffers are scaled - the best bet by far is to copy whatever the game uses when it scales the depth buffer for deferred rendering, e.g. in 05845fdfcf6059bb-ps.txt I see this:

ld_indexable(texture2d)(float,float,float,float) r1.x, r0.xyww, t1.xyzw
mad r1.x, r1.x, cb2[20].x, cb2[20].y
div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x


Which should translate into:

return 1 / (z * DepthToW.x + DepthToW.y);


You may need to define SceneBuffer in the target shaders to get DepthToW if it is not already there. I don't think you will need to copy it in with 3DMigoto in this case - as far as I can tell this game always has it bound in Register(b2) for vertex shaders, so just defining it should be enough.

The other day I came up with a generic solution to scale the depth buffer based on the projection matrix - but it will only work if the game doesn't rescale the depth value before placing it in the output Z coordinate (e.g. this won't work for any games using a logarithmic depth buffer). If the game does it's own scaling like ROTTR you should still go with that, but if you are trying to add this to a game that doesn't use any deferred rendering and never scales the depth buffer this might help (I was looking at Akiba's Trip to move the waypoint markers to depth):

return Projection._m32 / (z + Projection._m22);

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/01/2016 11:41 PM   
[quote="DarkStarSword"] Trial and error is difficult to get the right results because of the way depth buffers are scaled - the best bet by far is to copy whatever the game uses when it scales the depth buffer for deferred rendering, e.g. in 05845fdfcf6059bb-ps.txt I see this: [code] ld_indexable(texture2d)(float,float,float,float) r1.x, r0.xyww, t1.xyzw mad r1.x, r1.x, cb2[20].x, cb2[20].y div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x [/code] Which should translate into: [code] return 1 / (z * DepthToW.x + DepthToW.y); [/code] You may need to define SceneBuffer in the target shaders to get DepthToW if it is not already there. I don't think you will need to copy it in with 3DMigoto in this case - as far as I can tell this game always has it bound in Register(b2) for vertex shaders, so just defining it should be enough. [/quote] Wow, lots of into right there!!! I want to use the same approach. Unfortunately is not defined in that shader:( I can copy-paste it from that shader and define it in my shader, but I don't understand what I am to do next:( - Do I sample the depth Like I do and then just apply this formula to get the correct scale? [code] 1 / (sampledDepth * DepthToW.x + DepthToW.y); [/code] Or do I need to do something else? :-s Sorry if I am confused, but never tried to push things to proper depth before;) And my original implementation seemed to work (until well it didn;t :)) )
DarkStarSword said:

Trial and error is difficult to get the right results because of the way depth buffers are scaled - the best bet by far is to copy whatever the game uses when it scales the depth buffer for deferred rendering, e.g. in 05845fdfcf6059bb-ps.txt I see this:

ld_indexable(texture2d)(float,float,float,float) r1.x, r0.xyww, t1.xyzw
mad r1.x, r1.x, cb2[20].x, cb2[20].y
div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x


Which should translate into:

return 1 / (z * DepthToW.x + DepthToW.y);


You may need to define SceneBuffer in the target shaders to get DepthToW if it is not already there. I don't think you will need to copy it in with 3DMigoto in this case - as far as I can tell this game always has it bound in Register(b2) for vertex shaders, so just defining it should be enough.


Wow, lots of into right there!!! I want to use the same approach. Unfortunately is not defined in that shader:(

I can copy-paste it from that shader and define it in my shader, but I don't understand what I am to do next:(

- Do I sample the depth Like I do and then just apply this formula to get the correct scale?
1 / (sampledDepth * DepthToW.x + DepthToW.y);


Or do I need to do something else? :-s Sorry if I am confused, but never tried to push things to proper depth before;) And my original implementation seemed to work (until well it didn;t :)) )

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/01/2016 11:49 PM   
Yep, just copy + paste the definition from any other shader that uses it and make sure it's set to register(b2): [code] cbuffer SceneBuffer : register(b2) { row_major float4x4 View : packoffset(c0); row_major float4x4 ScreenMatrix : packoffset(c4); float2 DepthExportScale : packoffset(c8); float2 __padding0 : packoffset(c8.z); float4 FogParams : packoffset(c9); float3 __CameraPosition : packoffset(c10); float __padding12 : packoffset(c10.w); float3 CameraDirection : packoffset(c11); float __padding9 : packoffset(c11.w); float3 DepthFactors : packoffset(c12); float __padding10 : packoffset(c12.w); float3 ShadowDepthBiasAndLightType : packoffset(c13); float __padding11 : packoffset(c13.w); float4 SubframeViewport : packoffset(c14); row_major float3x4 DepthToWorld : packoffset(c15); float4 DepthToView : packoffset(c18); float4 OneOverDepthToView : packoffset(c19); float4 DepthToW : packoffset(c20); float4 ClipPlane : packoffset(c21); float2 ViewportDepthScaleOffset : packoffset(c22); float2 __padding1 : packoffset(c22.z); float2 ColorDOFDepthScaleOffset : packoffset(c23); float2 __padding2 : packoffset(c23.z); float4 TimeVector : packoffset(c24); float4 FogParams2 : packoffset(c25); float4 FogParams3 : packoffset(c26); float3 GlobalAmbient : packoffset(c27); float __padding8 : packoffset(c27.w); float4 GlobalParams[16] : packoffset(c28); float4 ViewToFogH : packoffset(c44); float4 ScreenExtents : packoffset(c45); float2 ScreenResolution : packoffset(c46); float2 __padding3 : packoffset(c46.z); float4 PSSMToMap1Lin : packoffset(c47); float4 PSSMToMap1Const : packoffset(c48); float4 PSSMToMap2Lin : packoffset(c49); float4 PSSMToMap2Const : packoffset(c50); float4 PSSMToMap3Lin : packoffset(c51); float4 PSSMToMap3Const : packoffset(c52); float4 PSSMDistances : packoffset(c53); row_major float4x4 WorldToPSSM0 : packoffset(c54); row_major float4x4 PrevViewProject : packoffset(c58); row_major float4x4 PrevWorld : packoffset(c62); row_major float4x4 ViewT : packoffset(c66); float4 PSSMExtents : packoffset(c70); float4 ShadowAtlasResolution : packoffset(c71); float4 UnitRimData[3] : packoffset(c72); float3 __CameraPositionForCorrection : packoffset(c75); float __padding7 : packoffset(c75.w); row_major float4x4 CameraViewProject : packoffset(c76); float4 BackBufferResolution : packoffset(c80); row_major float4x4 InverseProjection : packoffset(c81); float4 StereoOffset : packoffset(c85); row_major float4x4 Projection : packoffset(c86); row_major float4x4 ViewInv : packoffset(c90); float4 ColorSSAO : packoffset(c94); float4 GlobalFogColor : packoffset(c95); float4 VolumetricLightGlobalParams : packoffset(c96); float4 SnowParams01 : packoffset(c97); float4 SnowParams02 : packoffset(c98); float4 SnowParams03 : packoffset(c99); int SSREnabled : packoffset(c100); int __padding4 : packoffset(c100.y); int __padding5 : packoffset(c100.z); int __padding6 : packoffset(c100.w); } [/code] I usually stick the definitions in crosshair.hlsl so I don't have to worry about defining them in every shader that included it. Then add the scaling to world_z_from_depth_buffer: [code] float world_z_from_depth_buffer(float x, float y) { uint width, height; float z; DepthBuffer.GetDimensions(width, height); x = min(max((x / 2 + 0.5) * width, 0), width - 1); y = min(max((-y / 2 + 0.5) * height, 0), height - 1); z = DepthBuffer.Load(int3(x, y, 0)); return 1 / (z * DepthToW.x + DepthToW.y); } [/code] I'm still on the official build right now so I can't test this (and don't want to delay the Far Cry Primal download to switch builds).
Yep, just copy + paste the definition from any other shader that uses it and make sure it's set to register(b2):

cbuffer SceneBuffer : register(b2)
{
row_major float4x4 View : packoffset(c0);
row_major float4x4 ScreenMatrix : packoffset(c4);
float2 DepthExportScale : packoffset(c8);
float2 __padding0 : packoffset(c8.z);
float4 FogParams : packoffset(c9);
float3 __CameraPosition : packoffset(c10);
float __padding12 : packoffset(c10.w);
float3 CameraDirection : packoffset(c11);
float __padding9 : packoffset(c11.w);
float3 DepthFactors : packoffset(c12);
float __padding10 : packoffset(c12.w);
float3 ShadowDepthBiasAndLightType : packoffset(c13);
float __padding11 : packoffset(c13.w);
float4 SubframeViewport : packoffset(c14);
row_major float3x4 DepthToWorld : packoffset(c15);
float4 DepthToView : packoffset(c18);
float4 OneOverDepthToView : packoffset(c19);
float4 DepthToW : packoffset(c20);
float4 ClipPlane : packoffset(c21);
float2 ViewportDepthScaleOffset : packoffset(c22);
float2 __padding1 : packoffset(c22.z);
float2 ColorDOFDepthScaleOffset : packoffset(c23);
float2 __padding2 : packoffset(c23.z);
float4 TimeVector : packoffset(c24);
float4 FogParams2 : packoffset(c25);
float4 FogParams3 : packoffset(c26);
float3 GlobalAmbient : packoffset(c27);
float __padding8 : packoffset(c27.w);
float4 GlobalParams[16] : packoffset(c28);
float4 ViewToFogH : packoffset(c44);
float4 ScreenExtents : packoffset(c45);
float2 ScreenResolution : packoffset(c46);
float2 __padding3 : packoffset(c46.z);
float4 PSSMToMap1Lin : packoffset(c47);
float4 PSSMToMap1Const : packoffset(c48);
float4 PSSMToMap2Lin : packoffset(c49);
float4 PSSMToMap2Const : packoffset(c50);
float4 PSSMToMap3Lin : packoffset(c51);
float4 PSSMToMap3Const : packoffset(c52);
float4 PSSMDistances : packoffset(c53);
row_major float4x4 WorldToPSSM0 : packoffset(c54);
row_major float4x4 PrevViewProject : packoffset(c58);
row_major float4x4 PrevWorld : packoffset(c62);
row_major float4x4 ViewT : packoffset(c66);
float4 PSSMExtents : packoffset(c70);
float4 ShadowAtlasResolution : packoffset(c71);
float4 UnitRimData[3] : packoffset(c72);
float3 __CameraPositionForCorrection : packoffset(c75);
float __padding7 : packoffset(c75.w);
row_major float4x4 CameraViewProject : packoffset(c76);
float4 BackBufferResolution : packoffset(c80);
row_major float4x4 InverseProjection : packoffset(c81);
float4 StereoOffset : packoffset(c85);
row_major float4x4 Projection : packoffset(c86);
row_major float4x4 ViewInv : packoffset(c90);
float4 ColorSSAO : packoffset(c94);
float4 GlobalFogColor : packoffset(c95);
float4 VolumetricLightGlobalParams : packoffset(c96);
float4 SnowParams01 : packoffset(c97);
float4 SnowParams02 : packoffset(c98);
float4 SnowParams03 : packoffset(c99);
int SSREnabled : packoffset(c100);
int __padding4 : packoffset(c100.y);
int __padding5 : packoffset(c100.z);
int __padding6 : packoffset(c100.w);
}

I usually stick the definitions in crosshair.hlsl so I don't have to worry about defining them in every shader that included it.

Then add the scaling to world_z_from_depth_buffer:

float world_z_from_depth_buffer(float x, float y)
{
uint width, height;
float z;

DepthBuffer.GetDimensions(width, height);

x = min(max((x / 2 + 0.5) * width, 0), width - 1);
y = min(max((-y / 2 + 0.5) * height, 0), height - 1);
z = DepthBuffer.Load(int3(x, y, 0));

return 1 / (z * DepthToW.x + DepthToW.y);
}

I'm still on the official build right now so I can't test this (and don't want to delay the Far Cry Primal download to switch builds).

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/02/2016 12:00 AM   
[quote="ImNutz4NvSLI"]using official patch and get options for 3D - is there supposed to be an actual "3D Vision' setting along with 'SBS' & 'ON?' I ask because I can't get 3D to work, it kicks in but the screen remains blank, can hear it running and can move the cursor for menu items as well. I am running 3D Surround and a fresh install of the latest driver 362.00, been messing with this all day! CM mode worked fine, but can't get this. I will prob use your Fix, but i'd like to solve this and check it out first. So, anyone else with a black screen after 3D enabled? ~Nutz [/quote] :( I have the same blackscreen issue.....
ImNutz4NvSLI said:using official patch and get options for 3D - is there supposed to be an actual "3D Vision' setting along with 'SBS' & 'ON?'

I ask because I can't get 3D to work, it kicks in but the screen remains blank, can hear it running and can move the cursor for menu items as well.

I am running 3D Surround and a fresh install of the latest driver 362.00, been messing with this all day!

CM mode worked fine, but can't get this. I will prob use your Fix, but i'd like to solve this and check it out first.

So, anyone else with a black screen after 3D enabled?

~Nutz


:( I have the same blackscreen issue.....

Intel Core i9-9820x @ 3.30GHZ
32 gig Ram
2 EVGA RTX 2080 ti Gaming
3 X ASUS ROG SWIFT 27 144Hz G-SYNC Gaming 3D Monitor [PG278Q]
1 X ASUS VG278HE
Nvidia 3Dvision
Oculus Rift
HTC VIVE
Windows 10

Posted 03/02/2016 12:04 AM   
duplicate
duplicate

Intel Core i9-9820x @ 3.30GHZ
32 gig Ram
2 EVGA RTX 2080 ti Gaming
3 X ASUS ROG SWIFT 27 144Hz G-SYNC Gaming 3D Monitor [PG278Q]
1 X ASUS VG278HE
Nvidia 3Dvision
Oculus Rift
HTC VIVE
Windows 10

Posted 03/02/2016 12:12 AM   
[quote="DarkStarSword"]Yep, just copy + paste the definition from any other shader that uses it and make sure it's set to register(b2): [code] cbuffer SceneBuffer : register(b2) { row_major float4x4 View : packoffset(c0); row_major float4x4 ScreenMatrix : packoffset(c4); float2 DepthExportScale : packoffset(c8); float2 __padding0 : packoffset(c8.z); float4 FogParams : packoffset(c9); float3 __CameraPosition : packoffset(c10); float __padding12 : packoffset(c10.w); float3 CameraDirection : packoffset(c11); float __padding9 : packoffset(c11.w); float3 DepthFactors : packoffset(c12); float __padding10 : packoffset(c12.w); float3 ShadowDepthBiasAndLightType : packoffset(c13); float __padding11 : packoffset(c13.w); float4 SubframeViewport : packoffset(c14); row_major float3x4 DepthToWorld : packoffset(c15); float4 DepthToView : packoffset(c18); float4 OneOverDepthToView : packoffset(c19); float4 DepthToW : packoffset(c20); float4 ClipPlane : packoffset(c21); float2 ViewportDepthScaleOffset : packoffset(c22); float2 __padding1 : packoffset(c22.z); float2 ColorDOFDepthScaleOffset : packoffset(c23); float2 __padding2 : packoffset(c23.z); float4 TimeVector : packoffset(c24); float4 FogParams2 : packoffset(c25); float4 FogParams3 : packoffset(c26); float3 GlobalAmbient : packoffset(c27); float __padding8 : packoffset(c27.w); float4 GlobalParams[16] : packoffset(c28); float4 ViewToFogH : packoffset(c44); float4 ScreenExtents : packoffset(c45); float2 ScreenResolution : packoffset(c46); float2 __padding3 : packoffset(c46.z); float4 PSSMToMap1Lin : packoffset(c47); float4 PSSMToMap1Const : packoffset(c48); float4 PSSMToMap2Lin : packoffset(c49); float4 PSSMToMap2Const : packoffset(c50); float4 PSSMToMap3Lin : packoffset(c51); float4 PSSMToMap3Const : packoffset(c52); float4 PSSMDistances : packoffset(c53); row_major float4x4 WorldToPSSM0 : packoffset(c54); row_major float4x4 PrevViewProject : packoffset(c58); row_major float4x4 PrevWorld : packoffset(c62); row_major float4x4 ViewT : packoffset(c66); float4 PSSMExtents : packoffset(c70); float4 ShadowAtlasResolution : packoffset(c71); float4 UnitRimData[3] : packoffset(c72); float3 __CameraPositionForCorrection : packoffset(c75); float __padding7 : packoffset(c75.w); row_major float4x4 CameraViewProject : packoffset(c76); float4 BackBufferResolution : packoffset(c80); row_major float4x4 InverseProjection : packoffset(c81); float4 StereoOffset : packoffset(c85); row_major float4x4 Projection : packoffset(c86); row_major float4x4 ViewInv : packoffset(c90); float4 ColorSSAO : packoffset(c94); float4 GlobalFogColor : packoffset(c95); float4 VolumetricLightGlobalParams : packoffset(c96); float4 SnowParams01 : packoffset(c97); float4 SnowParams02 : packoffset(c98); float4 SnowParams03 : packoffset(c99); int SSREnabled : packoffset(c100); int __padding4 : packoffset(c100.y); int __padding5 : packoffset(c100.z); int __padding6 : packoffset(c100.w); } [/code] I usually stick the definitions in crosshair.hlsl so I don't have to worry about defining them in every shader that included it. Then add the scaling to world_z_from_depth_buffer: [code] float world_z_from_depth_buffer(float x, float y) { uint width, height; float z; DepthBuffer.GetDimensions(width, height); x = min(max((x / 2 + 0.5) * width, 0), width - 1); y = min(max((-y / 2 + 0.5) * height, 0), height - 1); z = DepthBuffer.Load(int3(x, y, 0)); return 1 / (z * DepthToW.x + DepthToW.y); } [/code] I'm still on the official build right now so I can't test this (and don't want to delay the Far Cry Primal download to switch builds).[/quote] Something funky is happening there:( I did just that but I wanted to double check... If I do that the whole crosshair disappears... both in 2D and 3D...weird... I tried to divide the value to a really big number and the Crosshair is still missing in 2D & 3D... (without the additional ifs) The shader that I am using for the UI is this "b65139cd6130cd09-vs_replace.txt" just for reference;) Now, I am even more puzzled as what is going on there:)) One thing I noticed: [code] float temp = 1 / (sampledDepth * DepthToW.x + DepthToW.y); [/code] Makes the UI disappear (without the additional ifs). BUT [code] float temp = 1 / (sampledDepth * DepthToW.x); [/code] - Makes the crosshair 2D.... Very strange....
DarkStarSword said:Yep, just copy + paste the definition from any other shader that uses it and make sure it's set to register(b2):

cbuffer SceneBuffer : register(b2)
{
row_major float4x4 View : packoffset(c0);
row_major float4x4 ScreenMatrix : packoffset(c4);
float2 DepthExportScale : packoffset(c8);
float2 __padding0 : packoffset(c8.z);
float4 FogParams : packoffset(c9);
float3 __CameraPosition : packoffset(c10);
float __padding12 : packoffset(c10.w);
float3 CameraDirection : packoffset(c11);
float __padding9 : packoffset(c11.w);
float3 DepthFactors : packoffset(c12);
float __padding10 : packoffset(c12.w);
float3 ShadowDepthBiasAndLightType : packoffset(c13);
float __padding11 : packoffset(c13.w);
float4 SubframeViewport : packoffset(c14);
row_major float3x4 DepthToWorld : packoffset(c15);
float4 DepthToView : packoffset(c18);
float4 OneOverDepthToView : packoffset(c19);
float4 DepthToW : packoffset(c20);
float4 ClipPlane : packoffset(c21);
float2 ViewportDepthScaleOffset : packoffset(c22);
float2 __padding1 : packoffset(c22.z);
float2 ColorDOFDepthScaleOffset : packoffset(c23);
float2 __padding2 : packoffset(c23.z);
float4 TimeVector : packoffset(c24);
float4 FogParams2 : packoffset(c25);
float4 FogParams3 : packoffset(c26);
float3 GlobalAmbient : packoffset(c27);
float __padding8 : packoffset(c27.w);
float4 GlobalParams[16] : packoffset(c28);
float4 ViewToFogH : packoffset(c44);
float4 ScreenExtents : packoffset(c45);
float2 ScreenResolution : packoffset(c46);
float2 __padding3 : packoffset(c46.z);
float4 PSSMToMap1Lin : packoffset(c47);
float4 PSSMToMap1Const : packoffset(c48);
float4 PSSMToMap2Lin : packoffset(c49);
float4 PSSMToMap2Const : packoffset(c50);
float4 PSSMToMap3Lin : packoffset(c51);
float4 PSSMToMap3Const : packoffset(c52);
float4 PSSMDistances : packoffset(c53);
row_major float4x4 WorldToPSSM0 : packoffset(c54);
row_major float4x4 PrevViewProject : packoffset(c58);
row_major float4x4 PrevWorld : packoffset(c62);
row_major float4x4 ViewT : packoffset(c66);
float4 PSSMExtents : packoffset(c70);
float4 ShadowAtlasResolution : packoffset(c71);
float4 UnitRimData[3] : packoffset(c72);
float3 __CameraPositionForCorrection : packoffset(c75);
float __padding7 : packoffset(c75.w);
row_major float4x4 CameraViewProject : packoffset(c76);
float4 BackBufferResolution : packoffset(c80);
row_major float4x4 InverseProjection : packoffset(c81);
float4 StereoOffset : packoffset(c85);
row_major float4x4 Projection : packoffset(c86);
row_major float4x4 ViewInv : packoffset(c90);
float4 ColorSSAO : packoffset(c94);
float4 GlobalFogColor : packoffset(c95);
float4 VolumetricLightGlobalParams : packoffset(c96);
float4 SnowParams01 : packoffset(c97);
float4 SnowParams02 : packoffset(c98);
float4 SnowParams03 : packoffset(c99);
int SSREnabled : packoffset(c100);
int __padding4 : packoffset(c100.y);
int __padding5 : packoffset(c100.z);
int __padding6 : packoffset(c100.w);
}

I usually stick the definitions in crosshair.hlsl so I don't have to worry about defining them in every shader that included it.

Then add the scaling to world_z_from_depth_buffer:

float world_z_from_depth_buffer(float x, float y)
{
uint width, height;
float z;

DepthBuffer.GetDimensions(width, height);

x = min(max((x / 2 + 0.5) * width, 0), width - 1);
y = min(max((-y / 2 + 0.5) * height, 0), height - 1);
z = DepthBuffer.Load(int3(x, y, 0));

return 1 / (z * DepthToW.x + DepthToW.y);
}

I'm still on the official build right now so I can't test this (and don't want to delay the Far Cry Primal download to switch builds).


Something funky is happening there:( I did just that but I wanted to double check... If I do that the whole crosshair disappears... both in 2D and 3D...weird...
I tried to divide the value to a really big number and the Crosshair is still missing in 2D & 3D... (without the additional ifs)
The shader that I am using for the UI is this "b65139cd6130cd09-vs_replace.txt" just for reference;)

Now, I am even more puzzled as what is going on there:))
One thing I noticed:
float temp = 1 / (sampledDepth * DepthToW.x + DepthToW.y);

Makes the UI disappear (without the additional ifs).

BUT
float temp = 1 / (sampledDepth * DepthToW.x);

- Makes the crosshair 2D....

Very strange....

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/02/2016 12:21 AM   
Odd, might be worth dumping out the constant buffers with: [code] [ShaderOverrideCrosshair1] ;VS hash code of the HUD hash=b65139cd6130cd09 vs-t110 = ResourceDepthBuffer analyse_options = dump_cb_txt [/code] so you can see what values they are actually using there, and you could dump it from another shader that definitely uses it to compare. The values I dumped out when I was looking at their projection matrix earlier (from a compute shader on the current build of the game) were: [code] cb0[20].x: -0.20408155 cb0[20].y: 0.200000003 [/code] Plotting W with respect to Z between 0 and 1 with that formula looks about right for a depth buffer (edit: although this game needs a really high convergence as nothing starts until about w=64, suggesting that they have poor utilisation of the depth buffer if this is correct because just about everything will be between 0.9 and 1.0): [url]http://www.wolframalpha.com/input/?i=plot+w+%3D+1%2F(z+*+-0.20408155+%2B+0.200000003)+between+0+and+1[/url] If it turns out that the buffer is not actually bound you can copy it from other shaders in the exact same way you copied the depth buffer, but if it wasn't bound I would expect the *DepthToW.x to result in a divide by 0 removing the crosshair altogether, but the fact that leaves it at screen depth suggests that there is some value there. I'm switching back to the old build so I can look at this.
Odd, might be worth dumping out the constant buffers with:
[ShaderOverrideCrosshair1]
;VS hash code of the HUD
hash=b65139cd6130cd09
vs-t110 = ResourceDepthBuffer
analyse_options = dump_cb_txt

so you can see what values they are actually using there, and you could dump it from another shader that definitely uses it to compare. The values I dumped out when I was looking at their projection matrix earlier (from a compute shader on the current build of the game) were:

cb0[20].x: -0.20408155
cb0[20].y: 0.200000003

Plotting W with respect to Z between 0 and 1 with that formula looks about right for a depth buffer (edit: although this game needs a really high convergence as nothing starts until about w=64, suggesting that they have poor utilisation of the depth buffer if this is correct because just about everything will be between 0.9 and 1.0):
http://www.wolframalpha.com/input/?i=plot+w+%3D+1%2F(z+*+-0.20408155+%2B+0.200000003)+between+0+and+1

If it turns out that the buffer is not actually bound you can copy it from other shaders in the exact same way you copied the depth buffer, but if it wasn't bound I would expect the *DepthToW.x to result in a divide by 0 removing the crosshair altogether, but the fact that leaves it at screen depth suggests that there is some value there.


I'm switching back to the old build so I can look at this.

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/02/2016 12:55 AM   
[quote="DarkStarSword"]Odd, might be worth dumping out the constant buffers with: [code] [ShaderOverrideCrosshair1] ;VS hash code of the HUD hash=b65139cd6130cd09 vs-t110 = ResourceDepthBuffer analyse_options = dump_cb_txt [/code] so you can see what values they are actually using there, and you could dump it from another shader that definitely uses it to compare. The values I dumped out when I was looking at their projection matrix earlier (from a compute shader on the current build of the game) were: [code] cb0[20].x: -0.20408155 cb0[20].y: 0.200000003 [/code] Plotting W with respect to Z between 0 and 1 with that formula looks about right for a depth buffer: [url]http://www.wolframalpha.com/input/?i=plot+w+%3D+1%2F(z+*+-0.20408155+%2B+0.200000003)+between+0+and+1[/url] If it turns out that the buffer is not actually bound you can copy it from other shaders in the exact same way you copied the depth buffer, but if it wasn't bound I would expect the *DepthToW.x to result in a divide by 0 removing the crosshair altogether, but the fact that leaves it at screen depth suggests that there is some value there. [/quote] Yeah, I'll dump the buffers and see what is there... Definitely both DepthToW.x and DepthToW. have values otherwise it wouldn't explain why it would go off-screen. It is possible for DepthToW.x to be zero which explains why the crosshair is 2D when I remove "+ DepthToW.y"... But still... I wonder if it has something to do with having Surround enabled in Windows...Hm... Seen that before where things didn't scale properly cause windows used a different resolution than the game.... One way to find out;)
DarkStarSword said:Odd, might be worth dumping out the constant buffers with:
[ShaderOverrideCrosshair1]
;VS hash code of the HUD
hash=b65139cd6130cd09
vs-t110 = ResourceDepthBuffer
analyse_options = dump_cb_txt

so you can see what values they are actually using there, and you could dump it from another shader that definitely uses it to compare. The values I dumped out when I was looking at their projection matrix earlier (from a compute shader on the current build of the game) were:

cb0[20].x: -0.20408155
cb0[20].y: 0.200000003

Plotting W with respect to Z between 0 and 1 with that formula looks about right for a depth buffer:
http://www.wolframalpha.com/input/?i=plot+w+%3D+1%2F(z+*+-0.20408155+%2B+0.200000003)+between+0+and+1

If it turns out that the buffer is not actually bound you can copy it from other shaders in the exact same way you copied the depth buffer, but if it wasn't bound I would expect the *DepthToW.x to result in a divide by 0 removing the crosshair altogether, but the fact that leaves it at screen depth suggests that there is some value there.


Yeah, I'll dump the buffers and see what is there... Definitely both DepthToW.x and DepthToW. have values otherwise it wouldn't explain why it would go off-screen. It is possible for DepthToW.x to be zero which explains why the crosshair is 2D when I remove "+ DepthToW.y"... But still... I wonder if it has something to do with having Surround enabled in Windows...Hm... Seen that before where things didn't scale properly cause windows used a different resolution than the game....

One way to find out;)

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/02/2016 01:05 AM   
@Helifax, DarkStarSword, Bo3B, Mike_ar69 and Flugan Hmmm, lets see, use the official patch with no convergence and no top and bottom support and get 720p and broken effects. Or, use the fix you and everyone put so much effort into and get 1080p TB with everything that we could ever want fixed (oh and with convergence I pretty much get Laura standing in the middle of my basement with my 125" screen) . Gee, which one do you think I picked. This game with your fix is what I have been waiting for since release. The result is nothing shy of spectacular. F'IN AMAZING! Crystal clear 3D plus Sony reality creation, I could not be more pleased with this fix. Settings pretty much maxed, getting a solid 50-60FPS constant. Over 26,000 shaders I saw, unbelievable work! Fired right up on my 950Pro Sammy. No issues! Can't thank you guys enough! Like a dream....
@Helifax, DarkStarSword, Bo3B, Mike_ar69 and Flugan

Hmmm, lets see, use the official patch with no convergence and no top and bottom support and get 720p and broken effects. Or, use the fix you and everyone put so much effort into and get 1080p TB with everything that we could ever want fixed (oh and with convergence I pretty much get Laura standing in the middle of my basement with my 125" screen) . Gee, which one do you think I picked.

This game with your fix is what I have been waiting for since release. The result is nothing shy of spectacular. F'IN AMAZING!

Crystal clear 3D plus Sony reality creation, I could not be more pleased with this fix. Settings pretty much maxed, getting a solid 50-60FPS constant.

Over 26,000 shaders I saw, unbelievable work! Fired right up on my 950Pro Sammy. No issues!

Can't thank you guys enough!

Like a dream....

Intel 7700k @ 4.2Ghz / 32GB @ 3200
Asus Z270 / 2 x Evga 1070
4 x Samsung 840 Raid 0
4 x Samsung 850 Pro Raid 0
Samsung 950 Pro
Epson 5040UB 3DTVPlay

Posted 03/02/2016 01:28 AM   
Great news, getting that stereo 3D option from them should mean even Windows Store users will be able to play in 3D. Thanks Helifax for your major time and effort to release a insider 3D vision fix.
Great news, getting that stereo 3D option from them should mean even Windows Store users will be able to play in 3D.

Thanks Helifax for your major time and effort to release a insider 3D vision fix.

3D Vision/TRIDEF User
SHIELD portable/tablet/tv

Posted 03/02/2016 01:45 AM   
I, for one, think that it is fantastic that we have dedicated and capable individuals in our community. I will definitely treat you to a drink. Thanks, as always, for all the hard work!
I, for one, think that it is fantastic that we have dedicated and capable individuals in our community. I will definitely treat you to a drink. Thanks, as always, for all the hard work!

Posted 03/02/2016 02:10 AM   
  35 / 41    
Scroll To Top