The Witcher 3: Wild Hunt
  117 / 152    
I've fixed the clipping issue on the global illumination shading, but the light shafts are working fine for me. The save SKAUT posted is in the DLC which I don't have - are the light shafts different there? Were there some decal issues somewhere?
I've fixed the clipping issue on the global illumination shading, but the light shafts are working fine for me. The save SKAUT posted is in the DLC which I don't have - are the light shafts different there?

Were there some decal issues somewhere?

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 01/16/2016 08:13 AM   
[quote="DarkStarSword"]I've fixed the clipping issue on the global illumination shading, but the light shafts are working fine for me. The save SKAUT posted is in the DLC which I don't have - are the light shafts different there? Were there some decal issues somewhere?[/quote] The light shafts are working perfectly fine for me as well in the DLC as well;) I am going to try and hunt the decal shaders or give you a save exactly to show the issue;) I found a couple of them last night but when I tried to correct them nothing happens;)
DarkStarSword said:I've fixed the clipping issue on the global illumination shading, but the light shafts are working fine for me. The save SKAUT posted is in the DLC which I don't have - are the light shafts different there?

Were there some decal issues somewhere?


The light shafts are working perfectly fine for me as well in the DLC as well;)

I am going to try and hunt the decal shaders or give you a save exactly to show the issue;)
I found a couple of them last night but when I tried to correct them nothing happens;)

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 01/16/2016 11:33 AM   
There's a second issue that resembles clipping on some reflections on the ground that's giving me some trouble (visible from some of the saves that biz posted, on the ground near one of the gates with two torches). Mike or Helifax - I could use a second opinion on this one - it's pixel shader fed94596a77ba6a7 (decompiler bugs on this shader are easy - just declare a "ByteAddressBuffer t21 : register(t21);" and it's just blah = t21.Load(blah) where it wants a fixup). My current working theory is that it's choosing the closest reflection probe (r8.z) to the pixel in the first while loop of the shader, and that is selecting the wrong probe in between two nearby probes in stereo. Strangely, it's vertex shader (aa66544efb385a02) causes the game to crash if StereoParams is declared (regardless of using HLSL or assembly), but I'm pretty sure the fix needs to go in the pixel shader. The GI clipping fix was just a matter of disabling one of the tests in that shader: https://github.com/bo3b/3Dmigoto/commit/e54ed71cead64c85cc7bc3f373db06410735c171
There's a second issue that resembles clipping on some reflections on the ground that's giving me some trouble (visible from some of the saves that biz posted, on the ground near one of the gates with two torches). Mike or Helifax - I could use a second opinion on this one - it's pixel shader fed94596a77ba6a7 (decompiler bugs on this shader are easy - just declare a "ByteAddressBuffer t21 : register(t21);" and it's just blah = t21.Load(blah) where it wants a fixup).

My current working theory is that it's choosing the closest reflection probe (r8.z) to the pixel in the first while loop of the shader, and that is selecting the wrong probe in between two nearby probes in stereo.

Strangely, it's vertex shader (aa66544efb385a02) causes the game to crash if StereoParams is declared (regardless of using HLSL or assembly), but I'm pretty sure the fix needs to go in the pixel shader.


