Mad Max 3D Vision
  7 / 27    
I still can't use the 3DMigoto wrapper with the game... It crashes instantly. EDIT: hunting=1 gives a crash hunting=2 seems to work;))
I still can't use the 3DMigoto wrapper with the game... It crashes instantly.

EDIT:
hunting=1 gives a crash
hunting=2 seems to work;))

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)

#91
Posted 09/19/2015 11:06 AM   
[quote="DarkStarSword"][quote="bo3b"]Possibly helpful, there is a WorldViewProjMatrix in a different VertexShader, that is active in this same frame, as found in ShaderUsage.txt.[/quote] Great find :) You can use my frame analysis feature to dump the constant buffers from that shader and the shader for the shadows in the same frame, then compare them to see if the same matrix is available in any of the constant buffers the shadow shader has access to. [code] [Hunting] analyse_frame = VK_F8 analyse_options = [ShaderOverrideShaderWithWVP] hash=fd1e42ae995ff08e analyse_options = dump_cb_txt [ShaderOverrideShadows] hash=346aa0e5f6b29dc8 analyse_options = dump_cb_txt [/code] Or alternatively turn on dump_cb_txt in the global analyse_options and marvel at the large inexpensive array of redundant text files you recieve upon pressing F8 ;-) I have a work in progress to copy constant buffers from one shader to another (as well as other resources like textures, render targets, depth targets and ... vertex buffers (I have some crazy ideas I might be able to solve with these)) - I will need this to fix physical lighting (specular highlights, environment reflections) in Unity 5 games with variable FOV, but that's been a lowish priority since the effects are relatively minor and a fudge value can work. If it turns out we need it for this game as well I can bump that up on my priority list. [quote="bo3b"]Not positive I did this right of course, but I think the near value will be roughly 0.5. Based on this image: [img]http://sg.bo3b.net/max/MadMax17_85.jps[/img] The only spot I could find to clip was Max himself in some inside room/angle scenario where he fades out, then disappears, presumably at a clipping point to avoid going inside his head.[/quote] Great :) The actual clipping plane might be closer than where he fades out, but at the very least that will give us an upper bound to work with :) I used this approach to estimate the near + far clipping planes in The Witcher 3 when I was experimenting with adjusting the UI from the depth buffer, then just dialed them in until everything lined up. [quote="helifax"]I am not sure I follow exactly here, but are you saying that if we multiply Our Constants[1-4] matrix with the Inverse you posted above we might actually "inject" the stereoscopy in the Projection Matrix ?? (Sorry don't have a notepad with me to sketch up some calculations) ^_^[/quote] That's the theory. I don't know for sure if it will work yet, and even if it can work it might not be the best thing to do for this game, but maybe it will help somewhere. I actually started thinking about this approach a couple of weeks back while trying to fix that nasty screen space reflection shader in Crysis 3 and wondering if there was an easier way. The maths should be relatively straight forward - to inject the inverse variant it needs to be on the left of the multiplication (the forward variant would be on the right): [code] Substitute some variables: e = -(sep*conv) / (q*near) f = -sep + (sep*conv)/near [ 1, 0, 0, 0 ] [ ax, ay, az, aw ] [ 0, 1, 0, 0 ] x [ bx, by, bz, bw ] [ e, 0, 1, 0 ] [ cx, cy, cz, cw ] [ f, 0, 0, 1 ] [ dx, dy, dz, dw ] [ ax, ay, az, aw ] = [ bx, by, bz, bw ] [ (e * ax) + cx, (e * ay) + cy, (e * az) + cz, (e * aw) + cw ] [ (f * ax) + dx, (f * ay) + dy, (f * az) + dz, (f * aw) + dw ] [/code] [/quote] Tried the matrix multiplication. Unfortunately it ONLY works when convergence is 0.0 the moment you increase it, everything breaks:( [s]I wonder if this doesn't happen because the Constants[1-4] is an inverse VP matrix... Hmm[/s] After further investigation I noticed this happens cause the .z term is missing. Normally the math is like this window.xy = pos.xy*scale.zw + scale.xy (where Constants[0] = scale.xyzw); window.z = sampler(Depth, pos.xy).x -> This is missing in the vertex shader for the shadows window.w = 1 r0.x = dot4(window, Constants[1]); r0.y = dot4(window, Constants[2]); r0.z = dot4(window, Constants[3]); r0.w = dot4(window, Constants[4]); Now comparing this to our shader we see the following (vertex shader): r0.xyzw = Constants[2].xyzw * v0.yyyy; r0.xyzw = v0.xxxx * Constants[1].xyzw + r0.xyzw; r0.xyzw = Constants[4].xyzw + r0.xyzw; r0.xyz = r0.xyz / r0.www; Note the missing Constants[3] term here, that most likely contain the .z component... This is why if we multiply this with the above formula everything works at convergence = 0.0; (I still would like to understand the logic of those multiplications there...) I've looked in the PS but I don't really understand it nor do I see where we could add the stereo correction there...
DarkStarSword said:
bo3b said:Possibly helpful, there is a WorldViewProjMatrix in a different VertexShader, that is active in this same frame, as found in ShaderUsage.txt.

Great find :)

