Tried this with PGA TOUR 2K21. Unfortunately the shadows in this game are still broken and the sky box is at screen depth. I understand skybox is not addressed in this fix. This is probably not a game anyone is interested in much other than myself

As far as I can tell, this is the shadows shader ( I tried setting StereoFlagsDX10=0x0005008 but this didn't seem to fix the issue)

Code: Select all

```
// ---- Created with 3Dmigoto v1.3.16.41 on Sun Apr 25 13:21:14 2021
cbuffer cb3 : register(b3)
{
float4 cb3[21];
}
cbuffer cb2 : register(b2)
{
float4 cb2[4];
}
cbuffer cb1 : register(b1)
{
float4 cb1[14];
}
cbuffer cb0 : register(b0)
{
float4 cb0[6];
}
// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);
void main(
float4 v0 : POSITION0,
float4 v1 : TEXCOORD0,
float3 v2 : TEXCOORD1,
out float4 o0 : SV_POSITION0,
out float4 o1 : TEXCOORD0,
out float4 o2 : TEXCOORD1,
out float4 o3 : TEXCOORD2,
out float4 o4 : TEXCOORD3)
{
float4 r0,r1,r2;
uint4 bitmask, uiDest;
float4 fDest;
r0.xyzw = cb2[1].xyzw * v0.yyyy;
r0.xyzw = cb2[0].xyzw * v0.xxxx + r0.xyzw;
r0.xyzw = cb2[2].xyzw * v0.zzzz + r0.xyzw;
r0.xyzw = cb2[3].xyzw + r0.xyzw;
r1.xyzw = cb3[18].xyzw * r0.yyyy;
r1.xyzw = cb3[17].xyzw * r0.xxxx + r1.xyzw;
r1.xyzw = cb3[19].xyzw * r0.zzzz + r1.xyzw;
r0.xyzw = cb3[20].xyzw * r0.wwww + r1.xyzw;
o0.xyzw = r0.xyzw;
r1.xz = float2(0.5,0.5) * r0.xw;
r1.y = cb0[5].x * r0.y;
r1.w = 0.5 * r1.y;
r2.xyz = cb1[11].xyz * r1.yyy;
r2.xyz = cb1[10].xyz * r0.xxx + r2.xyz;
o4.xyzw = r0.xyzw;
o1.zw = r1.xw + r1.zz;
o1.xy = v1.xy;
o2.xyz = v2.xyz;
r0.x = cb1[12].z + r2.z;
r0.yzw = -cb1[12].xyz + r2.xyz;
r0.xyzw = cb1[13].zxyz + r0.xyzw;
o3.xyz = float3(1,1,-1) * r0.yzw;
o3.w = -r0.x;
return;
}
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
// using 3Dmigoto v1.3.16.41 on Sun Apr 25 13:21:14 2021
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyz
// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 1 xyz 2 NONE float xyz
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
// TEXCOORD 0 xyzw 1 NONE float xyzw
// TEXCOORD 1 xyz 2 NONE float xyz
// TEXCOORD 2 xyzw 3 NONE float xyzw
// TEXCOORD 3 xyzw 4 NONE float xyzw
//
vs_4_0
dcl_constantbuffer cb0[6], immediateIndexed
dcl_constantbuffer cb1[14], immediateIndexed
dcl_constantbuffer cb2[4], immediateIndexed
dcl_constantbuffer cb3[21], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_input v2.xyz
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyz
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_temps 3
mul r0.xyzw, v0.yyyy, cb2[1].xyzw
mad r0.xyzw, cb2[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb2[2].xyzw, v0.zzzz, r0.xyzw
add r0.xyzw, r0.xyzw, cb2[3].xyzw
mul r1.xyzw, r0.yyyy, cb3[18].xyzw
mad r1.xyzw, cb3[17].xyzw, r0.xxxx, r1.xyzw
mad r1.xyzw, cb3[19].xyzw, r0.zzzz, r1.xyzw
mad r0.xyzw, cb3[20].xyzw, r0.wwww, r1.xyzw
mov o0.xyzw, r0.xyzw
mul r1.xz, r0.xxwx, l(0.500000, 0.000000, 0.500000, 0.000000)
mul r1.y, r0.y, cb0[5].x
mul r1.w, r1.y, l(0.500000)
mul r2.xyz, r1.yyyy, cb1[11].xyzx
mad r2.xyz, cb1[10].xyzx, r0.xxxx, r2.xyzx
mov o4.xyzw, r0.xyzw
add o1.zw, r1.zzzz, r1.xxxw
mov o1.xy, v1.xyxx
mov o2.xyz, v2.xyzx
add r0.x, r2.z, cb1[12].z
add r0.yzw, r2.xxyz, -cb1[12].xxyz
add r0.xyzw, r0.xyzw, cb1[13].zxyz
mul o3.xyz, r0.yzwy, l(1.000000, 1.000000, -1.000000, 0.000000)
mov o3.w, -r0.x
ret
// Approximately 0 instruction slots used
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
```

And this is the "skybox / clouds" shader (Just for reference as I understand skybox is not addressed in this fix)

Code: Select all

```
// ---- Created with 3Dmigoto v1.3.16.41 on Sun Apr 25 13:22:07 2021
cbuffer cb2 : register(b2)
{
float4 cb2[21];
}
cbuffer cb1 : register(b1)
{
float4 cb1[4];
}
cbuffer cb0 : register(b0)
{
float4 cb0[3];
}
// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);
void main(
float4 v0 : POSITION0,
float2 v1 : TEXCOORD0,
out float4 o0 : SV_POSITION0,
out float2 o1 : TEXCOORD0)
{
float4 r0,r1;
uint4 bitmask, uiDest;
float4 fDest;
r0.xyzw = cb1[1].xyzw * v0.yyyy;
r0.xyzw = cb1[0].xyzw * v0.xxxx + r0.xyzw;
r0.xyzw = cb1[2].xyzw * v0.zzzz + r0.xyzw;
r0.xyzw = cb1[3].xyzw + r0.xyzw;
r1.xyzw = cb2[18].xyzw * r0.yyyy;
r1.xyzw = cb2[17].xyzw * r0.xxxx + r1.xyzw;
r1.xyzw = cb2[19].xyzw * r0.zzzz + r1.xyzw;
o0.xyzw = cb2[20].xyzw * r0.wwww + r1.xyzw;
o1.xy = v1.xy * cb0[2].xy + cb0[2].zw;
return;
}
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
// using 3Dmigoto v1.3.16.41 on Sun Apr 25 13:22:07 2021
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyz
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xyzw
// TEXCOORD 0 xy 1 NONE float xy
//
vs_4_0
dcl_constantbuffer cb0[3], immediateIndexed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_constantbuffer cb2[21], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_temps 2
mul r0.xyzw, v0.yyyy, cb1[1].xyzw
mad r0.xyzw, cb1[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb1[2].xyzw, v0.zzzz, r0.xyzw
add r0.xyzw, r0.xyzw, cb1[3].xyzw
mul r1.xyzw, r0.yyyy, cb2[18].xyzw
mad r1.xyzw, cb2[17].xyzw, r0.xxxx, r1.xyzw
mad r1.xyzw, cb2[19].xyzw, r0.zzzz, r1.xyzw
mad o0.xyzw, cb2[20].xyzw, r0.wwww, r1.xyzw
mad o1.xy, v1.xyxx, cb0[2].xyxx, cb0[2].zwzz
ret
// Approximately 0 instruction slots used
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
```