The GI clipping fix was just a matter of disabling one of the tests in that shader:
https://github.com/bo3b/3Dmigoto/commit/e54ed71cead64c85cc7bc3f373db06410735c171

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 01/16/2016 11:46 AM   
Right, I found one of the PS that are related to some decals that are pushed at wrong/too much into depth. (like a double depth). Turns out is already corrected...Hmmm Pictures: With it enabled(look at Geralt's feet) [img]https://forums.geforce.com/cmd/default/download-comment-attachment/67853/[/img] With the Ps disabled: [img]https://forums.geforce.com/cmd/default/download-comment-attachment/67854/[/img] The shader code is like this: [code] //Decals Texture2D<float4> t7 : register(t7); Texture2D<float4> t1 : register(t1); Texture2D<float4> t0 : register(t0); SamplerState s1_s : register(s1); SamplerState s0_s : register(s0); cbuffer cb12 : register(b12) { float4 cb12[214]; } Texture2D<float4> StereoParams : register(t125); Texture1D<float4> IniParams : register(t120); void main( float4 v0 : SV_Position0, float4 v1 : COLOR0, float2 v2 : TEXCOORD0, float3 v3 : TEXCOORD2, float4 v4 : TEXCOORD3, float4 v5 : EXTRA_DATA0, float4 v6 : EXTRA_DATA1, float4 v7 : EXTRA_DATA2, float4 v8 : EXTRA_DATA3, float4 v9 : MORE_DATA0, float4 v10 : MORE_DATA1, float4 v11 : MORE_DATA2, float4 v12 : MORE_DATA3, out float4 o0 : SV_Target0, out float4 o1 : SV_Target1) { float4 r0,r1,r2; uint4 bitmask, uiDest; float4 fDest; float4 stereo = StereoParams.Load(0); //Work out Inverse //...Variables float4 a1, a2, a3, a4; float4 b1, b2, b3, b4; float det; //...Original Matrix a1.xyzw = cb12[1].xyzw; a2.xyzw = cb12[2].xyzw; a3.xyzw = cb12[3].xyzw; a4.xyzw = cb12[4].xyzw; //...Determinant det = a1.x*(a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y)); det += a1.y*(a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.z) + a2.w*(a3.z*a4.x - a3.x*a4.z)); det += a1.z*(a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x)); det += a1.w*(a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y)); //...Inverse Matrix Elements b1.x = a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y); b1.y = a1.y*(a3.w*a4.z - a3.z*a4.w) + a1.z*(a3.y*a4.w - a3.w*a4.y) + a1.w*(a3.z*a4.y - a3.y*a4.z); b1.z = a1.y*(a2.z*a4.w - a2.w*a4.z) + a1.z*(a2.w*a4.y - a2.y*a4.w) + a1.w*(a2.y*a4.z - a2.z*a4.y); b1.w = a1.y*(a2.w*a3.z - a2.z*a3.w) + a1.z*(a2.y*a3.w - a2.w*a3.y) + a1.w*(a2.z*a3.y - a2.y*a3.z); b2.x = a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.x) + a2.w*(a3.z*a4.x - a3.x*a4.z); b2.y = a1.x*(a3.z*a4.w - a3.w*a4.z) + a1.z*(a3.w*a4.x - a3.x*a4.w) + a1.w*(a3.x*a4.z - a3.z*a4.x); b2.z = a1.x*(a2.w*a4.z - a2.z*a4.w) + a1.z*(a2.x*a4.w - a2.w*a4.x) + a1.w*(a2.z*a4.x - a2.x*a4.z); b2.w = a1.x*(a2.z*a3.w - a2.w*a3.z) + a1.z*(a2.w*a3.x - a2.x*a3.w) + a1.w*(a2.x*a3.z - a2.z*a3.x); b3.x = a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x); b3.y = a1.x*(a3.w*a4.y - a3.y*a4.w) + a1.y*(a3.x*a4.w - a3.w*a4.x) + a1.w*(a3.y*a4.x - a3.x*a4.y); b3.z = a1.x*(a2.y*a4.w - a2.w*a4.y) + a1.y*(a2.w*a4.x - a2.x*a4.w) + a1.w*(a2.x*a4.y - a2.y*a4.x); b3.w = a1.x*(a2.w*a3.y - a2.y*a3.w) + a1.y*(a2.x*a3.w - a2.w*a3.x) + a1.w*(a2.y*a3.x - a2.x*a3.y); b4.x = a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y); b4.y = a1.x*(a3.y*a4.z - a3.z*a4.y) + a1.y*(a3.z*a4.x - a3.x*a4.z) + a1.z*(a3.x*a4.y - a3.y*a4.x); b4.z = a1.x*(a2.z*a4.y - a2.y*a4.z) + a1.y*(a2.x*a4.z - a2.z*a4.x) + a1.z*(a2.y*a4.x - a2.x*a4.y); b4.w = a1.x*(a2.y*a3.z - a2.z*a3.y) + a1.y*(a2.z*a3.x - a2.x*a3.z) + a1.z*(a2.x*a3.y - a2.y*a3.x); b1.xyzw /= det; b2.xyzw /= det; b3.xyzw /= det; b4.xyzw /= det; //End Inverse //Work out Inverse //...Variables // float4 a1, a2, a3, a4; float4 d1, d2, d3, d4; // float det; //...Original Matrix a1.xyzw = cb12[210].xyzw; a2.xyzw = cb12[211].xyzw; a3.xyzw = cb12[212].xyzw; a4.xyzw = cb12[213].xyzw; //...Determinant det = a1.x*(a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y)); det += a1.y*(a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.z) + a2.w*(a3.z*a4.x - a3.x*a4.z)); det += a1.z*(a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x)); det += a1.w*(a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y)); //...Inverse Matrix Elements d1.x = a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y); d1.y = a1.y*(a3.w*a4.z - a3.z*a4.w) + a1.z*(a3.y*a4.w - a3.w*a4.y) + a1.w*(a3.z*a4.y - a3.y*a4.z); d1.z = a1.y*(a2.z*a4.w - a2.w*a4.z) + a1.z*(a2.w*a4.y - a2.y*a4.w) + a1.w*(a2.y*a4.z - a2.z*a4.y); d1.w = a1.y*(a2.w*a3.z - a2.z*a3.w) + a1.z*(a2.y*a3.w - a2.w*a3.y) + a1.w*(a2.z*a3.y - a2.y*a3.z); d2.x = a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.x) + a2.w*(a3.z*a4.x - a3.x*a4.z); d2.y = a1.x*(a3.z*a4.w - a3.w*a4.z) + a1.z*(a3.w*a4.x - a3.x*a4.w) + a1.w*(a3.x*a4.z - a3.z*a4.x); d2.z = a1.x*(a2.w*a4.z - a2.z*a4.w) + a1.z*(a2.x*a4.w - a2.w*a4.x) + a1.w*(a2.z*a4.x - a2.x*a4.z); d2.w = a1.x*(a2.z*a3.w - a2.w*a3.z) + a1.z*(a2.w*a3.x - a2.x*a3.w) + a1.w*(a2.x*a3.z - a2.z*a3.x); d3.x = a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x); d3.y = a1.x*(a3.w*a4.y - a3.y*a4.w) + a1.y*(a3.x*a4.w - a3.w*a4.x) + a1.w*(a3.y*a4.x - a3.x*a4.y); d3.z = a1.x*(a2.y*a4.w - a2.w*a4.y) + a1.y*(a2.w*a4.x - a2.x*a4.w) + a1.w*(a2.x*a4.y - a2.y*a4.x); d3.w = a1.x*(a2.w*a3.y - a2.y*a3.w) + a1.y*(a2.x*a3.w - a2.w*a3.x) + a1.w*(a2.y*a3.x - a2.x*a3.y); d4.x = a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y); d4.y = a1.x*(a3.y*a4.z - a3.z*a4.y) + a1.y*(a3.z*a4.x - a3.x*a4.z) + a1.z*(a3.x*a4.y - a3.y*a4.x); d4.z = a1.x*(a2.z*a4.y - a2.y*a4.z) + a1.y*(a2.x*a4.z - a2.z*a4.x) + a1.z*(a2.y*a4.x - a2.x*a4.y); d4.w = a1.x*(a2.y*a3.z - a2.z*a3.y) + a1.y*(a2.z*a3.x - a2.x*a3.z) + a1.z*(a2.x*a3.y - a2.y*a3.x); d1.xyzw /= det; d2.xyzw /= det; d3.xyzw /= det; d4.xyzw /= det; //End Inverse r0.xy = (uint2)v0.xy; r0.zw = float2(0.000000e+000,0.000000e+000); r0.z = t7.Load(r0.xyz).x; r0.xy = r0.xy; float4 r20, r21; //...Transform to World r2.xyzw = cb12[211].xyzw * r0.yyyy; r2.xyzw = cb12[210].xyzw * r0.xxxx + r2.xyzw; r2.xyzw = cb12[212].xyzw * r0.zzzz + r2.xyzw; r2.xyzw = cb12[213].xyzw + r2.xyzw; r2.xyz = r2.xyz / r2.www; //...forward project to Screen r20.xyz = r2.xyz; r20.w = 1.0; r21.xyzw = cb12[2].xyzw * r20.yyyy; r21.xyzw = cb12[1].xyzw * r20.xxxx + r21.xyzw; r21.xyzw = cb12[3].xyzw * r20.zzzz + r21.xyzw; r21.xyzw = cb12[4].xyzw + r21.xyzw; r21.xyzw /= r21.wwww; //...Stereo correct r21.x -= stereo.x*(r21.z - stereo.y)/cb12[13].x; //...back project to World from screen r20.xyzw = b2.xyzw * r21.yyyy; r20.xyzw = b1.xyzw * r21.xxxx + r20.xyzw; r20.xyzw = b3.xyzw * r21.zzzz + r20.xyzw; r20.xyzw = b4.xyzw * r21.wwww + r20.xyzw; r20.xyz = r20.xyz / r20.www; //...Forward project back to where it came from... r0.xyzw = d2.xyzw * r20.yyyy; r0.xyzw = d1.xyzw * r20.xxxx + r0.xyzw; r0.xyzw = d3.xyzw * r20.zzzz + r0.xyzw; r0.xyzw = d4.xyzw + r0.xyzw; r0.xyz = r0.xyz / r0.www; r1.xyz = cb12[211].xyw * r0.yyy; r0.xyw = cb12[210].xyw * r0.xxx + r1.xyz; r0.xyz = cb12[212].xyw * r0.zzz + r0.xyw; r0.xyz = cb12[213].xyw + r0.xyz; r0.xy = r0.xy / r0.zz; r0.xy = -v4.xy + r0.xy; r0.x = dot(r0.xy, r0.xy); r0.x = sqrt(r0.x); r0.x = v4.w < r0.x; if (r0.x != 0) discard; r0.xyzw = t0.Sample(s0_s, v2.xy, int2(0, 0)).xyzw; r1.xyz = t1.Sample(s1_s, v2.xy, int2(0, 0)).xyz; r1.xyz = r1.xyz * float3(2.000000e+000,2.000000e+000,2.000000e+000) + float3(-1.000000e+000,-1.000000e+000,-1.000000e+000); r1.w = 1.000000000e+000; r2.x = dot(r1.xyzw, v5.xyzw); r2.y = dot(r1.xyzw, v6.xyzw); r2.z = dot(r1.xyzw, v7.xyzw); r0.xyzw = v1.xyzw * r0.xyzw; r1.xyz = float3(1.000000e+000,1.000000e+000,1.000000e+000) + r2.xyz; o1.xyz = float3(5.000000e-001,5.000000e-001,5.000000e-001) * r1.xyz; o0.xyzw = r0.xyzw; o1.w = r0.w; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) D3D Shader Disassembler // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float xy // COLOR 0 xyzw 1 NONE float xyzw // TEXCOORD 0 xy 2 NONE float xy // TEXCOORD 2 xyz 3 NONE float // TEXCOORD 3 xyzw 4 NONE float xy w // EXTRA_DATA 0 xyzw 5 NONE float xyzw // EXTRA_DATA 1 xyzw 6 NONE float xyzw // EXTRA_DATA 2 xyzw 7 NONE float xyzw // EXTRA_DATA 3 xyzw 8 NONE float // MORE_DATA 0 xyzw 9 NONE float // MORE_DATA 1 xyzw 10 NONE float // MORE_DATA 2 xyzw 11 NONE float // MORE_DATA 3 xyzw 12 NONE float // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Target 0 xyzw 0 TARGET float xyzw // SV_Target 1 xyzw 1 TARGET float xyzw // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb12[214], immediateIndexed dcl_sampler s0, mode_default dcl_sampler s1, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t7 dcl_input_ps_siv linear noperspective v0.xy, position dcl_input_ps linear v1.xyzw dcl_input_ps linear v2.xy dcl_input_ps linear v4.xyw dcl_input_ps linear v5.xyzw dcl_input_ps linear v6.xyzw dcl_input_ps linear v7.xyzw dcl_output o0.xyzw dcl_output o1.xyzw dcl_temps 3 ftou r0.xy, v0.xyxx mov r0.zw, l(0,0,0,0) ld_indexable(texture2d)(float,float,float,float) r0.z, r0.xyzw, t7.yzxw utof r0.xy, r0.xyxx mul r1.xyz, r0.yyyy, cb12[211].xywx mad r0.xyw, cb12[210].xyxw, r0.xxxx, r1.xyxz mad r0.xyz, cb12[212].xywx, r0.zzzz, r0.xywx add r0.xyz, r0.xyzx, cb12[213].xywx div r0.xy, r0.xyxx, r0.zzzz add r0.xy, r0.xyxx, -v4.xyxx dp2 r0.x, r0.xyxx, r0.xyxx sqrt r0.x, r0.x lt r0.x, v4.w, r0.x discard_nz r0.x sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r0.xyzw, v2.xyxx, t0.xyzw, s0 sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.xyz, v2.xyxx, t1.xyzw, s1 mad r1.xyz, r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000) mov r1.w, l(1.000000) dp4 r2.x, r1.xyzw, v5.xyzw dp4 r2.y, r1.xyzw, v6.xyzw dp4 r2.z, r1.xyzw, v7.xyzw mul r0.xyzw, r0.xyzw, v1.xyzw add r1.xyz, r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) mul o1.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000) mov o0.xyzw, r0.xyzw mov o1.w, r0.w ret // Approximately 0 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] Anyone seen any problems with this shader?? I have also attached the txt file of the shader.
Right,

I found one of the PS that are related to some decals that are pushed at wrong/too much into depth. (like a double depth).

Turns out is already corrected...Hmmm

Pictures:
With it enabled(look at Geralt's feet)
Image

With the Ps disabled:
Image

The shader code is like this:
//Decals

Texture2D<float4> t7 : register(t7);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb12 : register(b12)
{
float4 cb12[214];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
float4 v0 : SV_Position0,
float4 v1 : COLOR0,
float2 v2 : TEXCOORD0,
float3 v3 : TEXCOORD2,
float4 v4 : TEXCOORD3,
float4 v5 : EXTRA_DATA0,
float4 v6 : EXTRA_DATA1,
float4 v7 : EXTRA_DATA2,
float4 v8 : EXTRA_DATA3,
float4 v9 : MORE_DATA0,
float4 v10 : MORE_DATA1,
float4 v11 : MORE_DATA2,
float4 v12 : MORE_DATA3,
out float4 o0 : SV_Target0,
out float4 o1 : SV_Target1)
{
float4 r0,r1,r2;
uint4 bitmask, uiDest;
float4 fDest;

float4 stereo = StereoParams.Load(0);

//Work out Inverse
//...Variables
float4 a1, a2, a3, a4;
float4 b1, b2, b3, b4;
float det;
//...Original Matrix
a1.xyzw = cb12[1].xyzw;
a2.xyzw = cb12[2].xyzw;
a3.xyzw = cb12[3].xyzw;
a4.xyzw = cb12[4].xyzw;
//...Determinant
det = a1.x*(a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y));
det += a1.y*(a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.z) + a2.w*(a3.z*a4.x - a3.x*a4.z));
det += a1.z*(a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x));
det += a1.w*(a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y));
//...Inverse Matrix Elements
b1.x = a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y);
b1.y = a1.y*(a3.w*a4.z - a3.z*a4.w) + a1.z*(a3.y*a4.w - a3.w*a4.y) + a1.w*(a3.z*a4.y - a3.y*a4.z);
b1.z = a1.y*(a2.z*a4.w - a2.w*a4.z) + a1.z*(a2.w*a4.y - a2.y*a4.w) + a1.w*(a2.y*a4.z - a2.z*a4.y);
b1.w = a1.y*(a2.w*a3.z - a2.z*a3.w) + a1.z*(a2.y*a3.w - a2.w*a3.y) + a1.w*(a2.z*a3.y - a2.y*a3.z);
b2.x = a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.x) + a2.w*(a3.z*a4.x - a3.x*a4.z);
b2.y = a1.x*(a3.z*a4.w - a3.w*a4.z) + a1.z*(a3.w*a4.x - a3.x*a4.w) + a1.w*(a3.x*a4.z - a3.z*a4.x);
b2.z = a1.x*(a2.w*a4.z - a2.z*a4.w) + a1.z*(a2.x*a4.w - a2.w*a4.x) + a1.w*(a2.z*a4.x - a2.x*a4.z);
b2.w = a1.x*(a2.z*a3.w - a2.w*a3.z) + a1.z*(a2.w*a3.x - a2.x*a3.w) + a1.w*(a2.x*a3.z - a2.z*a3.x);
b3.x = a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x);
b3.y = a1.x*(a3.w*a4.y - a3.y*a4.w) + a1.y*(a3.x*a4.w - a3.w*a4.x) + a1.w*(a3.y*a4.x - a3.x*a4.y);
b3.z = a1.x*(a2.y*a4.w - a2.w*a4.y) + a1.y*(a2.w*a4.x - a2.x*a4.w) + a1.w*(a2.x*a4.y - a2.y*a4.x);
b3.w = a1.x*(a2.w*a3.y - a2.y*a3.w) + a1.y*(a2.x*a3.w - a2.w*a3.x) + a1.w*(a2.y*a3.x - a2.x*a3.y);
b4.x = a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y);
b4.y = a1.x*(a3.y*a4.z - a3.z*a4.y) + a1.y*(a3.z*a4.x - a3.x*a4.z) + a1.z*(a3.x*a4.y - a3.y*a4.x);
b4.z = a1.x*(a2.z*a4.y - a2.y*a4.z) + a1.y*(a2.x*a4.z - a2.z*a4.x) + a1.z*(a2.y*a4.x - a2.x*a4.y);
b4.w = a1.x*(a2.y*a3.z - a2.z*a3.y) + a1.y*(a2.z*a3.x - a2.x*a3.z) + a1.z*(a2.x*a3.y - a2.y*a3.x);
b1.xyzw /= det;
b2.xyzw /= det;
b3.xyzw /= det;
b4.xyzw /= det;
//End Inverse