You can use my frame analysis feature to dump the constant buffers from that shader and the shader for the shadows in the same frame, then compare them to see if the same matrix is available in any of the constant buffers the shadow shader has access to.

[Hunting]
analyse_frame = VK_F8
analyse_options =

[ShaderOverrideShaderWithWVP]
hash=fd1e42ae995ff08e
analyse_options = dump_cb_txt

[ShaderOverrideShadows]
hash=346aa0e5f6b29dc8
analyse_options = dump_cb_txt


Or alternatively turn on dump_cb_txt in the global analyse_options and marvel at the large inexpensive array of redundant text files you recieve upon pressing F8 ;-)

I have a work in progress to copy constant buffers from one shader to another (as well as other resources like textures, render targets, depth targets and ... vertex buffers (I have some crazy ideas I might be able to solve with these)) - I will need this to fix physical lighting (specular highlights, environment reflections) in Unity 5 games with variable FOV, but that's been a lowish priority since the effects are relatively minor and a fudge value can work. If it turns out we need it for this game as well I can bump that up on my priority list.

bo3b said:Not positive I did this right of course, but I think the near value will be roughly 0.5.

Based on this image:

Image

The only spot I could find to clip was Max himself in some inside room/angle scenario where he fades out, then disappears, presumably at a clipping point to avoid going inside his head.

Great :)

The actual clipping plane might be closer than where he fades out, but at the very least that will give us an upper bound to work with :)

I used this approach to estimate the near + far clipping planes in The Witcher 3 when I was experimenting with adjusting the UI from the depth buffer, then just dialed them in until everything lined up.


helifax said:I am not sure I follow exactly here, but are you saying that if we multiply Our Constants[1-4] matrix with the Inverse you posted above we might actually "inject" the stereoscopy in the Projection Matrix ?? (Sorry don't have a notepad with me to sketch up some calculations) ^_^

That's the theory. I don't know for sure if it will work yet, and even if it can work it might not be the best thing to do for this game, but maybe it will help somewhere. I actually started thinking about this approach a couple of weeks back while trying to fix that nasty screen space reflection shader in Crysis 3 and wondering if there was an easier way.

The maths should be relatively straight forward - to inject the inverse variant it needs to be on the left of the multiplication (the forward variant would be on the right):

Substitute some variables:
e = -(sep*conv) / (q*near)
f = -sep + (sep*conv)/near

[ 1, 0, 0, 0 ] [ ax, ay, az, aw ]
[ 0, 1, 0, 0 ] x [ bx, by, bz, bw ]
[ e, 0, 1, 0 ] [ cx, cy, cz, cw ]
[ f, 0, 0, 1 ] [ dx, dy, dz, dw ]

[ ax, ay, az, aw ]
= [ bx, by, bz, bw ]
[ (e * ax) + cx, (e * ay) + cy, (e * az) + cz, (e * aw) + cw ]
[ (f * ax) + dx, (f * ay) + dy, (f * az) + dz, (f * aw) + dw ]




Tried the matrix multiplication. Unfortunately it ONLY works when convergence is 0.0 the moment you increase it, everything breaks:(

I wonder if this doesn't happen because the Constants[1-4] is an inverse VP matrix... Hmm
After further investigation I noticed this happens cause the .z term is missing.

Normally the math is like this

window.xy = pos.xy*scale.zw + scale.xy (where Constants[0] = scale.xyzw);
window.z = sampler(Depth, pos.xy).x -> This is missing in the vertex shader for the shadows
window.w = 1

r0.x = dot4(window, Constants[1]);
r0.y = dot4(window, Constants[2]);
r0.z = dot4(window, Constants[3]);
r0.w = dot4(window, Constants[4]);

Now comparing this to our shader we see the following (vertex shader):

r0.xyzw = Constants[2].xyzw * v0.yyyy;
r0.xyzw = v0.xxxx * Constants[1].xyzw + r0.xyzw;
r0.xyzw = Constants[4].xyzw + r0.xyzw;
r0.xyz = r0.xyz / r0.www;

Note the missing Constants[3] term here, that most likely contain the .z component...
This is why if we multiply this with the above formula everything works at convergence = 0.0;
(I still would like to understand the logic of those multiplications there...)

I've looked in the PS but I don't really understand it nor do I see where we could add the stereo correction there...

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)

#92
Posted 09/19/2015 01:16 PM   
Edit: double post.
Edit: double post.

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)