//Work out Inverse
//...Variables
// float4 a1, a2, a3, a4;
float4 d1, d2, d3, d4;
// float det;
//...Original Matrix
a1.xyzw = cb12[210].xyzw;
a2.xyzw = cb12[211].xyzw;
a3.xyzw = cb12[212].xyzw;
a4.xyzw = cb12[213].xyzw;
//...Determinant
det = a1.x*(a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y));
det += a1.y*(a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.z) + a2.w*(a3.z*a4.x - a3.x*a4.z));
det += a1.z*(a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x));
det += a1.w*(a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y));
//...Inverse Matrix Elements
d1.x = a2.y*(a3.z*a4.w - a3.w*a4.z) + a2.z*(a3.w*a4.y - a3.y*a4.w) + a2.w*(a3.y*a4.z - a3.z*a4.y);
d1.y = a1.y*(a3.w*a4.z - a3.z*a4.w) + a1.z*(a3.y*a4.w - a3.w*a4.y) + a1.w*(a3.z*a4.y - a3.y*a4.z);
d1.z = a1.y*(a2.z*a4.w - a2.w*a4.z) + a1.z*(a2.w*a4.y - a2.y*a4.w) + a1.w*(a2.y*a4.z - a2.z*a4.y);
d1.w = a1.y*(a2.w*a3.z - a2.z*a3.w) + a1.z*(a2.y*a3.w - a2.w*a3.y) + a1.w*(a2.z*a3.y - a2.y*a3.z);
d2.x = a2.x*(a3.w*a4.z - a3.z*a4.w) + a2.z*(a3.x*a4.w - a3.w*a4.x) + a2.w*(a3.z*a4.x - a3.x*a4.z);
d2.y = a1.x*(a3.z*a4.w - a3.w*a4.z) + a1.z*(a3.w*a4.x - a3.x*a4.w) + a1.w*(a3.x*a4.z - a3.z*a4.x);
d2.z = a1.x*(a2.w*a4.z - a2.z*a4.w) + a1.z*(a2.x*a4.w - a2.w*a4.x) + a1.w*(a2.z*a4.x - a2.x*a4.z);
d2.w = a1.x*(a2.z*a3.w - a2.w*a3.z) + a1.z*(a2.w*a3.x - a2.x*a3.w) + a1.w*(a2.x*a3.z - a2.z*a3.x);
d3.x = a2.x*(a3.y*a4.w - a3.w*a4.y) + a2.y*(a3.w*a4.x - a3.x*a4.w) + a2.w*(a3.x*a4.y - a3.y*a4.x);
d3.y = a1.x*(a3.w*a4.y - a3.y*a4.w) + a1.y*(a3.x*a4.w - a3.w*a4.x) + a1.w*(a3.y*a4.x - a3.x*a4.y);
d3.z = a1.x*(a2.y*a4.w - a2.w*a4.y) + a1.y*(a2.w*a4.x - a2.x*a4.w) + a1.w*(a2.x*a4.y - a2.y*a4.x);
d3.w = a1.x*(a2.w*a3.y - a2.y*a3.w) + a1.y*(a2.x*a3.w - a2.w*a3.x) + a1.w*(a2.y*a3.x - a2.x*a3.y);
d4.x = a2.x*(a3.z*a4.y - a3.y*a4.z) + a2.y*(a3.x*a4.z - a3.z*a4.x) + a2.z*(a3.y*a4.x - a3.x*a4.y);
d4.y = a1.x*(a3.y*a4.z - a3.z*a4.y) + a1.y*(a3.z*a4.x - a3.x*a4.z) + a1.z*(a3.x*a4.y - a3.y*a4.x);
d4.z = a1.x*(a2.z*a4.y - a2.y*a4.z) + a1.y*(a2.x*a4.z - a2.z*a4.x) + a1.z*(a2.y*a4.x - a2.x*a4.y);
d4.w = a1.x*(a2.y*a3.z - a2.z*a3.y) + a1.y*(a2.z*a3.x - a2.x*a3.z) + a1.z*(a2.x*a3.y - a2.y*a3.x);
d1.xyzw /= det;
d2.xyzw /= det;
d3.xyzw /= det;
d4.xyzw /= det;
//End Inverse

r0.xy = (uint2)v0.xy;
r0.zw = float2(0.000000e+000,0.000000e+000);
r0.z = t7.Load(r0.xyz).x;
r0.xy = r0.xy;

float4 r20, r21;

//...Transform to World
r2.xyzw = cb12[211].xyzw * r0.yyyy;
r2.xyzw = cb12[210].xyzw * r0.xxxx + r2.xyzw;
r2.xyzw = cb12[212].xyzw * r0.zzzz + r2.xyzw;
r2.xyzw = cb12[213].xyzw + r2.xyzw;
r2.xyz = r2.xyz / r2.www;


//...forward project to Screen
r20.xyz = r2.xyz;
r20.w = 1.0;

r21.xyzw = cb12[2].xyzw * r20.yyyy;
r21.xyzw = cb12[1].xyzw * r20.xxxx + r21.xyzw;
r21.xyzw = cb12[3].xyzw * r20.zzzz + r21.xyzw;
r21.xyzw = cb12[4].xyzw + r21.xyzw;

r21.xyzw /= r21.wwww;

//...Stereo correct
r21.x -= stereo.x*(r21.z - stereo.y)/cb12[13].x;


//...back project to World from screen
r20.xyzw = b2.xyzw * r21.yyyy;
r20.xyzw = b1.xyzw * r21.xxxx + r20.xyzw;
r20.xyzw = b3.xyzw * r21.zzzz + r20.xyzw;
r20.xyzw = b4.xyzw * r21.wwww + r20.xyzw;
r20.xyz = r20.xyz / r20.www;