#93
Posted 09/22/2015 04:23 PM   
[quote="helifax"]Tried the matrix multiplication. Unfortunately it ONLY works when convergence is 0.0 the moment you increase it, everything breaks:([/quote] Oh well, it was worth a shot. I'm still hopeful that this idea might help somewhere, like perhaps the screen space reflection shaders in Witcher 3 and Crysis 3 which were very difficult to crack and we currently only approximate. [quote][s]I wonder if this doesn't happen because the Constants[1-4] is an inverse VP matrix... Hmm[/s] After further investigation I noticed this happens cause the .z term is missing. Normally the math is like this window.xy = pos.xy*scale.zw + scale.xy (where Constants[0] = scale.xyzw); window.z = sampler(Depth, pos.xy).x -> This is missing in the vertex shader for the shadows window.w = 1 r0.x = dot4(window, Constants[1]); r0.y = dot4(window, Constants[2]); r0.z = dot4(window, Constants[3]); r0.w = dot4(window, Constants[4]); Now comparing this to our shader we see the following (vertex shader): r0.xyzw = Constants[2].xyzw * v0.yyyy; r0.xyzw = v0.xxxx * Constants[1].xyzw + r0.xyzw; r0.xyzw = Constants[4].xyzw + r0.xyzw; r0.xyz = r0.xyz / r0.www; Note the missing Constants[3] term here, that most likely contain the .z component... This is why if we multiply this with the above formula everything works at convergence = 0.0; (I still would like to understand the logic of those multiplications there...)[/quote] That's an interesting theory. The reason Z is missing here is because this matrix multiply is going from 2D screen coordinates to 3D world coordinates at a fixed depth from the camera, whereas if the multiplication included Z that would suggest that it was going from 3D clip space coordinates into 3D view/world space coordinates. In this case we don't get the depth value until pixel shader samples the depth buffer. I think the reason it probably works at convergence = 0, is because at that point *everything* is at infinity, which can make things line up (provided separation has been added) in a similar way to how things will line up if everything is at screen depth. [quote]I've looked in the PS but I don't really understand it nor do I see where we could add the stereo correction there...[/quote] Let's have a look: [code] // Sample depth buffer for this pixel: r0.x = Depth.Sample(SamplerStateRegular_s, v1.xy).x; // irrelevant r0.y = 0 < r0.x; // Scale value read from depth buffer to the world scale. // From frame analysis we know the values of these constants // Constants[0].x = 9.9999752 // Constants[0].y = 2.49999994e-005 // So this is doing r0.x = 1/(Z_buffer[x,y] * 9.9999752 + 0.000025) r0.x = r0.x * Constants[0].x + Constants[0].y; r0.x = 1 / r0.x; // v2 is the point on the far clipping plane relative to the camera in 3D // view-space coordinates. This scales it based on the depth buffer so r1 will // be the stereo corrected view-space coordinates, relative to the camera. r1.xyz = v2.xyz * r0.xxx; // This is similar to the above line, but it is ALSO adding a 3 dimensional // coordinate, which we know from frame analysis is: // Globals[4].x: 1820.52966 // Globals[4].y: 482.899902 // Globals[4].z: 6202.82471 // Which is almost certainly the camera position in the world. // So, r2 will be the world coordinates of this pixel. r2.xyz = r0.xxx * v2.xyz + Globals[4].xyz; // We don't know exactly what this, but it is transforming the view coordinate // into something else. From frame analysis, this matrix is: // Constants[1]: -0.00733394176 | -0.0118318712 | 0.000754032517 | 0 // Constants[2]: 0 | -0.039895393 | -0.000230774851 | 0 // Constants[3]: 0.041016154 | -0.00211561192 | 0.000134825677 | 0 // Constants[4]: 0.529752791 | 0.488492578 | 0.572143137 | 1 // - Based on the 4th column, this matrix does *not* include a projection // - Based on the 4th row, this matrix *does* include a translation // This matrix includes some rotations. IMO this is likely a transformation // of view-space coordinates to directional lighting coordinates. r3.xyz = Constants[1].xyz * r1.xxx + Constants[4].xyz; r1.xyw = Constants[2].xyz * r1.yyy + r3.xyz; r1.xyz = Constants[3].xyz * r1.zzz + r1.xyw; // This appears to be performing some kind of scaling: // r3.xyz = float3(r1.xy * 0.199999973, r1.z) + // float3(0.601756692, 0.323284715, 0.0245652795) r3.x = Constants[21].w; r3.z = 1; r3.xyz = r1.xyz * r3.xxz + Constants[21].xyz; // This is similar - cascaded shadows? // r4.xyz = float3(r1.xy * 0.0149999959, r1.z) + // float3(0.687856495, 0.417885959, 0.317040324) r4.x = Constants[22].w; r4.z = 1; r4.xyz = r1.xyz * r4.xxz + Constants[22].xyz; [/code] DHR indicated that the closest he has got was by applying a stereo correction to r1 before the multiplication by the Constants[1:4] matrix. I believe he is correct that is probably where we need to insert an (un)correction around that point. IMO r1.xyz needs a world-space uncoorection. We should be able to pass the Constants[1:4] matrix from the vertex shader through to the pixel shader and use that and it's inverse to achieve this. r2.xyz should be modified to include the same correction. Assuming we already correct r1.xyz we could simply change it to: [code] r2.xyz = r1.xyz + Globals[4].xyz; [/code] My guess is that r2.xyz might be pretty subtle - r1.xyz will likely control the placement of the shadows, and r2.xyz might fix some subtle shading. This is all just a theory though - the devs haven't responded to me yet, and I'm not convinced I'd get around to playing the game any time soon so haven't bought it myself.
helifax said:Tried the matrix multiplication. Unfortunately it ONLY works when convergence is 0.0 the moment you increase it, everything breaks:(


Oh well, it was worth a shot. I'm still hopeful that this idea might help somewhere, like perhaps the screen space reflection shaders in Witcher 3 and Crysis 3 which were very difficult to crack and we currently only approximate.

I wonder if this doesn't happen because the Constants[1-4] is an inverse VP matrix... Hmm
After further investigation I noticed this happens cause the .z term is missing.

Normally the math is like this

window.xy = pos.xy*scale.zw + scale.xy (where Constants[0] = scale.xyzw);
window.z = sampler(Depth, pos.xy).x -> This is missing in the vertex shader for the shadows
window.w = 1

r0.x = dot4(window, Constants[1]);
r0.y = dot4(window, Constants[2]);
r0.z = dot4(window, Constants[3]);
r0.w = dot4(window, Constants[4]);

Now comparing this to our shader we see the following (vertex shader):

r0.xyzw = Constants[2].xyzw * v0.yyyy;
r0.xyzw = v0.xxxx * Constants[1].xyzw + r0.xyzw;
r0.xyzw = Constants[4].xyzw + r0.xyzw;
r0.xyz = r0.xyz / r0.www;

Note the missing Constants[3] term here, that most likely contain the .z component...
This is why if we multiply this with the above formula everything works at convergence = 0.0;
(I still would like to understand the logic of those multiplications there...)


That's an interesting theory. The reason Z is missing here is because this matrix multiply is going from 2D screen coordinates to 3D world coordinates at a fixed depth from the camera, whereas if the multiplication included Z that would suggest that it was going from 3D clip space coordinates into 3D view/world space coordinates.

In this case we don't get the depth value until pixel shader samples the depth buffer.

I think the reason it probably works at convergence = 0, is because at that point *everything* is at infinity, which can make things line up (provided separation has been added) in a similar way to how things will line up if everything is at screen depth.

I've looked in the PS but I don't really understand it nor do I see where we could add the stereo correction there...


Let's have a look:
// Sample depth buffer for this pixel:
r0.x = Depth.Sample(SamplerStateRegular_s, v1.xy).x;

// irrelevant
r0.y = 0 < r0.x;

// Scale value read from depth buffer to the world scale.
// From frame analysis we know the values of these constants
// Constants[0].x = 9.9999752
// Constants[0].y = 2.49999994e-005
// So this is doing r0.x = 1/(Z_buffer[x,y] * 9.9999752 + 0.000025)
r0.x = r0.x * Constants[0].x + Constants[0].y;
r0.x = 1 / r0.x;

// v2 is the point on the far clipping plane relative to the camera in 3D
// view-space coordinates. This scales it based on the depth buffer so r1 will
// be the stereo corrected view-space coordinates, relative to the camera.
r1.xyz = v2.xyz * r0.xxx;

// This is similar to the above line, but it is ALSO adding a 3 dimensional
// coordinate, which we know from frame analysis is:
// Globals[4].x: 1820.52966
// Globals[4].y: 482.899902
// Globals[4].z: 6202.82471
// Which is almost certainly the camera position in the world.
// So, r2 will be the world coordinates of this pixel.
r2.xyz = r0.xxx * v2.xyz + Globals[4].xyz;

// We don't know exactly what this, but it is transforming the view coordinate
// into something else. From frame analysis, this matrix is:
// Constants[1]: -0.00733394176 | -0.0118318712 | 0.000754032517 | 0
// Constants[2]: 0 | -0.039895393 | -0.000230774851 | 0
// Constants[3]: 0.041016154 | -0.00211561192 | 0.000134825677 | 0
// Constants[4]: 0.529752791 | 0.488492578 | 0.572143137 | 1
// - Based on the 4th column, this matrix does *not* include a projection
// - Based on the 4th row, this matrix *does* include a translation
// This matrix includes some rotations. IMO this is likely a transformation
// of view-space coordinates to directional lighting coordinates.
r3.xyz = Constants[1].xyz * r1.xxx + Constants[4].xyz;
r1.xyw = Constants[2].xyz * r1.yyy + r3.xyz;
r1.xyz = Constants[3].xyz * r1.zzz + r1.xyw;

// This appears to be performing some kind of scaling:
// r3.xyz = float3(r1.xy * 0.199999973, r1.z) +
// float3(0.601756692, 0.323284715, 0.0245652795)
r3.x = Constants[21].w;
r3.z = 1;
r3.xyz = r1.xyz * r3.xxz + Constants[21].xyz;

// This is similar - cascaded shadows?
// r4.xyz = float3(r1.xy * 0.0149999959, r1.z) +
// float3(0.687856495, 0.417885959, 0.317040324)
r4.x = Constants[22].w;
r4.z = 1;
r4.xyz = r1.xyz * r4.xxz + Constants[22].xyz;


DHR indicated that the closest he has got was by applying a stereo correction to r1 before the multiplication by the Constants[1:4] matrix. I believe he is correct that is probably where we need to insert an (un)correction around that point.

IMO r1.xyz needs a world-space uncoorection. We should be able to pass the Constants[1:4] matrix from the vertex shader through to the pixel shader and use that and it's inverse to achieve this.

r2.xyz should be modified to include the same correction. Assuming we already correct r1.xyz we could simply change it to:
r2.xyz = r1.xyz + Globals[4].xyz;

My guess is that r2.xyz might be pretty subtle - r1.xyz will likely control the placement of the shadows, and r2.xyz might fix some subtle shading.


This is all just a theory though - the devs haven't responded to me yet, and I'm not convinced I'd get around to playing the game any time soon so haven't bought it myself.

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

#94
Posted 09/23/2015 01:12 AM   
[quote="DarkStarSword"]the devs haven't responded to me yet[/quote] Did you contact the Sweden branch of Avalanche Studios in Stockholm? The American branch is working on just Cause 3.
DarkStarSword said:the devs haven't responded to me yet


Did you contact the Sweden branch of Avalanche Studios in Stockholm? The American branch is working on just Cause 3.

#95
Posted 09/23/2015 02:11 AM   
I tried email (info@avalanchestudios.se) and twitter. In the past I've had some luck contacting a specific employee (e.g. CryTek's brand manager, who followed me on twitter after I posted about fixing Lichdom) rather than the generic contact us page - I haven't tried that here yet.
I tried email (info@avalanchestudios.se) and twitter. In the past I've had some luck contacting a specific employee (e.g. CryTek's brand manager, who followed me on twitter after I posted about fixing Lichdom) rather than the generic contact us page - I haven't tried that here yet.

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