//...Forward project back to where it came from...
r0.xyzw = d2.xyzw * r20.yyyy;
r0.xyzw = d1.xyzw * r20.xxxx + r0.xyzw;
r0.xyzw = d3.xyzw * r20.zzzz + r0.xyzw;
r0.xyzw = d4.xyzw + r0.xyzw;
r0.xyz = r0.xyz / r0.www;


r1.xyz = cb12[211].xyw * r0.yyy;
r0.xyw = cb12[210].xyw * r0.xxx + r1.xyz;
r0.xyz = cb12[212].xyw * r0.zzz + r0.xyw;
r0.xyz = cb12[213].xyw + r0.xyz;

r0.xy = r0.xy / r0.zz;
r0.xy = -v4.xy + r0.xy;
r0.x = dot(r0.xy, r0.xy);
r0.x = sqrt(r0.x);
r0.x = v4.w < r0.x;
if (r0.x != 0) discard;
r0.xyzw = t0.Sample(s0_s, v2.xy, int2(0, 0)).xyzw;
r1.xyz = t1.Sample(s1_s, v2.xy, int2(0, 0)).xyz;
r1.xyz = r1.xyz * float3(2.000000e+000,2.000000e+000,2.000000e+000) + float3(-1.000000e+000,-1.000000e+000,-1.000000e+000);
r1.w = 1.000000000e+000;
r2.x = dot(r1.xyzw, v5.xyzw);
r2.y = dot(r1.xyzw, v6.xyzw);
r2.z = dot(r1.xyzw, v7.xyzw);
r0.xyzw = v1.xyzw * r0.xyzw;
r1.xyz = float3(1.000000e+000,1.000000e+000,1.000000e+000) + r2.xyz;
o1.xyz = float3(5.000000e-001,5.000000e-001,5.000000e-001) * r1.xyz;
o0.xyzw = r0.xyzw;
o1.w = r0.w;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xy
// COLOR 0 xyzw 1 NONE float xyzw
// TEXCOORD 0 xy 2 NONE float xy
// TEXCOORD 2 xyz 3 NONE float
// TEXCOORD 3 xyzw 4 NONE float xy w
// EXTRA_DATA 0 xyzw 5 NONE float xyzw
// EXTRA_DATA 1 xyzw 6 NONE float xyzw
// EXTRA_DATA 2 xyzw 7 NONE float xyzw
// EXTRA_DATA 3 xyzw 8 NONE float
// MORE_DATA 0 xyzw 9 NONE float
// MORE_DATA 1 xyzw 10 NONE float
// MORE_DATA 2 xyzw 11 NONE float
// MORE_DATA 3 xyzw 12 NONE float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
// SV_Target 1 xyzw 1 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb12[214], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t7
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xy
dcl_input_ps linear v4.xyw
dcl_input_ps linear v5.xyzw
dcl_input_ps linear v6.xyzw
dcl_input_ps linear v7.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_temps 3
ftou r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r0.z, r0.xyzw, t7.yzxw
utof r0.xy, r0.xyxx
mul r1.xyz, r0.yyyy, cb12[211].xywx
mad r0.xyw, cb12[210].xyxw, r0.xxxx, r1.xyxz
mad r0.xyz, cb12[212].xywx, r0.zzzz, r0.xywx
add r0.xyz, r0.xyzx, cb12[213].xywx
div r0.xy, r0.xyxx, r0.zzzz
add r0.xy, r0.xyxx, -v4.xyxx
dp2 r0.x, r0.xyxx, r0.xyxx
sqrt r0.x, r0.x
lt r0.x, v4.w, r0.x
discard_nz r0.x
sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r0.xyzw, v2.xyxx, t0.xyzw, s0
sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.xyz, v2.xyxx, t1.xyzw, s1
mad r1.xyz, r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
mov r1.w, l(1.000000)
dp4 r2.x, r1.xyzw, v5.xyzw
dp4 r2.y, r1.xyzw, v6.xyzw
dp4 r2.z, r1.xyzw, v7.xyzw
mul r0.xyzw, r0.xyzw, v1.xyzw
add r1.xyz, r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul o1.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
mov o0.xyzw, r0.xyzw
mov o1.w, r0.w
ret
// Approximately 0 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


Anyone seen any problems with this shader??
I have also attached the txt file of the shader.

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 01/16/2016 01:02 PM   
Did more testing: - I even removed the wrapper altogheter and noticed that the decals are floating over the ground in the original/non-fixed game... That's why in stereo 3D we see them at different depths as the game renders them at different depths :)))) - The decals instead of being rendered over the geometry of the terrain they are rendered on a flat plane "hovering" the geometry... You can see it in 2D as well if you look very close... - I thing this is some of their "optimizations" to make the engine run faster... - Don't think we can do much about it though :(
Did more testing:

- I even removed the wrapper altogheter and noticed that the decals are floating over the ground in the original/non-fixed game... That's why in stereo 3D we see them at different depths as the game renders them at different depths :))))

- The decals instead of being rendered over the geometry of the terrain they are rendered on a flat plane "hovering" the geometry... You can see it in 2D as well if you look very close...

- I thing this is some of their "optimizations" to make the engine run faster...
- Don't think we can do much about it though :(

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 01/16/2016 02:09 PM   
[quote="helifax"]Did more testing: - I even removed the wrapper altogheter and noticed that the decals are floating over the ground in the original/non-fixed game... That's why in stereo 3D we see them at different depths as the game renders them at different depths :)))) - The decals instead of being rendered over the geometry of the terrain they are rendered on a flat plane "hovering" the geometry... You can see it in 2D as well if you look very close... - I thing this is some of their "optimizations" to make the engine run faster... - Don't think we can do much about it though :( [/quote] I thought I had posted on this earlier, but my post is not there... Hmmm... But yeah, decals are wrong in 2D, so don't waste too much time on them...
helifax said:Did more testing:

- I even removed the wrapper altogheter and noticed that the decals are floating over the ground in the original/non-fixed game... That's why in stereo 3D we see them at different depths as the game renders them at different depths :))))

- The decals instead of being rendered over the geometry of the terrain they are rendered on a flat plane "hovering" the geometry... You can see it in 2D as well if you look very close...

- I thing this is some of their "optimizations" to make the engine run faster...
- Don't think we can do much about it though :(

I thought I had posted on this earlier, but my post is not there... Hmmm... But yeah, decals are wrong in 2D, so don't waste too much time on them...

Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278

Posted 01/16/2016 08:20 PM   
[quote="DarkStarSword"]There's a second issue that resembles clipping on some reflections on the ground that's giving me some trouble (visible from some of the saves that biz posted, on the ground near one of the gates with two torches). Mike or Helifax - I could use a second opinion on this one - it's pixel shader fed94596a77ba6a7 (decompiler bugs on this shader are easy - just declare a "ByteAddressBuffer t21 : register(t21);" and it's just blah = t21.Load(blah) where it wants a fixup). My current working theory is that it's choosing the closest reflection probe (r8.z) to the pixel in the first while loop of the shader, and that is selecting the wrong probe in between two nearby probes in stereo. Strangely, it's vertex shader (aa66544efb385a02) causes the game to crash if StereoParams is declared (regardless of using HLSL or assembly), but I'm pretty sure the fix needs to go in the pixel shader. The GI clipping fix was just a matter of disabling one of the tests in that shader: https://github.com/bo3b/3Dmigoto/commit/e54ed71cead64c85cc7bc3f373db06410735c171[/quote] Nice find on the global lights. Is this a general fix needed by all fixed compute shaders? This is a common "pattern" now, so we should add it to the list of tools and techniques somewhere. Also, are you getting crashes when stepping through compute shaders?
DarkStarSword said:There's a second issue that resembles clipping on some reflections on the ground that's giving me some trouble (visible from some of the saves that biz posted, on the ground near one of the gates with two torches). Mike or Helifax - I could use a second opinion on this one - it's pixel shader fed94596a77ba6a7 (decompiler bugs on this shader are easy - just declare a "ByteAddressBuffer t21 : register(t21);" and it's just blah = t21.Load(blah) where it wants a fixup).

My current working theory is that it's choosing the closest reflection probe (r8.z) to the pixel in the first while loop of the shader, and that is selecting the wrong probe in between two nearby probes in stereo.

Strangely, it's vertex shader (aa66544efb385a02) causes the game to crash if StereoParams is declared (regardless of using HLSL or assembly), but I'm pretty sure the fix needs to go in the pixel shader.


The GI clipping fix was just a matter of disabling one of the tests in that shader:

https://github.com/bo3b/3Dmigoto/commit/e54ed71cead64c85cc7bc3f373db06410735c171


Nice find on the global lights. Is this a general fix needed by all fixed compute shaders? This is a common "pattern" now, so we should add it to the list of tools and techniques somewhere. Also, are you getting crashes when stepping through compute shaders?

Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278