#96
Posted 09/23/2015 06:00 AM   
This week i continue to look at this game.....i will pass those contants[1:4] to PS and try. I've already try passing some values from VS to PS, but i clearly made a mistake because i took constants[0:3]. Never made myself an inverse one, so i will do my best with that.
This week i continue to look at this game.....i will pass those contants[1:4] to PS and try. I've already try passing some values from VS to PS, but i clearly made a mistake because i took constants[0:3].

Never made myself an inverse one, so i will do my best with that.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#97
Posted 09/23/2015 11:10 AM   
Don't bother reading the theory on inversing matrices - it drags on and makes the whole thing seem very complicated and confusing, but for our purposes we don't need to know or care about any of that. All we care about is the HLSL code to inverse a 4x4 matrix, which you can just copy from one of the other fixes like Lichdom or Witcher 3. All you will have to do is change the inputs & outputs.
Don't bother reading the theory on inversing matrices - it drags on and makes the whole thing seem very complicated and confusing, but for our purposes we don't need to know or care about any of that. All we care about is the HLSL code to inverse a 4x4 matrix, which you can just copy from one of the other fixes like Lichdom or Witcher 3. All you will have to do is change the inputs & outputs.

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

#98
Posted 09/23/2015 11:40 AM   
i just look The Witcher 3 fix for shadows...and i think the pattern is similar to Mad Max. I will try next: 1) Only in the PS, i will try to apply similar fix code used in The Withcher 3 with the inverse of Constants[1:4] present in th PS or other Constants. 2) Get Constant[1:4] from the VS and the inverse to use in the PS.
i just look The Witcher 3 fix for shadows...and i think the pattern is similar to Mad Max. I will try next:

1) Only in the PS, i will try to apply similar fix code used in The Withcher 3 with the inverse of Constants[1:4] present in th PS or other Constants.

2) Get Constant[1:4] from the VS and the inverse to use in the PS.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#99
Posted 09/23/2015 03:33 PM   
I thinks the Constants[1-4] from VS are the same as Constants[1-4] from PS. I might be wrong though...but based on my testing with injection the stereo matrix in the constants[1-4] "Proj" matrix (which is not actually a proj mat) I got everything to line up properly at infinity... Now, I might be wrong;)) but this is a good test as well;)) Looking forward to see your results!
I thinks the Constants[1-4] from VS are the same as Constants[1-4] from PS. I might be wrong though...but based on my testing with injection the stereo matrix in the constants[1-4] "Proj" matrix (which is not actually a proj mat) I got everything to line up properly at infinity...
Now, I might be wrong;)) but this is a good test as well;))
Looking forward to see your results!

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 09/23/2015 03:44 PM   
[quote="helifax"]I thinks the Constants[1-4] from VS are the same as Constants[1-4] from PS. I might be wrong though...[/quote] No, they're different matrices as the frame analysis shows. Constants[1:4] in the vertex shader were this: [code] 000936-vs-cb1-vs=346aa0e5f6b29dc8-ps=d09b2165321f05cf.txt cbX[1].x: 0.752560079 cbX[1].y: 0.0156586282 cbX[1].z: -0.696669042 cbX[1].w: 0 cbX[2].x: 0.0025248453 cbX[2].y: 0.576704204 cbX[2].z: 0.0156896524 cbX[2].w: 0 cbX[3].x: 0 cbX[3].y: 0 cbX[3].z: 0 cbX[3].w: 9.99997425 cbX[4].x: -0.679409742 cbX[4].y: 0.0229271911 cbX[4].z: -0.733400822 cbX[4].w: 2.49999994e-005 [/code] And in the exact same draw call, Constants[1:4] in the pixel shader were this: [code] 000936-ps-cb1-vs=346aa0e5f6b29dc8-ps=d09b2165321f05cf.txt cbX[1].x: -0.00733394176 cbX[1].y: -0.0118318712 cbX[1].z: 0.000754032517 cbX[1].w: 0 cbX[2].x: 0 cbX[2].y: -0.039895393 cbX[2].z: -0.000230774851 cbX[2].w: 0 cbX[3].x: 0.041016154 cbX[3].y: -0.00211561192 cbX[3].z: 0.000134825677 cbX[3].w: 0 cbX[4].x: 0.529752791 cbX[4].y: 0.488492578 cbX[4].z: 0.572143137 cbX[4].w: 1 [/code] Quite different as you can see.
helifax said:I thinks the Constants[1-4] from VS are the same as Constants[1-4] from PS. I might be wrong though...