Posted 01/16/2016 08:25 PM   
[quote="mike_ar69"][quote="helifax"]Did more testing: - I even removed the wrapper altogheter and noticed that the decals are floating over the ground in the original/non-fixed game... That's why in stereo 3D we see them at different depths as the game renders them at different depths :)))) - The decals instead of being rendered over the geometry of the terrain they are rendered on a flat plane "hovering" the geometry... You can see it in 2D as well if you look very close... - I thing this is some of their "optimizations" to make the engine run faster... - Don't think we can do much about it though :( [/quote] I thought I had posted on this earlier, but my post is not there... Hmmm... But yeah, decals are wrong in 2D, so don't waste too much time on them...[/quote] Yeah, DAMN! I've spent like 3 hours on trying to understand why it doesn't work:))) until I had the briliant Idea of trying it in 2D (without 3DMigoto or any other Mod) and noticed they are rendered wrong from the engine:))) Damn;)) In any case they are not "that" wrong but certainly you see them way better in 3D then 2D;))
mike_ar69 said:
helifax said:Did more testing:

- I even removed the wrapper altogheter and noticed that the decals are floating over the ground in the original/non-fixed game... That's why in stereo 3D we see them at different depths as the game renders them at different depths :))))

- The decals instead of being rendered over the geometry of the terrain they are rendered on a flat plane "hovering" the geometry... You can see it in 2D as well if you look very close...

- I thing this is some of their "optimizations" to make the engine run faster...
- Don't think we can do much about it though :(

I thought I had posted on this earlier, but my post is not there... Hmmm... But yeah, decals are wrong in 2D, so don't waste too much time on them...


Yeah, DAMN! I've spent like 3 hours on trying to understand why it doesn't work:))) until I had the briliant Idea of trying it in 2D (without 3DMigoto or any other Mod) and noticed they are rendered wrong from the engine:)))

Damn;)) In any case they are not "that" wrong but certainly you see them way better in 3D then 2D;))

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 01/17/2016 03:20 AM   
[quote="mike_ar69"]Nice find on the global lights. Is this a general fix needed by all fixed compute shaders?[/quote]As I recall there was only one global illumination shader we found originally, though it's worth keeping an eye out for similar clipping elsewhere. [quote]This is a common "pattern" now, so we should add it to the list of tools and techniques somewhere.[/quote]You mean the general approach of disabling tests? I've been thinking for a while now of adding a page (or pages) to bo3b's wiki with links to various patterns I've cracked. [quote]Also, are you getting crashes when stepping through compute shaders?[/quote]Yeah, I'm using frame analysis to find compute shaders in this game because of that (to save time, set a trigger to start dumping at 170486ed36efcc9e, which is the very first post-processing shader run with HBAO+ enabled). What might be happening is the output from one compute shader is feeding into another one, which is looping a given number of iterations based on that and when it processes garbage data it crashes instead (it's very easy to crash a game with an infinite loop in a shader). Amusingly there's one particular pixel shader that makes Geralt start swimming whenever I pass it while hunting :-p BTW I'm putting the reflection shader down for now - I spent most of yesterday trying different experiments on it and haven't got any closer to figuring out where the clipping is coming from let alone what to do about it. Feel free to take a look - I might have just missed something obvious. I'm not sure how common this particular clipping is, so I'm not sure if it's worth spending much time on it.
mike_ar69 said:Nice find on the global lights. Is this a general fix needed by all fixed compute shaders?
As I recall there was only one global illumination shader we found originally, though it's worth keeping an eye out for similar clipping elsewhere.

This is a common "pattern" now, so we should add it to the list of tools and techniques somewhere.
You mean the general approach of disabling tests? I've been thinking for a while now of adding a page (or pages) to bo3b's wiki with links to various patterns I've cracked.

Also, are you getting crashes when stepping through compute shaders?
Yeah, I'm using frame analysis to find compute shaders in this game because of that (to save time, set a trigger to start dumping at 170486ed36efcc9e, which is the very first post-processing shader run with HBAO+ enabled). What might be happening is the output from one compute shader is feeding into another one, which is looping a given number of iterations based on that and when it processes garbage data it crashes instead (it's very easy to crash a game with an infinite loop in a shader).

Amusingly there's one particular pixel shader that makes Geralt start swimming whenever I pass it while hunting :-p

BTW I'm putting the reflection shader down for now - I spent most of yesterday trying different experiments on it and haven't got any closer to figuring out where the clipping is coming from let alone what to do about it. Feel free to take a look - I might have just missed something obvious. I'm not sure how common this particular clipping is, so I'm not sure if it's worth spending much time on it.

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 01/17/2016 03:20 AM   
[quote="DarkStarSword"] Amusingly there's one particular pixel shader that makes Geralt start swimming whenever I pass it while hunting :-p [/quote] That one is my favourite;)) There is also a VS (I think)that makes the whole world disappears and instead puts Geralt in water swimming;)) I actually had a bit of Fun with the PS shader:)) "swimming around the road" ^_^ the other day:))
DarkStarSword said:

Amusingly there's one particular pixel shader that makes Geralt start swimming whenever I pass it while hunting :-p


That one is my favourite;))

There is also a VS (I think)that makes the whole world disappears and instead puts Geralt in water swimming;))
I actually had a bit of Fun with the PS shader:)) "swimming around the road" ^_^ the other day:))

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 01/17/2016 03:34 AM   
Hello, I have installed TW3 for the first time some days ago, and still I have not played the game, only installed mods and test some things. I have installed v1.12, and I have noticed that 3D fix is broken. I have also noticed that "fake 3D" is good enough to play this game, specially for me because I do not have a powerfull computer (nvidia 660 TI + i7 930) and fake 3D demands less power. The big problem I find playing using fake3D is that the normal text appears corrupt, I suppose because the same reason that we can see a halo around the character. I would like to know if there is any way to fix the text (maybe only changing the depth), to read it properly. Anyway waiting also for a real fix for v1.12, even though I think I have not enough computer to play using it decently smooth.
Hello, I have installed TW3 for the first time some days ago, and still I have not played the game, only installed mods and test some things. I have installed v1.12, and I have noticed that 3D fix is broken.