No, they're different matrices as the frame analysis shows.

Constants[1:4] in the vertex shader were this:
000936-vs-cb1-vs=346aa0e5f6b29dc8-ps=d09b2165321f05cf.txt
cbX[1].x: 0.752560079
cbX[1].y: 0.0156586282
cbX[1].z: -0.696669042
cbX[1].w: 0
cbX[2].x: 0.0025248453
cbX[2].y: 0.576704204
cbX[2].z: 0.0156896524
cbX[2].w: 0
cbX[3].x: 0
cbX[3].y: 0
cbX[3].z: 0
cbX[3].w: 9.99997425
cbX[4].x: -0.679409742
cbX[4].y: 0.0229271911
cbX[4].z: -0.733400822
cbX[4].w: 2.49999994e-005


And in the exact same draw call, Constants[1:4] in the pixel shader were this:
000936-ps-cb1-vs=346aa0e5f6b29dc8-ps=d09b2165321f05cf.txt
cbX[1].x: -0.00733394176
cbX[1].y: -0.0118318712
cbX[1].z: 0.000754032517
cbX[1].w: 0
cbX[2].x: 0
cbX[2].y: -0.039895393
cbX[2].z: -0.000230774851
cbX[2].w: 0
cbX[3].x: 0.041016154
cbX[3].y: -0.00211561192
cbX[3].z: 0.000134825677
cbX[3].w: 0
cbX[4].x: 0.529752791
cbX[4].y: 0.488492578
cbX[4].z: 0.572143137
cbX[4].w: 1


Quite different as you can see.

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 09/23/2015 04:08 PM   
Yeah interesting;)) Defo different;)) My bad;)) Now I am interested to see how I can pass a matrix from a VS in a PS using 3DMigoto...hmm;)) I know you guys said it before, but I never tried/used it ^_^
Yeah interesting;)) Defo different;)) My bad;))
Now I am interested to see how I can pass a matrix from a VS in a PS using 3DMigoto...hmm;)) I know you guys said it before, but I never tried/used it ^_^

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 09/23/2015 05:03 PM   
I do a quick look at alternative 1, but not good results...i get the entire scene with black shadows, something similar to a very cloudy day. So i pass the Constants[1:4] from VS to PS (i do the inverse in the PS) and used there with The Witcher 3 approach, but also no luck with that. It's seems to rotate the entire shadows. I attach both VS and PS. I don't get any error o warning, so the code is good. This line i multiply and divide using Constants, Vx, Globals and the results are almost the same. Also try to multiply by a fix number, but nothing. [code]r24.x -= stereo.x * (r24.z - stereo.y); [/code] [img]https://forums.geforce.com/cmd/default/download-comment-attachment/66076/[/img]
I do a quick look at alternative 1, but not good results...i get the entire scene with black shadows, something similar to a very cloudy day.


So i pass the Constants[1:4] from VS to PS (i do the inverse in the PS) and used there with The Witcher 3 approach, but also no luck with that. It's seems to rotate the entire shadows. I attach both VS and PS.
I don't get any error o warning, so the code is good.

This line i multiply and divide using Constants, Vx, Globals and the results are almost the same. Also try to multiply by a fix number, but nothing.
r24.x -= stereo.x * (r24.z - stereo.y);


Image
Attachments

ShaderFixes.zip.jpg

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

Posted 09/23/2015 06:10 PM   
Hey everyone, are there any updates or fixes? As I read all the posts here, nothing really seems to work correctly. Is there still anyone working on it?
Hey everyone,

are there any updates or fixes? As I read all the posts here, nothing really seems to work correctly. Is there still anyone working on it?

Posted 09/27/2015 08:45 AM   
I'm downloading the game now (thanks Zappologist!), so I'll be able to take a closer look at it tomorrow. Still no promises of course - this has already stumped some of our top shaderhackers, but I'll give it a shot.
I'm downloading the game now (thanks Zappologist!), so I'll be able to take a closer look at it tomorrow.

Still no promises of course - this has already stumped some of our top shaderhackers, but I'll give it a shot.

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 09/30/2015 09:40 AM   
  7 / 27    
Scroll To Top