I have also noticed that "fake 3D" is good enough to play this game, specially for me because I do not have a powerfull computer (nvidia 660 TI + i7 930) and fake 3D demands less power. The big problem I find playing using fake3D is that the normal text appears corrupt, I suppose because the same reason that we can see a halo around the character. I would like to know if there is any way to fix the text (maybe only changing the depth), to read it properly.

Anyway waiting also for a real fix for v1.12, even though I think I have not enough computer to play using it decently smooth.

- Windows 7 64bits (SSD OCZ-Vertez2 128Gb)
- "ASUS P6X58D-E" motherboard
- "Gigabyte RTX 2080 Gaming OC"
- "Intel Xeon X5670" @4000MHz CPU (20.0[12-25]x200MHz)
- RAM 16 Gb DDR3 1600
- "Dell S2716DG" monitor (2560x1440 @144Hz)
- "Corsair Carbide 600C" case
- Labrador dog (cinnamon edition)

Posted 01/19/2016 08:43 PM   
How badly broken? There's only some minor clipping issues from what I can see - if you are getting anything more serious please let us know.
How badly broken? There's only some minor clipping issues from what I can see - if you are getting anything more serious please let us know.

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 01/20/2016 02:10 AM   
@b4thman: There isn't anything broken... I have played the game each day for the last week and NOTHING is broken... If you are using graphical mods check those... As a matter of fact you should forget those if you want to have any performance... Also CM (fake 3D) is crap in comparison with real 3D in this game...
@b4thman:
There isn't anything broken... I have played the game each day for the last week and NOTHING is broken...
If you are using graphical mods check those...
As a matter of fact you should forget those if you want to have any performance...

Also CM (fake 3D) is crap in comparison with real 3D in this game...

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 01/20/2016 02:30 AM   
Ok, everything is perfect now, apparently, after 1 minute of gameplay. I have arrived home and 1st of all I have installed the last whql driver (361.43), and copied all the 3dfix files again, and all is good. Previously I think I didn't overwrite the file "d3dcompiler_46.dll" (it was already present in the game), and maybe that or the different driver version used now may be the difference. Also I have not done anything about 2nd step ("helifax custom profile"), as I understand it is intended to solve problems to SLI ownners (that is not my case, I only have one modest 660TI). The only thing is that, of course, I lose some valious fps playing, and maybe if it were possible to get rid of the visual anomalies it would be probably better for me to play with fake3D, but only because of the less demanding hardware, that in my case is crucial. Another solution would be if Nvidia donate me one 980 TI, but it won't probably happen. As always, thanks for the community support.
Ok, everything is perfect now, apparently, after 1 minute of gameplay. I have arrived home and 1st of all I have installed the last whql driver (361.43), and copied all the 3dfix files again, and all is good. Previously I think I didn't overwrite the file "d3dcompiler_46.dll" (it was already present in the game), and maybe that or the different driver version used now may be the difference.

Also I have not done anything about 2nd step ("helifax custom profile"), as I understand it is intended to solve problems to SLI ownners (that is not my case, I only have one modest 660TI).

The only thing is that, of course, I lose some valious fps playing, and maybe if it were possible to get rid of the visual anomalies it would be probably better for me to play with fake3D, but only because of the less demanding hardware, that in my case is crucial. Another solution would be if Nvidia donate me one 980 TI, but it won't probably happen.

As always, thanks for the community support.

- Windows 7 64bits (SSD OCZ-Vertez2 128Gb)
- "ASUS P6X58D-E" motherboard
- "Gigabyte RTX 2080 Gaming OC"
- "Intel Xeon X5670" @4000MHz CPU (20.0[12-25]x200MHz)
- RAM 16 Gb DDR3 1600
- "Dell S2716DG" monitor (2560x1440 @144Hz)
- "Corsair Carbide 600C" case
- Labrador dog (cinnamon edition)

Posted 01/20/2016 04:33 PM   
[quote="b4thman"]Ok, everything is perfect now, apparently, after 1 minute of gameplay. I have arrived home and 1st of all I have installed the last whql driver (361.43), and copied all the 3dfix files again, and all is good. Previously I think I didn't overwrite the file "d3dcompiler_46.dll" (it was already present in the game), and maybe that or the different driver version used now may be the difference. Also I have not done anything about 2nd step ("helifax custom profile"), as I understand it is intended to solve problems to SLI ownners (that is not my case, I only have one modest 660TI). The only thing is that, of course, I lose some valious fps playing, and maybe if it were possible to get rid of the visual anomalies it would be probably better for me to play with fake3D, but only because of the less demanding hardware, that in my case is crucial. Another solution would be if Nvidia donate me one 980 TI, but it won't probably happen. As always, thanks for the community support.[/quote] Hi, If you have the GOG version DO NOT start the game from GOG Galaxy browser! It will automatically overwrite the d3d11.dll and dxdgi.dll with it's own version and thus will make the fix invalid;) If this happens just apply the 3D Vision fix again;) Also if you update the drivers you should also re-import the nvidia profile stated there. Without it you will get in places underground or under water where the WHOLE UI will be missing;) Happy gaming;)
b4thman said:Ok, everything is perfect now, apparently, after 1 minute of gameplay. I have arrived home and 1st of all I have installed the last whql driver (361.43), and copied all the 3dfix files again, and all is good. Previously I think I didn't overwrite the file "d3dcompiler_46.dll" (it was already present in the game), and maybe that or the different driver version used now may be the difference.

Also I have not done anything about 2nd step ("helifax custom profile"), as I understand it is intended to solve problems to SLI ownners (that is not my case, I only have one modest 660TI).

The only thing is that, of course, I lose some valious fps playing, and maybe if it were possible to get rid of the visual anomalies it would be probably better for me to play with fake3D, but only because of the less demanding hardware, that in my case is crucial. Another solution would be if Nvidia donate me one 980 TI, but it won't probably happen.

As always, thanks for the community support.


Hi,

If you have the GOG version DO NOT start the game from GOG Galaxy browser! It will automatically overwrite the d3d11.dll and dxdgi.dll with it's own version and thus will make the fix invalid;)

If this happens just apply the 3D Vision fix again;)
Also if you update the drivers you should also re-import the nvidia profile stated there. Without it you will get in places underground or under water where the WHOLE UI will be missing;)

Happy gaming;)

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 01/20/2016 04:44 PM   
  117 / 152    
Scroll To Top