3Dmigoto now open-source...
  124 / 143    
In the FFXV benchmark, I'm having trouble with shadows (screen depth by default). This is the pixel shader: [code] //Environment shadows. // ---- Created with 3Dmigoto v1.2.71 on Fri Feb 02 18:02:44 2018 cbuffer _Globals : register(b0) { float4 shadowProjMatrix0 : packoffset(c0); float4 shadowProjMatrix1 : packoffset(c1); float4 shadowProjMatrix2 : packoffset(c2); float4 shadowProjMatrix3 : packoffset(c3); float4 shadowFadeParam : packoffset(c4); float shadowFadeFarValue : packoffset(c5); float4 shadowDimensions : packoffset(c6); float shadowNormalBias : packoffset(c7); float4 shadowShifts[4] : packoffset(c8); float4 shadowMapCubeDepthParam : packoffset(c12); float4 projMatrixZ : packoffset(c13); bool backscatterAttenuation : packoffset(c14); float backscatterSpecularColor : packoffset(c14.y); float4 lightColor : packoffset(c15); float4 lightDir : packoffset(c16); float4 projInvMatrix[4] : packoffset(c17); float4 projInvMatrixZ : packoffset(c21); float4x4 viewMatrix : packoffset(c22); float4 projExtentsZ : packoffset(c26); float4 projExtentsXY : packoffset(c27); } SamplerState pointClampSampler_s : register(s0); SamplerComparisonState shadowMapArray_s : register(s1); Texture2D<float> depthSampler : register(t0); Texture2DArray<float4> shadowMapArrayTexture : register(t1); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_POSITION0, linear sample float4 v1 : TEXCOORD0, linear sample float4 v2 : TEXCOORD1, float3 v3 : TEXCOORD2, out float o0 : SV_TARGET0) { float4 r0,r1,r2,r3,r4,r5,r6,r7,r8; uint4 bitmask, uiDest; float4 fDest; float4 stereo = StereoParams.Load(0); r0.x = depthSampler.SampleLevel(pointClampSampler_s, v1.xy, 0).x; r0.xyzw = projInvMatrixZ.xyzw * r0.xxxx + v2.xyzw; r0.xyz = r0.xyz / r0.www; r0.w = 1; r0.w = dot(r0.xyzw, projMatrixZ.xyzw); r1.xyz = shadowProjMatrix1.xyz * r0.yyy; r1.xyz = r0.xxx * shadowProjMatrix0.xyz + r1.xyz; r0.xyz = r0.zzz * shadowProjMatrix2.xyz + r1.xyz; r0.xyz = shadowProjMatrix3.xyz + r0.xyz; r1.xy = r0.xy * float2(2,2) + float2(-1,-1); r1.z = -0.980000019 + r0.z; r1.z = max(0, r1.z); r1.z = 50 * r1.z; r1.x = max(abs(r1.x), abs(r1.y)); r1.x = max(r1.x, r1.z); r1.y = cmp(r1.x >= 1); if (r1.y != 0) { r1.yzw = shadowShifts[1].xyz + r0.xyz; r2.x = shadowShifts[1].w; r2.z = shadowShifts[0].x; r2.xyw = r2.xxz * r1.yzw; r1.yz = r2.xy * float2(2,2) + float2(-1,-1); r1.w = r1.w * r2.z + -0.980000019; r1.w = max(0, r1.w); r1.w = 50 * r1.w; r1.y = max(abs(r1.y), abs(r1.z)); r1.y = max(r1.y, r1.w); r1.z = cmp(r1.y < 1); r1.y = -0.899999976 + r1.y; r3.z = saturate(10 * r1.y); r4.xyz = shadowShifts[2].xyz + r0.xyz; r5.x = shadowShifts[2].w; r5.z = shadowShifts[0].y; r4.xyw = r5.xxz * r4.xyz; r1.yw = r4.xy * float2(2,2) + float2(-1,-1); r2.z = r4.z * r5.z + -0.980000019; r2.z = max(0, r2.z); r2.z = 50 * r2.z; r1.y = max(abs(r1.y), abs(r1.w)); r1.y = max(r1.y, r2.z); r1.w = cmp(r1.y < 1); r1.y = -0.899999976 + r1.y; r3.x = saturate(10 * r1.y); r5.xyz = shadowShifts[3].xyz + r0.xyz; r6.x = shadowShifts[3].w; r6.z = shadowShifts[0].z; r5.xyz = r6.xxz * r5.xyz; r4.xyz = r1.www ? r4.xyw : r5.xyz; r3.yw = float2(2,1); r1.yw = r1.ww ? r3.xy : float2(0,3); r2.xyz = r1.zzz ? r2.xyw : r4.xyz; r3.xz = r1.zz ? r3.zw : r1.yw; r1.y = r3.x; } else { r1.x = -0.699999988 + r1.x; r1.y = saturate(3.33333325 * r1.x); r2.xyz = r0.xyz; r3.z = 0; } r1.xz = (int2)v0.xy; r1.x = (int)r1.z ^ (int)r1.x; r1.x = (int)r1.x; r1.z = v0.x * v0.y; r1.x = r1.x * 3 + r1.z; r1.x = 10 * r1.x; sincos(r1.x, r1.x, r4.x); r5.xyzw = float4(2.5,2.5,2.5,2.5) * shadowDimensions.zzww; r4.xw = r4.xx; r4.yz = r1.xx; r4.xyzw = r4.xyzw * r5.xyzw; r1.xz = float2(0.0117830755,0.0117830755) * r4.xz; r5.xy = r4.xz * float2(0.0117830755,0.0117830755) + r2.xy; r3.x = -r4.y * -0.602219999 + r5.x; r3.y = r4.w * -0.602219999 + r5.y; r1.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r3.xyz, r2.z).x; r5.zw = r4.xz * float2(-0.371172935,-0.371172935) + r2.xy; r3.x = -r4.y * 0.867616475 + r5.z; r3.y = r4.w * 0.867616475 + r5.w; r2.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r3.xyz, r2.z).x; r1.w = r2.w + r1.w; r3.xy = float2(0.609989285,0.609989285) * r4.xz; r5.zw = r4.xz * float2(0.609989285,0.609989285) + r2.xy; r6.x = -r4.y * 0.431983501 + r5.z; r6.y = r4.w * 0.431983501 + r5.w; r6.z = r3.z; r2.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r6.xyz, r2.z).x; r1.w = r2.w + r1.w; r5.xyzw = float4(-0.371172935,-0.371172935,-0.465403467,-0.465403467) * r4.xzxz; r7.xy = r4.xz * float2(-0.465403467,-0.465403467) + r2.xy; r6.x = -r4.y * 0.156352609 + r7.x; r6.y = r4.w * 0.156352609 + r7.y; r2.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r6.xyz, r2.z).x; r1.w = r2.w + r1.w; r7.zw = r4.xz * float2(-0.562820256,-0.562820256) + r2.xy; r6.x = -r4.y * -0.825374782 + r7.z; r6.y = r4.w * -0.825374782 + r7.w; r2.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r6.xyz, r2.z).x; r1.w = r2.w + r1.w; r7.xyzw = float4(-0.562820256,-0.562820256,0.219455257,0.219455257) * r4.xzxz; r2.xy = r4.xz * float2(0.219455257,0.219455257) + r2.xy; r6.x = -r4.y * -0.122485265 + r2.x; r6.y = r4.w * -0.122485265 + r2.y; r2.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r6.xyz, r2.z).x; r1.w = r2.x + r1.w; r1.w = 0.166666672 * r1.w; r2.x = cmp(0 < r1.y); if (r2.x != 0) { r2.z = 1 + r3.z; r2.w = (int)r2.z; r3.zw = cmp((int2)r2.ww == int2(1,2)); r3.w = r3.w ? shadowShifts[0].y : shadowShifts[0].z; r6.z = r3.z ? shadowShifts[0].x : r3.w; r0.xyz = shadowShifts[r2.w].xyz + r0.xyz; r6.xy = shadowShifts[r2.w].ww; r8.xyz = r0.xyz * r6.xyz; r1.xz = r0.xy * r6.xy + r1.xz; r2.x = -r4.y * -0.602219999 + r1.x; r2.y = r4.w * -0.602219999 + r1.z; r0.z = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x; r1.xz = r0.xy * r6.xy + r5.xy; r2.x = -r4.y * 0.867616475 + r1.x; r2.y = r4.w * 0.867616475 + r1.z; r1.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x; r0.z = r1.x + r0.z; r1.xz = r0.xy * r6.xy + r3.xy; r2.x = -r4.y * 0.431983501 + r1.x; r2.y = r4.w * 0.431983501 + r1.z; r1.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x; r0.z = r1.x + r0.z; r1.xz = r0.xy * r6.xy + r5.zw; r2.x = -r4.y * 0.156352609 + r1.x; r2.y = r4.w * 0.156352609 + r1.z; r1.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x; r0.z = r1.x + r0.z; r1.xz = r0.xy * r6.xy + r7.xy; r2.x = -r4.y * -0.825374782 + r1.x; r2.y = r4.w * -0.825374782 + r1.z; r1.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x; r0.z = r1.x + r0.z; r0.xy = r0.xy * r6.xy + r7.zw; r2.x = -r4.y * -0.122485265 + r0.x; r2.y = r4.w * -0.122485265 + r0.y; r0.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x; r0.x = r0.z + r0.x; r2.xyz = cmp(r8.xyz >= float3(0,0,0)); r0.y = r2.y ? r2.x : 0; r0.y = r2.z ? r0.y : 0; r2.xyz = cmp(float3(1,1,1) >= r8.xyz); r0.z = r2.y ? r2.x : 0; r0.z = r2.z ? r0.z : 0; r0.y = (int)r0.z & (int)r0.y; r0.y = (int)r1.y & (int)r0.y; r0.x = r0.x * 0.166666672 + -r1.w; r1.w = r0.y * r0.x + r1.w; } r0.x = shadowFadeParam.x + r0.w; r0.x = saturate(shadowFadeParam.y * r0.x); r0.y = shadowFadeFarValue + -r1.w; o0.x = r0.x * r0.y + r1.w; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // using 3Dmigoto v1.2.71 on Fri Feb 02 18:02:44 2018 // // // Buffer Definitions: // // cbuffer $Globals // { // // float4 shadowProjMatrix0; // Offset: 0 Size: 16 // float4 shadowProjMatrix1; // Offset: 16 Size: 16 // float4 shadowProjMatrix2; // Offset: 32 Size: 16 // float4 shadowProjMatrix3; // Offset: 48 Size: 16 // float4 shadowFadeParam; // Offset: 64 Size: 16 // float shadowFadeFarValue; // Offset: 80 Size: 4 // float4 shadowDimensions; // Offset: 96 Size: 16 // float shadowNormalBias; // Offset: 112 Size: 4 [unused] // float4 shadowShifts[4]; // Offset: 128 Size: 64 // float4 shadowMapCubeDepthParam; // Offset: 192 Size: 16 [unused] // float4 projMatrixZ; // Offset: 208 Size: 16 // bool backscatterAttenuation; // Offset: 224 Size: 4 [unused] // float backscatterSpecularColor; // Offset: 228 Size: 4 [unused] // float4 lightColor; // Offset: 240 Size: 16 [unused] // float4 lightDir; // Offset: 256 Size: 16 [unused] // float4 projInvMatrix[4]; // Offset: 272 Size: 64 [unused] // float4 projInvMatrixZ; // Offset: 336 Size: 16 // float4x4 viewMatrix; // Offset: 352 Size: 64 [unused] // float4 projExtentsZ; // Offset: 416 Size: 16 [unused] // float4 projExtentsXY; // Offset: 432 Size: 16 [unused] // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // pointClampSampler sampler NA NA 0 1 // shadowMapArray sampler_c NA NA 1 1 // depthSampler texture float 2d 0 1 // shadowMapArrayTexture texture float4 2darray 1 1 // $Globals cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_POSITION 0 xyzw 0 POS float xy // TEXCOORD 0 xy 1 NONE float xy // TEXCOORD 1 xyzw 2 NONE float xyzw // TEXCOORD 2 xyz 3 NONE float // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_TARGET 0 x 0 TARGET float x // // Pixel Shader runs at sample frequency // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[22], dynamicIndexed dcl_sampler s0, mode_default dcl_sampler s1, mode_comparison dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2darray (float,float,float,float) t1 dcl_input_ps_siv linear noperspective sample v0.xy, position dcl_input_ps linear sample v1.xy dcl_input_ps linear sample v2.xyzw dcl_output o0.x dcl_temps 9 sample_l_indexable(texture2d)(float,float,float,float) r0.x, v1.xyxx, t0.xyzw, s0, l(0.000000) mad r0.xyzw, cb0[21].xyzw, r0.xxxx, v2.xyzw div r0.xyz, r0.xyzx, r0.wwww mov r0.w, l(1.000000) dp4 r0.w, r0.xyzw, cb0[13].xyzw mul r1.xyz, r0.yyyy, cb0[1].xyzx mad r1.xyz, r0.xxxx, cb0[0].xyzx, r1.xyzx mad r0.xyz, r0.zzzz, cb0[2].xyzx, r1.xyzx add r0.xyz, r0.xyzx, cb0[3].xyzx mad r1.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000) add r1.z, r0.z, l(-0.980000) max r1.z, r1.z, l(0.000000) mul r1.z, r1.z, l(50.000000) max r1.x, |r1.y|, |r1.x| max r1.x, r1.z, r1.x ge r1.y, r1.x, l(1.000000) if_nz r1.y add r1.yzw, r0.xxyz, cb0[9].xxyz mov r2.x, cb0[9].w mov r2.z, cb0[8].x mul r2.xyw, r1.yzyw, r2.xxxz mad r1.yz, r2.xxyx, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000) mad r1.w, r1.w, r2.z, l(-0.980000) max r1.w, r1.w, l(0.000000) mul r1.w, r1.w, l(50.000000) max r1.y, |r1.z|, |r1.y| max r1.y, r1.w, r1.y lt r1.z, r1.y, l(1.000000) add r1.y, r1.y, l(-0.900000) mul_sat r3.z, r1.y, l(10.000000) add r4.xyz, r0.xyzx, cb0[10].xyzx mov r5.x, cb0[10].w mov r5.z, cb0[8].y mul r4.xyw, r4.xyxz, r5.xxxz mad r1.yw, r4.xxxy, l(0.000000, 2.000000, 0.000000, 2.000000), l(0.000000, -1.000000, 0.000000, -1.000000) mad r2.z, r4.z, r5.z, l(-0.980000) max r2.z, r2.z, l(0.000000) mul r2.z, r2.z, l(50.000000) max r1.y, |r1.w|, |r1.y| max r1.y, r2.z, r1.y lt r1.w, r1.y, l(1.000000) add r1.y, r1.y, l(-0.900000) mul_sat r3.x, r1.y, l(10.000000) add r5.xyz, r0.xyzx, cb0[11].xyzx mov r6.x, cb0[11].w mov r6.z, cb0[8].z mul r5.xyz, r5.xyzx, r6.xxzx movc r4.xyz, r1.wwww, r4.xywx, r5.xyzx mov r3.yw, l(0,2.000000,0,1.000000) movc r1.yw, r1.wwww, r3.xxxy, l(0,0,0,3.000000) movc r2.xyz, r1.zzzz, r2.xywx, r4.xyzx movc r3.xz, r1.zzzz, r3.zzwz, r1.yywy mov r1.y, r3.x else add r1.x, r1.x, l(-0.700000) mul_sat r1.y, r1.x, l(3.33333325) mov r2.xyz, r0.xyzx mov r3.z, l(0) endif ftoi r1.xz, v0.xxyx xor r1.x, r1.z, r1.x itof r1.x, r1.x mul r1.z, v0.y, v0.x mad r1.x, r1.x, l(3.000000), r1.z mul r1.x, r1.x, l(10.000000) sincos r1.x, r4.x, r1.x mul r5.xyzw, cb0[6].zzww, l(2.500000, 2.500000, 2.500000, 2.500000) mov r4.xw, r4.xxxx mov r4.yz, r1.xxxx mul r4.xyzw, r5.xyzw, r4.xyzw mul r1.xz, r4.xxzx, l(0.0117830755, 0.000000, 0.0117830755, 0.000000) mad r5.xy, r4.xzxx, l(0.0117830755, 0.0117830755, 0.000000, 0.000000), r2.xyxx mad r3.x, -r4.y, l(-0.602220), r5.x mad r3.y, r4.w, l(-0.602220), r5.y sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.w, r3.xyzx, t1.xxxx, s1, r2.z mad r5.zw, r4.xxxz, l(0.000000, 0.000000, -0.371172935, -0.371172935), r2.xxxy mad r3.x, -r4.y, l(0.867616475), r5.z mad r3.y, r4.w, l(0.867616475), r5.w sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.w, r3.xyzx, t1.xxxx, s1, r2.z add r1.w, r1.w, r2.w mul r3.xy, r4.xzxx, l(0.609989285, 0.609989285, 0.000000, 0.000000) mad r5.zw, r4.xxxz, l(0.000000, 0.000000, 0.609989285, 0.609989285), r2.xxxy mad r6.x, -r4.y, l(0.431983501), r5.z mad r6.y, r4.w, l(0.431983501), r5.w mov r6.z, r3.z sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.w, r6.xyzx, t1.xxxx, s1, r2.z add r1.w, r1.w, r2.w mul r5.xyzw, r4.xzxz, l(-0.371172935, -0.371172935, -0.465403467, -0.465403467) mad r7.xy, r4.xzxx, l(-0.465403467, -0.465403467, 0.000000, 0.000000), r2.xyxx mad r6.x, -r4.y, l(0.156352609), r7.x mad r6.y, r4.w, l(0.156352609), r7.y sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.w, r6.xyzx, t1.xxxx, s1, r2.z add r1.w, r1.w, r2.w mad r7.zw, r4.xxxz, l(0.000000, 0.000000, -0.562820256, -0.562820256), r2.xxxy mad r6.x, -r4.y, l(-0.825374782), r7.z mad r6.y, r4.w, l(-0.825374782), r7.w sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.w, r6.xyzx, t1.xxxx, s1, r2.z add r1.w, r1.w, r2.w mul r7.xyzw, r4.xzxz, l(-0.562820256, -0.562820256, 0.219455257, 0.219455257) mad r2.xy, r4.xzxx, l(0.219455257, 0.219455257, 0.000000, 0.000000), r2.xyxx mad r6.x, -r4.y, l(-0.122485265), r2.x mad r6.y, r4.w, l(-0.122485265), r2.y sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.x, r6.xyzx, t1.xxxx, s1, r2.z add r1.w, r1.w, r2.x mul r1.w, r1.w, l(0.166666672) lt r2.x, l(0.000000), r1.y if_nz r2.x add r2.z, r3.z, l(1.000000) ftoi r2.w, r2.z ieq r3.zw, r2.wwww, l(0, 0, 1, 2) movc r3.w, r3.w, cb0[8].y, cb0[8].z movc r6.z, r3.z, cb0[8].x, r3.w add r0.xyz, r0.xyzx, cb0[r2.w + 8].xyzx mov r6.xy, cb0[r2.w + 8].wwww mul r8.xyz, r6.xyzx, r0.xyzx mad r1.xz, r0.xxyx, r6.xxyx, r1.xxzx mad r2.x, -r4.y, l(-0.602220), r1.x mad r2.y, r4.w, l(-0.602220), r1.z sample_c_lz_indexable(texture2darray)(float,float,float,float) r0.z, r2.xyzx, t1.xxxx, s1, r8.z mad r1.xz, r0.xxyx, r6.xxyx, r5.xxyx mad r2.x, -r4.y, l(0.867616475), r1.x mad r2.y, r4.w, l(0.867616475), r1.z sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.x, r2.xyzx, t1.xxxx, s1, r8.z add r0.z, r0.z, r1.x mad r1.xz, r0.xxyx, r6.xxyx, r3.xxyx mad r2.x, -r4.y, l(0.431983501), r1.x mad r2.y, r4.w, l(0.431983501), r1.z sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.x, r2.xyzx, t1.xxxx, s1, r8.z add r0.z, r0.z, r1.x mad r1.xz, r0.xxyx, r6.xxyx, r5.zzwz mad r2.x, -r4.y, l(0.156352609), r1.x mad r2.y, r4.w, l(0.156352609), r1.z sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.x, r2.xyzx, t1.xxxx, s1, r8.z add r0.z, r0.z, r1.x mad r1.xz, r0.xxyx, r6.xxyx, r7.xxyx mad r2.x, -r4.y, l(-0.825374782), r1.x mad r2.y, r4.w, l(-0.825374782), r1.z sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.x, r2.xyzx, t1.xxxx, s1, r8.z add r0.z, r0.z, r1.x mad r0.xy, r0.xyxx, r6.xyxx, r7.zwzz mad r2.x, -r4.y, l(-0.122485265), r0.x mad r2.y, r4.w, l(-0.122485265), r0.y sample_c_lz_indexable(texture2darray)(float,float,float,float) r0.x, r2.xyzx, t1.xxxx, s1, r8.z add r0.x, r0.x, r0.z ge r2.xyz, r8.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000) and r0.y, r2.y, r2.x and r0.y, r2.z, r0.y ge r2.xyz, l(1.000000, 1.000000, 1.000000, 0.000000), r8.xyzx and r0.z, r2.y, r2.x and r0.z, r2.z, r0.z and r0.y, r0.z, r0.y and r0.y, r1.y, r0.y mad r0.x, r0.x, l(0.166666672), -r1.w mad r1.w, r0.y, r0.x, r1.w endif add r0.x, r0.w, cb0[4].x mul_sat r0.x, r0.x, cb0[4].y add r0.y, -r1.w, cb0[5].x mad o0.x, r0.x, r0.y, r1.w ret // Approximately 160 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] I think I should do something right after "r0.xyz = r0.xyz / r0.www;" or right before "r1.xyz = r0.xxx * shadowProjMatrix0.xyz + r1.xyz;", but I can't figure out what yet. I tried some typical formulas, but I couldn't even make it OK at zero convergence. Any ideas, maybe from other similar shaders? By the way, one of the specular reflections shaders affects these shadows if I don't make a shader override to only use it with the reflections PS. If I let it affect the shadows PS, they are fixed to full depth, so only OK at 0 convergence. This is the corresponding VS with reflections fix: [code] //Surface reflections 2, and shadows. // ---- Created with 3Dmigoto v1.2.71 on Fri Feb 02 19:35:29 2018 cbuffer _Globals : register(b0) { float4 shadowProjMatrix0 : packoffset(c0); float4 shadowProjMatrix1 : packoffset(c1); float4 shadowProjMatrix2 : packoffset(c2); float4 shadowProjMatrix3 : packoffset(c3); float4 shadowFadeParam : packoffset(c4); float shadowFadeFarValue : packoffset(c5); float4 shadowDimensions : packoffset(c6); float shadowNormalBias : packoffset(c7); float4 shadowShifts[4] : packoffset(c8); float4 shadowMapCubeDepthParam : packoffset(c12); float4 projMatrixZ : packoffset(c13); bool backscatterAttenuation : packoffset(c14); float backscatterSpecularColor : packoffset(c14.y); float4 lightColor : packoffset(c15); float4 lightDir : packoffset(c16); float4 projInvMatrix[4] : packoffset(c17); float4 projInvMatrixZ : packoffset(c21); float4x4 viewMatrix : packoffset(c22); float4 projExtentsZ : packoffset(c26); float4 projExtentsXY : packoffset(c27); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float3 v0 : POSITION0, float2 v1 : TEXCOORD0, out float4 o0 : SV_POSITION0, out float4 o1 : TEXCOORD0, out float4 o2 : TEXCOORD1, out float3 o3 : TEXCOORD2) { float4 r0; uint4 bitmask, uiDest; float4 fDest; float4 stereo = StereoParams.Load(0); o0.xyz = v0.xyz; o0.w = 1; o1.xy = v1.xy; r0.xyzw = projInvMatrix[1].xyzw * v0.yyyy; v0.x-=stereo.x; r0.xyzw = v0.xxxx * projInvMatrix[0].xyzw + r0.xyzw; o2.xyzw = projInvMatrix[3].xyzw + r0.xyzw; o3.xy = projExtentsXY.zw * v0.xy; o3.z = 1; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // using 3Dmigoto v1.2.71 on Fri Feb 02 19:35:29 2018 // // // Buffer Definitions: // // cbuffer $Globals // { // // float4 shadowProjMatrix0; // Offset: 0 Size: 16 [unused] // float4 shadowProjMatrix1; // Offset: 16 Size: 16 [unused] // float4 shadowProjMatrix2; // Offset: 32 Size: 16 [unused] // float4 shadowProjMatrix3; // Offset: 48 Size: 16 [unused] // float4 shadowFadeParam; // Offset: 64 Size: 16 [unused] // float shadowFadeFarValue; // Offset: 80 Size: 4 [unused] // float4 shadowDimensions; // Offset: 96 Size: 16 [unused] // float shadowNormalBias; // Offset: 112 Size: 4 [unused] // float4 shadowShifts[4]; // Offset: 128 Size: 64 [unused] // float4 shadowMapCubeDepthParam; // Offset: 192 Size: 16 [unused] // float4 projMatrixZ; // Offset: 208 Size: 16 [unused] // bool backscatterAttenuation; // Offset: 224 Size: 4 [unused] // float backscatterSpecularColor; // Offset: 228 Size: 4 [unused] // float4 lightColor; // Offset: 240 Size: 16 [unused] // float4 lightDir; // Offset: 256 Size: 16 [unused] // float4 projInvMatrix[4]; // Offset: 272 Size: 64 // float4 projInvMatrixZ; // Offset: 336 Size: 16 [unused] // float4x4 viewMatrix; // Offset: 352 Size: 64 [unused] // float4 projExtentsZ; // Offset: 416 Size: 16 [unused] // float4 projExtentsXY; // Offset: 432 Size: 16 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // $Globals cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyz 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 // TEXCOORD 1 xyzw 2 NONE float xyzw // TEXCOORD 2 xyz 3 NONE float xyz // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[28], immediateIndexed dcl_input v0.xyz dcl_input v1.xy dcl_output_siv o0.xyzw, position dcl_output o1.xy dcl_output o2.xyzw dcl_output o3.xyz dcl_temps 1 mov o0.xyz, v0.xyzx mov o0.w, l(1.000000) mov o1.xy, v1.xyxx mul r0.xyzw, v0.yyyy, cb0[18].xyzw mad r0.xyzw, v0.xxxx, cb0[17].xyzw, r0.xyzw add o2.xyzw, r0.xyzw, cb0[20].xyzw mul o3.xy, v0.xyxx, cb0[27].zwzz mov o3.z, l(1.000000) ret // Approximately 9 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] It's basically the same thing I did for Tekken 7 specular reflections. This benchmark has some other problems, like grass and some smoke that only appear in the right eye (only in "high" settings), ice decals that are at screen depth, etc. But I want to get shadows right first. I've fixed the skybox and specular reflections for now (and made a DoF toggle).
In the FFXV benchmark, I'm having trouble with shadows (screen depth by default). This is the pixel shader:

//Environment shadows.
// ---- Created with 3Dmigoto v1.2.71 on Fri Feb 02 18:02:44 2018

cbuffer _Globals : register(b0)
{
float4 shadowProjMatrix0 : packoffset(c0);
float4 shadowProjMatrix1 : packoffset(c1);
float4 shadowProjMatrix2 : packoffset(c2);
float4 shadowProjMatrix3 : packoffset(c3);
float4 shadowFadeParam : packoffset(c4);
float shadowFadeFarValue : packoffset(c5);
float4 shadowDimensions : packoffset(c6);
float shadowNormalBias : packoffset(c7);
float4 shadowShifts[4] : packoffset(c8);
float4 shadowMapCubeDepthParam : packoffset(c12);
float4 projMatrixZ : packoffset(c13);
bool backscatterAttenuation : packoffset(c14);
float backscatterSpecularColor : packoffset(c14.y);
float4 lightColor : packoffset(c15);
float4 lightDir : packoffset(c16);
float4 projInvMatrix[4] : packoffset(c17);
float4 projInvMatrixZ : packoffset(c21);
float4x4 viewMatrix : packoffset(c22);
float4 projExtentsZ : packoffset(c26);
float4 projExtentsXY : packoffset(c27);
}

SamplerState pointClampSampler_s : register(s0);
SamplerComparisonState shadowMapArray_s : register(s1);
Texture2D<float> depthSampler : register(t0);
Texture2DArray<float4> shadowMapArrayTexture : register(t1);


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


void main(
float4 v0 : SV_POSITION0,
linear sample float4 v1 : TEXCOORD0,
linear sample float4 v2 : TEXCOORD1,
float3 v3 : TEXCOORD2,
out float o0 : SV_TARGET0)
{
float4 r0,r1,r2,r3,r4,r5,r6,r7,r8;
uint4 bitmask, uiDest;
float4 fDest;

float4 stereo = StereoParams.Load(0);

r0.x = depthSampler.SampleLevel(pointClampSampler_s, v1.xy, 0).x;
r0.xyzw = projInvMatrixZ.xyzw * r0.xxxx + v2.xyzw;
r0.xyz = r0.xyz / r0.www;

r0.w = 1;
r0.w = dot(r0.xyzw, projMatrixZ.xyzw);
r1.xyz = shadowProjMatrix1.xyz * r0.yyy;

r1.xyz = r0.xxx * shadowProjMatrix0.xyz + r1.xyz;
r0.xyz = r0.zzz * shadowProjMatrix2.xyz + r1.xyz;
r0.xyz = shadowProjMatrix3.xyz + r0.xyz;
r1.xy = r0.xy * float2(2,2) + float2(-1,-1);
r1.z = -0.980000019 + r0.z;
r1.z = max(0, r1.z);
r1.z = 50 * r1.z;
r1.x = max(abs(r1.x), abs(r1.y));
r1.x = max(r1.x, r1.z);
r1.y = cmp(r1.x >= 1);
if (r1.y != 0) {
r1.yzw = shadowShifts[1].xyz + r0.xyz;
r2.x = shadowShifts[1].w;
r2.z = shadowShifts[0].x;
r2.xyw = r2.xxz * r1.yzw;
r1.yz = r2.xy * float2(2,2) + float2(-1,-1);
r1.w = r1.w * r2.z + -0.980000019;
r1.w = max(0, r1.w);
r1.w = 50 * r1.w;
r1.y = max(abs(r1.y), abs(r1.z));
r1.y = max(r1.y, r1.w);
r1.z = cmp(r1.y < 1);
r1.y = -0.899999976 + r1.y;
r3.z = saturate(10 * r1.y);
r4.xyz = shadowShifts[2].xyz + r0.xyz;
r5.x = shadowShifts[2].w;
r5.z = shadowShifts[0].y;
r4.xyw = r5.xxz * r4.xyz;
r1.yw = r4.xy * float2(2,2) + float2(-1,-1);
r2.z = r4.z * r5.z + -0.980000019;
r2.z = max(0, r2.z);
r2.z = 50 * r2.z;
r1.y = max(abs(r1.y), abs(r1.w));
r1.y = max(r1.y, r2.z);
r1.w = cmp(r1.y < 1);
r1.y = -0.899999976 + r1.y;
r3.x = saturate(10 * r1.y);
r5.xyz = shadowShifts[3].xyz + r0.xyz;
r6.x = shadowShifts[3].w;
r6.z = shadowShifts[0].z;
r5.xyz = r6.xxz * r5.xyz;
r4.xyz = r1.www ? r4.xyw : r5.xyz;
r3.yw = float2(2,1);
r1.yw = r1.ww ? r3.xy : float2(0,3);
r2.xyz = r1.zzz ? r2.xyw : r4.xyz;
r3.xz = r1.zz ? r3.zw : r1.yw;
r1.y = r3.x;
} else {
r1.x = -0.699999988 + r1.x;
r1.y = saturate(3.33333325 * r1.x);
r2.xyz = r0.xyz;
r3.z = 0;
}
r1.xz = (int2)v0.xy;
r1.x = (int)r1.z ^ (int)r1.x;
r1.x = (int)r1.x;
r1.z = v0.x * v0.y;
r1.x = r1.x * 3 + r1.z;
r1.x = 10 * r1.x;
sincos(r1.x, r1.x, r4.x);
r5.xyzw = float4(2.5,2.5,2.5,2.5) * shadowDimensions.zzww;
r4.xw = r4.xx;
r4.yz = r1.xx;
r4.xyzw = r4.xyzw * r5.xyzw;
r1.xz = float2(0.0117830755,0.0117830755) * r4.xz;
r5.xy = r4.xz * float2(0.0117830755,0.0117830755) + r2.xy;
r3.x = -r4.y * -0.602219999 + r5.x;
r3.y = r4.w * -0.602219999 + r5.y;
r1.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r3.xyz, r2.z).x;
r5.zw = r4.xz * float2(-0.371172935,-0.371172935) + r2.xy;
r3.x = -r4.y * 0.867616475 + r5.z;
r3.y = r4.w * 0.867616475 + r5.w;
r2.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r3.xyz, r2.z).x;
r1.w = r2.w + r1.w;
r3.xy = float2(0.609989285,0.609989285) * r4.xz;
r5.zw = r4.xz * float2(0.609989285,0.609989285) + r2.xy;
r6.x = -r4.y * 0.431983501 + r5.z;
r6.y = r4.w * 0.431983501 + r5.w;
r6.z = r3.z;
r2.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r6.xyz, r2.z).x;
r1.w = r2.w + r1.w;
r5.xyzw = float4(-0.371172935,-0.371172935,-0.465403467,-0.465403467) * r4.xzxz;
r7.xy = r4.xz * float2(-0.465403467,-0.465403467) + r2.xy;
r6.x = -r4.y * 0.156352609 + r7.x;
r6.y = r4.w * 0.156352609 + r7.y;
r2.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r6.xyz, r2.z).x;
r1.w = r2.w + r1.w;
r7.zw = r4.xz * float2(-0.562820256,-0.562820256) + r2.xy;
r6.x = -r4.y * -0.825374782 + r7.z;
r6.y = r4.w * -0.825374782 + r7.w;
r2.w = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r6.xyz, r2.z).x;
r1.w = r2.w + r1.w;
r7.xyzw = float4(-0.562820256,-0.562820256,0.219455257,0.219455257) * r4.xzxz;
r2.xy = r4.xz * float2(0.219455257,0.219455257) + r2.xy;
r6.x = -r4.y * -0.122485265 + r2.x;
r6.y = r4.w * -0.122485265 + r2.y;
r2.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r6.xyz, r2.z).x;
r1.w = r2.x + r1.w;
r1.w = 0.166666672 * r1.w;
r2.x = cmp(0 < r1.y);
if (r2.x != 0) {
r2.z = 1 + r3.z;
r2.w = (int)r2.z;
r3.zw = cmp((int2)r2.ww == int2(1,2));
r3.w = r3.w ? shadowShifts[0].y : shadowShifts[0].z;
r6.z = r3.z ? shadowShifts[0].x : r3.w;
r0.xyz = shadowShifts[r2.w].xyz + r0.xyz;
r6.xy = shadowShifts[r2.w].ww;
r8.xyz = r0.xyz * r6.xyz;
r1.xz = r0.xy * r6.xy + r1.xz;
r2.x = -r4.y * -0.602219999 + r1.x;
r2.y = r4.w * -0.602219999 + r1.z;
r0.z = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x;
r1.xz = r0.xy * r6.xy + r5.xy;
r2.x = -r4.y * 0.867616475 + r1.x;
r2.y = r4.w * 0.867616475 + r1.z;
r1.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x;
r0.z = r1.x + r0.z;
r1.xz = r0.xy * r6.xy + r3.xy;
r2.x = -r4.y * 0.431983501 + r1.x;
r2.y = r4.w * 0.431983501 + r1.z;
r1.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x;
r0.z = r1.x + r0.z;
r1.xz = r0.xy * r6.xy + r5.zw;
r2.x = -r4.y * 0.156352609 + r1.x;
r2.y = r4.w * 0.156352609 + r1.z;
r1.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x;
r0.z = r1.x + r0.z;
r1.xz = r0.xy * r6.xy + r7.xy;
r2.x = -r4.y * -0.825374782 + r1.x;
r2.y = r4.w * -0.825374782 + r1.z;
r1.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x;
r0.z = r1.x + r0.z;
r0.xy = r0.xy * r6.xy + r7.zw;
r2.x = -r4.y * -0.122485265 + r0.x;
r2.y = r4.w * -0.122485265 + r0.y;
r0.x = shadowMapArrayTexture.SampleCmpLevelZero(shadowMapArray_s, r2.xyz, r8.z).x;
r0.x = r0.z + r0.x;
r2.xyz = cmp(r8.xyz >= float3(0,0,0));
r0.y = r2.y ? r2.x : 0;
r0.y = r2.z ? r0.y : 0;
r2.xyz = cmp(float3(1,1,1) >= r8.xyz);
r0.z = r2.y ? r2.x : 0;
r0.z = r2.z ? r0.z : 0;
r0.y = (int)r0.z & (int)r0.y;
r0.y = (int)r1.y & (int)r0.y;
r0.x = r0.x * 0.166666672 + -r1.w;
r1.w = r0.y * r0.x + r1.w;
}
r0.x = shadowFadeParam.x + r0.w;
r0.x = saturate(shadowFadeParam.y * r0.x);
r0.y = shadowFadeFarValue + -r1.w;
o0.x = r0.x * r0.y + r1.w;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
// using 3Dmigoto v1.2.71 on Fri Feb 02 18:02:44 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
// float4 shadowProjMatrix0; // Offset: 0 Size: 16
// float4 shadowProjMatrix1; // Offset: 16 Size: 16
// float4 shadowProjMatrix2; // Offset: 32 Size: 16
// float4 shadowProjMatrix3; // Offset: 48 Size: 16
// float4 shadowFadeParam; // Offset: 64 Size: 16
// float shadowFadeFarValue; // Offset: 80 Size: 4
// float4 shadowDimensions; // Offset: 96 Size: 16
// float shadowNormalBias; // Offset: 112 Size: 4 [unused]
// float4 shadowShifts[4]; // Offset: 128 Size: 64
// float4 shadowMapCubeDepthParam; // Offset: 192 Size: 16 [unused]
// float4 projMatrixZ; // Offset: 208 Size: 16
// bool backscatterAttenuation; // Offset: 224 Size: 4 [unused]
// float backscatterSpecularColor; // Offset: 228 Size: 4 [unused]
// float4 lightColor; // Offset: 240 Size: 16 [unused]
// float4 lightDir; // Offset: 256 Size: 16 [unused]
// float4 projInvMatrix[4]; // Offset: 272 Size: 64 [unused]
// float4 projInvMatrixZ; // Offset: 336 Size: 16
// float4x4 viewMatrix; // Offset: 352 Size: 64 [unused]
// float4 projExtentsZ; // Offset: 416 Size: 16 [unused]
// float4 projExtentsXY; // Offset: 432 Size: 16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// pointClampSampler sampler NA NA 0 1
// shadowMapArray sampler_c NA NA 1 1
// depthSampler texture float 2d 0 1
// shadowMapArrayTexture texture float4 2darray 1 1
// $Globals cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xy
// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 1 xyzw 2 NONE float xyzw
// TEXCOORD 2 xyz 3 NONE float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 x 0 TARGET float x
//
// Pixel Shader runs at sample frequency
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[22], dynamicIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2darray (float,float,float,float) t1
dcl_input_ps_siv linear noperspective sample v0.xy, position
dcl_input_ps linear sample v1.xy
dcl_input_ps linear sample v2.xyzw
dcl_output o0.x
dcl_temps 9
sample_l_indexable(texture2d)(float,float,float,float) r0.x, v1.xyxx, t0.xyzw, s0, l(0.000000)
mad r0.xyzw, cb0[21].xyzw, r0.xxxx, v2.xyzw
div r0.xyz, r0.xyzx, r0.wwww
mov r0.w, l(1.000000)
dp4 r0.w, r0.xyzw, cb0[13].xyzw
mul r1.xyz, r0.yyyy, cb0[1].xyzx
mad r1.xyz, r0.xxxx, cb0[0].xyzx, r1.xyzx
mad r0.xyz, r0.zzzz, cb0[2].xyzx, r1.xyzx
add r0.xyz, r0.xyzx, cb0[3].xyzx
mad r1.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
add r1.z, r0.z, l(-0.980000)
max r1.z, r1.z, l(0.000000)
mul r1.z, r1.z, l(50.000000)
max r1.x, |r1.y|, |r1.x|
max r1.x, r1.z, r1.x
ge r1.y, r1.x, l(1.000000)
if_nz r1.y
add r1.yzw, r0.xxyz, cb0[9].xxyz
mov r2.x, cb0[9].w
mov r2.z, cb0[8].x
mul r2.xyw, r1.yzyw, r2.xxxz
mad r1.yz, r2.xxyx, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
mad r1.w, r1.w, r2.z, l(-0.980000)
max r1.w, r1.w, l(0.000000)
mul r1.w, r1.w, l(50.000000)
max r1.y, |r1.z|, |r1.y|
max r1.y, r1.w, r1.y
lt r1.z, r1.y, l(1.000000)
add r1.y, r1.y, l(-0.900000)
mul_sat r3.z, r1.y, l(10.000000)
add r4.xyz, r0.xyzx, cb0[10].xyzx
mov r5.x, cb0[10].w
mov r5.z, cb0[8].y
mul r4.xyw, r4.xyxz, r5.xxxz
mad r1.yw, r4.xxxy, l(0.000000, 2.000000, 0.000000, 2.000000), l(0.000000, -1.000000, 0.000000, -1.000000)
mad r2.z, r4.z, r5.z, l(-0.980000)
max r2.z, r2.z, l(0.000000)
mul r2.z, r2.z, l(50.000000)
max r1.y, |r1.w|, |r1.y|
max r1.y, r2.z, r1.y
lt r1.w, r1.y, l(1.000000)
add r1.y, r1.y, l(-0.900000)
mul_sat r3.x, r1.y, l(10.000000)
add r5.xyz, r0.xyzx, cb0[11].xyzx
mov r6.x, cb0[11].w
mov r6.z, cb0[8].z
mul r5.xyz, r5.xyzx, r6.xxzx
movc r4.xyz, r1.wwww, r4.xywx, r5.xyzx
mov r3.yw, l(0,2.000000,0,1.000000)
movc r1.yw, r1.wwww, r3.xxxy, l(0,0,0,3.000000)
movc r2.xyz, r1.zzzz, r2.xywx, r4.xyzx
movc r3.xz, r1.zzzz, r3.zzwz, r1.yywy
mov r1.y, r3.x
else
add r1.x, r1.x, l(-0.700000)
mul_sat r1.y, r1.x, l(3.33333325)
mov r2.xyz, r0.xyzx
mov r3.z, l(0)
endif
ftoi r1.xz, v0.xxyx
xor r1.x, r1.z, r1.x
itof r1.x, r1.x
mul r1.z, v0.y, v0.x
mad r1.x, r1.x, l(3.000000), r1.z
mul r1.x, r1.x, l(10.000000)
sincos r1.x, r4.x, r1.x
mul r5.xyzw, cb0[6].zzww, l(2.500000, 2.500000, 2.500000, 2.500000)
mov r4.xw, r4.xxxx
mov r4.yz, r1.xxxx
mul r4.xyzw, r5.xyzw, r4.xyzw
mul r1.xz, r4.xxzx, l(0.0117830755, 0.000000, 0.0117830755, 0.000000)
mad r5.xy, r4.xzxx, l(0.0117830755, 0.0117830755, 0.000000, 0.000000), r2.xyxx
mad r3.x, -r4.y, l(-0.602220), r5.x
mad r3.y, r4.w, l(-0.602220), r5.y
sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.w, r3.xyzx, t1.xxxx, s1, r2.z
mad r5.zw, r4.xxxz, l(0.000000, 0.000000, -0.371172935, -0.371172935), r2.xxxy
mad r3.x, -r4.y, l(0.867616475), r5.z
mad r3.y, r4.w, l(0.867616475), r5.w
sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.w, r3.xyzx, t1.xxxx, s1, r2.z
add r1.w, r1.w, r2.w
mul r3.xy, r4.xzxx, l(0.609989285, 0.609989285, 0.000000, 0.000000)
mad r5.zw, r4.xxxz, l(0.000000, 0.000000, 0.609989285, 0.609989285), r2.xxxy
mad r6.x, -r4.y, l(0.431983501), r5.z
mad r6.y, r4.w, l(0.431983501), r5.w
mov r6.z, r3.z
sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.w, r6.xyzx, t1.xxxx, s1, r2.z
add r1.w, r1.w, r2.w
mul r5.xyzw, r4.xzxz, l(-0.371172935, -0.371172935, -0.465403467, -0.465403467)
mad r7.xy, r4.xzxx, l(-0.465403467, -0.465403467, 0.000000, 0.000000), r2.xyxx
mad r6.x, -r4.y, l(0.156352609), r7.x
mad r6.y, r4.w, l(0.156352609), r7.y
sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.w, r6.xyzx, t1.xxxx, s1, r2.z
add r1.w, r1.w, r2.w
mad r7.zw, r4.xxxz, l(0.000000, 0.000000, -0.562820256, -0.562820256), r2.xxxy
mad r6.x, -r4.y, l(-0.825374782), r7.z
mad r6.y, r4.w, l(-0.825374782), r7.w
sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.w, r6.xyzx, t1.xxxx, s1, r2.z
add r1.w, r1.w, r2.w
mul r7.xyzw, r4.xzxz, l(-0.562820256, -0.562820256, 0.219455257, 0.219455257)
mad r2.xy, r4.xzxx, l(0.219455257, 0.219455257, 0.000000, 0.000000), r2.xyxx
mad r6.x, -r4.y, l(-0.122485265), r2.x
mad r6.y, r4.w, l(-0.122485265), r2.y
sample_c_lz_indexable(texture2darray)(float,float,float,float) r2.x, r6.xyzx, t1.xxxx, s1, r2.z
add r1.w, r1.w, r2.x
mul r1.w, r1.w, l(0.166666672)
lt r2.x, l(0.000000), r1.y
if_nz r2.x
add r2.z, r3.z, l(1.000000)
ftoi r2.w, r2.z
ieq r3.zw, r2.wwww, l(0, 0, 1, 2)
movc r3.w, r3.w, cb0[8].y, cb0[8].z
movc r6.z, r3.z, cb0[8].x, r3.w
add r0.xyz, r0.xyzx, cb0[r2.w + 8].xyzx
mov r6.xy, cb0[r2.w + 8].wwww
mul r8.xyz, r6.xyzx, r0.xyzx
mad r1.xz, r0.xxyx, r6.xxyx, r1.xxzx
mad r2.x, -r4.y, l(-0.602220), r1.x
mad r2.y, r4.w, l(-0.602220), r1.z
sample_c_lz_indexable(texture2darray)(float,float,float,float) r0.z, r2.xyzx, t1.xxxx, s1, r8.z
mad r1.xz, r0.xxyx, r6.xxyx, r5.xxyx
mad r2.x, -r4.y, l(0.867616475), r1.x
mad r2.y, r4.w, l(0.867616475), r1.z
sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.x, r2.xyzx, t1.xxxx, s1, r8.z
add r0.z, r0.z, r1.x
mad r1.xz, r0.xxyx, r6.xxyx, r3.xxyx
mad r2.x, -r4.y, l(0.431983501), r1.x
mad r2.y, r4.w, l(0.431983501), r1.z
sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.x, r2.xyzx, t1.xxxx, s1, r8.z
add r0.z, r0.z, r1.x
mad r1.xz, r0.xxyx, r6.xxyx, r5.zzwz
mad r2.x, -r4.y, l(0.156352609), r1.x
mad r2.y, r4.w, l(0.156352609), r1.z
sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.x, r2.xyzx, t1.xxxx, s1, r8.z
add r0.z, r0.z, r1.x
mad r1.xz, r0.xxyx, r6.xxyx, r7.xxyx
mad r2.x, -r4.y, l(-0.825374782), r1.x
mad r2.y, r4.w, l(-0.825374782), r1.z
sample_c_lz_indexable(texture2darray)(float,float,float,float) r1.x, r2.xyzx, t1.xxxx, s1, r8.z
add r0.z, r0.z, r1.x
mad r0.xy, r0.xyxx, r6.xyxx, r7.zwzz
mad r2.x, -r4.y, l(-0.122485265), r0.x
mad r2.y, r4.w, l(-0.122485265), r0.y
sample_c_lz_indexable(texture2darray)(float,float,float,float) r0.x, r2.xyzx, t1.xxxx, s1, r8.z
add r0.x, r0.x, r0.z
ge r2.xyz, r8.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r0.y, r2.y, r2.x
and r0.y, r2.z, r0.y
ge r2.xyz, l(1.000000, 1.000000, 1.000000, 0.000000), r8.xyzx
and r0.z, r2.y, r2.x
and r0.z, r2.z, r0.z
and r0.y, r0.z, r0.y
and r0.y, r1.y, r0.y
mad r0.x, r0.x, l(0.166666672), -r1.w
mad r1.w, r0.y, r0.x, r1.w
endif
add r0.x, r0.w, cb0[4].x
mul_sat r0.x, r0.x, cb0[4].y
add r0.y, -r1.w, cb0[5].x
mad o0.x, r0.x, r0.y, r1.w
ret
// Approximately 160 instruction slots used

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


I think I should do something right after "r0.xyz = r0.xyz / r0.www;" or right before "r1.xyz = r0.xxx * shadowProjMatrix0.xyz + r1.xyz;", but I can't figure out what yet. I tried some typical formulas, but I couldn't even make it OK at zero convergence.

Any ideas, maybe from other similar shaders?

By the way, one of the specular reflections shaders affects these shadows if I don't make a shader override to only use it with the reflections PS. If I let it affect the shadows PS, they are fixed to full depth, so only OK at 0 convergence. This is the corresponding VS with reflections fix:

//Surface reflections 2, and shadows.
// ---- Created with 3Dmigoto v1.2.71 on Fri Feb 02 19:35:29 2018

cbuffer _Globals : register(b0)
{
float4 shadowProjMatrix0 : packoffset(c0);
float4 shadowProjMatrix1 : packoffset(c1);
float4 shadowProjMatrix2 : packoffset(c2);
float4 shadowProjMatrix3 : packoffset(c3);
float4 shadowFadeParam : packoffset(c4);
float shadowFadeFarValue : packoffset(c5);
float4 shadowDimensions : packoffset(c6);
float shadowNormalBias : packoffset(c7);
float4 shadowShifts[4] : packoffset(c8);
float4 shadowMapCubeDepthParam : packoffset(c12);
float4 projMatrixZ : packoffset(c13);
bool backscatterAttenuation : packoffset(c14);
float backscatterSpecularColor : packoffset(c14.y);
float4 lightColor : packoffset(c15);
float4 lightDir : packoffset(c16);
float4 projInvMatrix[4] : packoffset(c17);
float4 projInvMatrixZ : packoffset(c21);
float4x4 viewMatrix : packoffset(c22);
float4 projExtentsZ : packoffset(c26);
float4 projExtentsXY : packoffset(c27);
}



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


void main(
float3 v0 : POSITION0,
float2 v1 : TEXCOORD0,
out float4 o0 : SV_POSITION0,
out float4 o1 : TEXCOORD0,
out float4 o2 : TEXCOORD1,
out float3 o3 : TEXCOORD2)
{
float4 r0;
uint4 bitmask, uiDest;
float4 fDest;

float4 stereo = StereoParams.Load(0);

o0.xyz = v0.xyz;
o0.w = 1;
o1.xy = v1.xy;
r0.xyzw = projInvMatrix[1].xyzw * v0.yyyy;
v0.x-=stereo.x;
r0.xyzw = v0.xxxx * projInvMatrix[0].xyzw + r0.xyzw;
o2.xyzw = projInvMatrix[3].xyzw + r0.xyzw;
o3.xy = projExtentsXY.zw * v0.xy;
o3.z = 1;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
// using 3Dmigoto v1.2.71 on Fri Feb 02 19:35:29 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
// float4 shadowProjMatrix0; // Offset: 0 Size: 16 [unused]
// float4 shadowProjMatrix1; // Offset: 16 Size: 16 [unused]
// float4 shadowProjMatrix2; // Offset: 32 Size: 16 [unused]
// float4 shadowProjMatrix3; // Offset: 48 Size: 16 [unused]
// float4 shadowFadeParam; // Offset: 64 Size: 16 [unused]
// float shadowFadeFarValue; // Offset: 80 Size: 4 [unused]
// float4 shadowDimensions; // Offset: 96 Size: 16 [unused]
// float shadowNormalBias; // Offset: 112 Size: 4 [unused]
// float4 shadowShifts[4]; // Offset: 128 Size: 64 [unused]
// float4 shadowMapCubeDepthParam; // Offset: 192 Size: 16 [unused]
// float4 projMatrixZ; // Offset: 208 Size: 16 [unused]
// bool backscatterAttenuation; // Offset: 224 Size: 4 [unused]
// float backscatterSpecularColor; // Offset: 228 Size: 4 [unused]
// float4 lightColor; // Offset: 240 Size: 16 [unused]
// float4 lightDir; // Offset: 256 Size: 16 [unused]
// float4 projInvMatrix[4]; // Offset: 272 Size: 64
// float4 projInvMatrixZ; // Offset: 336 Size: 16 [unused]
// float4x4 viewMatrix; // Offset: 352 Size: 64 [unused]
// float4 projExtentsZ; // Offset: 416 Size: 16 [unused]
// float4 projExtentsXY; // Offset: 432 Size: 16
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyz 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
// TEXCOORD 1 xyzw 2 NONE float xyzw
// TEXCOORD 2 xyz 3 NONE float xyz
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[28], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyzw
dcl_output o3.xyz
dcl_temps 1
mov o0.xyz, v0.xyzx
mov o0.w, l(1.000000)
mov o1.xy, v1.xyxx
mul r0.xyzw, v0.yyyy, cb0[18].xyzw
mad r0.xyzw, v0.xxxx, cb0[17].xyzw, r0.xyzw
add o2.xyzw, r0.xyzw, cb0[20].xyzw
mul o3.xy, v0.xyxx, cb0[27].zwzz
mov o3.z, l(1.000000)
ret
// Approximately 9 instruction slots used

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


It's basically the same thing I did for Tekken 7 specular reflections.

This benchmark has some other problems, like grass and some smoke that only appear in the right eye (only in "high" settings), ice decals that are at screen depth, etc. But I want to get shadows right first.

I've fixed the skybox and specular reflections for now (and made a DoF toggle).

CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: MSI GeForce RTX 2080Ti Gaming X Trio
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com

Posted 02/03/2018 03:03 PM   
OK ignore post 1843 by me ;) I got it working see my DCS thread Please..
OK ignore post 1843 by me ;) I got it working see my DCS thread Please..

Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit

Posted 02/05/2018 07:53 PM   
[quote="Helifax"][quote="DHR"][quote="DarkStarSword"]I see Bo3b has now released 1.3.1, so we will be looking for feedback on this new feature. I've tweaked the fonts a little since this screenshot, but essentially there are currently four levels of severity of different messages you may see - all of these will also be in the log file, so if they disappear too quickly you can still find them there.[/quote]This is a very nice feature...really great...many thanks! The timing for show the message are ok for me. 2 things that may be good: 1) Is possible to put a black background on the messages, sometimes i can't read because the game have some similar colors (blue sky for example, HUD elements that share the same space in the screen). 2) Is possible to also have the beeps and boops....i really miss those sounds :) [/quote]I have to agree with both of them! (Bring back the beep/boop please ^_^)[/quote] I've used this just a bit, and thought I'd add my impression. Initially it was shocking to not have a beep sound on mark, but like you say that's mostly habit, so I worked on trying out the new flow. After trying it for awhile, I think that the green 'success' text is superfluous and could be removed. The reason is that when I'm hunting a shader, I'm looking elsewhere on the screen for something to disappear. When I mark it, I'm still looking at that spot, and it breaks up the flow to look at the text. Also, if it works, the tag line out of the shader shows up under the counts, so I know it worked from that. Does it need a beep for success? Probably not anymore. For failures, I think a boop sound is still better, because I'm looking at a different part of the screen, and an audio hint there tells me I need to refocus on the error text. So it seems to me that no success beep is necessary, but a boop error would be helpful. That would be more of notify only on error approach, which tends to be better for UI. The font seems too unreadable as is. Either too small, low contrast, or it needs an outline of some form to make it stand out. It's hard to read when scribbled across a busy game screen. That is the reason I made the original courier font bold, because then normal font was too hard to read, even at that large font. A non-monospaced font seems right for this choice, it's mostly text, not numeric. It will make the hash codes weird and variable though. Overall it seems like a great enhancement. With some more experience we can tune up the info and logs so that it is more concise.
Helifax said:
DHR said:
DarkStarSword said:I see Bo3b has now released 1.3.1, so we will be looking for feedback on this new feature. I've tweaked the fonts a little since this screenshot, but essentially there are currently four levels of severity of different messages you may see - all of these will also be in the log file, so if they disappear too quickly you can still find them there.
This is a very nice feature...really great...many thanks!
The timing for show the message are ok for me.

2 things that may be good:
1) Is possible to put a black background on the messages, sometimes i can't read because the game have some similar colors (blue sky for example, HUD elements that share the same space in the screen).
2) Is possible to also have the beeps and boops....i really miss those sounds :)
I have to agree with both of them! (Bring back the beep/boop please ^_^)

I've used this just a bit, and thought I'd add my impression.

Initially it was shocking to not have a beep sound on mark, but like you say that's mostly habit, so I worked on trying out the new flow.

After trying it for awhile, I think that the green 'success' text is superfluous and could be removed. The reason is that when I'm hunting a shader, I'm looking elsewhere on the screen for something to disappear. When I mark it, I'm still looking at that spot, and it breaks up the flow to look at the text. Also, if it works, the tag line out of the shader shows up under the counts, so I know it worked from that. Does it need a beep for success? Probably not anymore.

For failures, I think a boop sound is still better, because I'm looking at a different part of the screen, and an audio hint there tells me I need to refocus on the error text. So it seems to me that no success beep is necessary, but a boop error would be helpful. That would be more of notify only on error approach, which tends to be better for UI.


The font seems too unreadable as is. Either too small, low contrast, or it needs an outline of some form to make it stand out. It's hard to read when scribbled across a busy game screen. That is the reason I made the original courier font bold, because then normal font was too hard to read, even at that large font. A non-monospaced font seems right for this choice, it's mostly text, not numeric. It will make the hash codes weird and variable though.

Overall it seems like a great enhancement. With some more experience we can tune up the info and logs so that it is more concise.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 02/06/2018 12:48 PM   
[quote] Also, if it works, the tag line out of the shader shows up under the counts, so I know it worked from that.[/quote]Only if you use hunting=1, and only if this is a newly dumped shader. With hunting=2 or when editing and reloading a shader there may not be any other feedback that anything has changed, so we do need some notification, if for no other reason than to confirm you did indeed press the reload button and 3DMigoto did indeed do what you asked, and wasn't blocked because the game was stalled and not calling Present() to allow us to process the keys. [quote] For failures, I think a boop sound is still better, because I'm looking at a different part of the screen, and an audio hint there tells me I need to refocus on the error text. So it seems to me that no success beep is necessary, but a boop error would be helpful. That would be more of notify only on error approach, which tends to be better for UI.[/quote]My own experience here is that I don't want to rely on audio notifications at all any more, and I want to unlearn the expectation of hearing them. I don't mind making these optional for people who do want them, but I'm often working at night with the sound low or off (if I'm not actually playing the game), so the visual feedback for both success & failure means I can now turn the sound completely off and not have to trip over headphone cables whenever I get up. There's also another minor advantage to having these off - the beeps stall the game, so it will actually reload faster without them. A boop on error would probably still be fine though, since it doesn't take anything away from the visual feedback and only stalls the game if something is wrong. I have added an option in 1.3.2 to bring back just the shader reload confirmations for people who want them. I hadn't seen this reply by the time I did that, so I bought back both success & failure notifications, but we can certainly change that to just failure if that's better (and we probably don't need an option if we go with that). [quote]The font seems too unreadable as is. Either too small, low contrast, or it needs an outline of some form to make it stand out. It's hard to read when scribbled across a busy game screen. That is the reason I made the original courier font bold, because then normal font was too hard to read, even at that large font. A non-monospaced font seems right for this choice, it's mostly text, not numeric. It will make the hash codes weird and variable though.[/quote]It definitely needs a dark background, and I'm not positive if the conversion to a bitmap font respected hinting making some of the lines in the font too thin. I'm a little annoyed that DirectXTK doesn't just have a parameter to set the background (nor an option to automatically wrap text, and can you believe their recommendation for adding an outline or drop shadow is to draw the text five times at slightly different positions? I'm rolling my eyes right now), but we should be able to [s]reinvent the wheel[/s] add something ourselves, and play around with the font to make it more readable.
Also, if it works, the tag line out of the shader shows up under the counts, so I know it worked from that.
Only if you use hunting=1, and only if this is a newly dumped shader. With hunting=2 or when editing and reloading a shader there may not be any other feedback that anything has changed, so we do need some notification, if for no other reason than to confirm you did indeed press the reload button and 3DMigoto did indeed do what you asked, and wasn't blocked because the game was stalled and not calling Present() to allow us to process the keys.

For failures, I think a boop sound is still better, because I'm looking at a different part of the screen, and an audio hint there tells me I need to refocus on the error text. So it seems to me that no success beep is necessary, but a boop error would be helpful. That would be more of notify only on error approach, which tends to be better for UI.
My own experience here is that I don't want to rely on audio notifications at all any more, and I want to unlearn the expectation of hearing them. I don't mind making these optional for people who do want them, but I'm often working at night with the sound low or off (if I'm not actually playing the game), so the visual feedback for both success & failure means I can now turn the sound completely off and not have to trip over headphone cables whenever I get up. There's also another minor advantage to having these off - the beeps stall the game, so it will actually reload faster without them. A boop on error would probably still be fine though, since it doesn't take anything away from the visual feedback and only stalls the game if something is wrong.

I have added an option in 1.3.2 to bring back just the shader reload confirmations for people who want them. I hadn't seen this reply by the time I did that, so I bought back both success & failure notifications, but we can certainly change that to just failure if that's better (and we probably don't need an option if we go with that).

The font seems too unreadable as is. Either too small, low contrast, or it needs an outline of some form to make it stand out. It's hard to read when scribbled across a busy game screen. That is the reason I made the original courier font bold, because then normal font was too hard to read, even at that large font. A non-monospaced font seems right for this choice, it's mostly text, not numeric. It will make the hash codes weird and variable though.
It definitely needs a dark background, and I'm not positive if the conversion to a bitmap font respected hinting making some of the lines in the font too thin. I'm a little annoyed that DirectXTK doesn't just have a parameter to set the background (nor an option to automatically wrap text, and can you believe their recommendation for adding an outline or drop shadow is to draw the text five times at slightly different positions? I'm rolling my eyes right now), but we should be able to reinvent the wheel add something ourselves, and play around with the font to make it more readable.

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 02/06/2018 04:25 PM   
[quote="Th3_N3philim"]DCS 2.5 Open Beta was released and I tried Migoto 1.2.71 I can get it working but ingame looks all Psychedelic colors.. Now sure what is going on but I was trying to make a fix.. I used on Older version of Migot and that worked fine but I would like to use the newer version of Migoto.. The version I used that worked was from DCS 1.5/2.2 fix from Lefuneste on the blog.. I tried several Previous version they all did the same thing with the colors..[/quote][quote="Th3_N3philim"]I am back and got Migoto 1.2.71 version to work with DCS.[/quote][quote="Th3_N3philim"]I forgot to mention the version of Migoto dated 10-1-2016 works perfectly with this version so somethong broke from that older version to this newer version of Migoto.. I posted a fix on the blog and that version runs it fine no missing light sources but shadows are still broke.. I wanted to use the newer version of Migoto to fix the one eye issues and some other things the newer version offers..[/quote][quote="Th3_N3philim"]OK ignore post 1843 by me ;) I got it working see my DCS thread Please..[/quote]I'm confused - is this working on the latest 3DMigoto or did you end up using an old version? From what I can see it is working fine on 1.3.2 - colours look right to me. BTW you really need to add instructions to the blog that the game must *NOT* be set to full screen, and instead use alt+enter to engage 3D, because that wasn't exactly intuitive.
Th3_N3philim said:DCS 2.5 Open Beta was released and I tried Migoto 1.2.71 I can get it working but ingame looks all Psychedelic colors..

Now sure what is going on but I was trying to make a fix.. I used on Older version of Migot and that worked fine but I would like to use the newer version of Migoto..

The version I used that worked was from DCS 1.5/2.2 fix from Lefuneste on the blog.. I tried several Previous version they all did the same thing with the colors..
Th3_N3philim said:I am back and got Migoto 1.2.71 version to work with DCS.
Th3_N3philim said:I forgot to mention the version of Migoto dated 10-1-2016 works perfectly with this version so somethong broke from that older version to this newer version of Migoto.. I posted a fix on the blog and that version runs it fine no missing light sources but shadows are still broke..

I wanted to use the newer version of Migoto to fix the one eye issues and some other things the newer version offers..
Th3_N3philim said:OK ignore post 1843 by me ;) I got it working see my DCS thread Please..
I'm confused - is this working on the latest 3DMigoto or did you end up using an old version?

From what I can see it is working fine on 1.3.2 - colours look right to me.


BTW you really need to add instructions to the blog that the game must *NOT* be set to full screen, and instead use alt+enter to engage 3D, because that wasn't exactly intuitive.

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 02/07/2018 06:28 AM   
EDITED see Below..
EDITED see Below..

Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit

Posted 02/07/2018 06:34 AM   
Deleted I will look at Migot 1.3.2 did not know it was out ;)
Deleted I will look at Migot 1.3.2 did not know it was out ;)

Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit

Posted 02/07/2018 06:37 AM   
OK the Migoto v1.3.2 also broke my warping program For my Projectors to preoject onto a curved screen I use SimPit Warp.. Does the v1.3.2 of Migot use some new Overlay system then before?? I also get the same issues with v1.3.2 that I did with 1.2.7 of Migoto see here: the 1st screenshot was with Migoto 1.3.2 and the 2nd was with the older version dated 10/2016.. https://forums.geforce.com/default/topic/919034/3d-vision/dcs-world-3dmigoto-fix-help-needed-/post/5286209/#5286209 I tried version 1.3.2 and had weird colorations in the sky..
OK the Migoto v1.3.2 also broke my warping program For my Projectors to preoject onto a curved screen I use SimPit Warp..

Does the v1.3.2 of Migot use some new Overlay system then before?? I also get the same issues with v1.3.2 that I did with 1.2.7 of Migoto see here:


the 1st screenshot was with Migoto 1.3.2 and the 2nd was with the older version dated 10/2016..

https://forums.geforce.com/default/topic/919034/3d-vision/dcs-world-3dmigoto-fix-help-needed-/post/5286209/#5286209


I tried version 1.3.2 and had weird colorations in the sky..

Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit

Posted 02/07/2018 06:56 AM   
Oops, I had put 3DMigoto in the wrong directory - didn't notice the extra "bin" directory. What is up with the 10+ minute loading times on this game? Making it very painful to test anything. First note - you need to fix all the ini parse warnings that 3DMigoto is complaining about. Old versions had undefined behaviour in these cases, while newer versions try to catch these and make sure you know about it. Maybe this explains something, but I'll know more once this loading screen finishes... any day now... this century would be nice...
Oops, I had put 3DMigoto in the wrong directory - didn't notice the extra "bin" directory.

What is up with the 10+ minute loading times on this game? Making it very painful to test anything.

First note - you need to fix all the ini parse warnings that 3DMigoto is complaining about. Old versions had undefined behaviour in these cases, while newer versions try to catch these and make sure you know about it. Maybe this explains something, but I'll know more once this loading screen finishes... any day now... this century would be nice...

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 02/07/2018 06:59 AM   
[quote] OK the Migoto v1.3.2 also broke my warping program For my Projectors to preoject onto a curved screen I use SimPit Warp..[/quote][s]More details please - what's the program?[/s] I must be blind - you had the name right there. That's something Bo3b and I will have to investigate. Edit: Wow, $365? Is there a trial I can use or something? You might have to send us a 3DMigoto debug log to look at instead. [quote] the 1st screenshot was with Migoto 1.3.2 and the 2nd was with the older version dated 10/2016..[/quote]What does the show_original key show (enable hunting then hold F9)? [quote] I tried version 1.3.2 and had weird colorations in the sky.. [/quote]It finally got past the loading screen, and 3D Vision wasn't engaged and alt+enter didn't work, but FWIW the sky looked fine. I'm moving it to my SSD before I try again, these loading times are ridiculous.
OK the Migoto v1.3.2 also broke my warping program For my Projectors to preoject onto a curved screen I use SimPit Warp..
More details please - what's the program?
I must be blind - you had the name right there. That's something Bo3b and I will have to investigate.

Edit: Wow, $365? Is there a trial I can use or something? You might have to send us a 3DMigoto debug log to look at instead.

the 1st screenshot was with Migoto 1.3.2 and the 2nd was with the older version dated 10/2016..
What does the show_original key show (enable hunting then hold F9)?

I tried version 1.3.2 and had weird colorations in the sky..
It finally got past the loading screen, and 3D Vision wasn't engaged and alt+enter didn't work, but FWIW the sky looked fine. I'm moving it to my SSD before I try again, these loading times are ridiculous.

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 02/07/2018 07:06 AM   
The Program is SimPit Warp to warp the image on a curved screen with DLP PRojectors.. I can get you a link if you would like to see it.. In that link I showed 2 screenshots the 1st screenshot was with DCS 2.5 and Migoto 1.2.7 not the ground no shadows or light sources ground looks dark.. Sky is fine but that is not the problem here Please see this screenshot: [URL=https://imageshack.com/i/pnhhGsFJj][IMG]https://imagizer.imageshack.com/v2/1280x1024q90/923/hhGsFJ.jpg[/IMG][/URL] Now this next screenshot is the same game DCS 2.5 but with an Older version of Migoto the one I am currently using for DCS 2.5. note the ground and you can see shadows and in the above you don't: [URL=https://imageshack.com/i/pmriRTjbj][IMG]https://imagizer.imageshack.com/v2/1280x1024q90/922/riRTjb.jpg[/IMG][/URL] I hope you see it know ;)
The Program is SimPit Warp to warp the image on a curved screen with DLP PRojectors.. I can get you a link if you would like to see it..

In that link I showed 2 screenshots the 1st screenshot was with DCS 2.5 and Migoto 1.2.7 not the ground no shadows or light sources ground looks dark.. Sky is fine but that is not the problem here Please see this screenshot:


Image


Now this next screenshot is the same game DCS 2.5 but with an Older version of Migoto the one I am currently using for DCS 2.5. note the ground and you can see shadows and in the above you don't:


Image


I hope you see it know ;)

Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit

Posted 02/07/2018 07:13 AM   
here is a link to DL Simpit warp it has a 30 day trial: http://www.simpit.co.nz/downloads/ get this "SimPitWarp_v2.2r5.zip"
here is a link to DL Simpit warp it has a 30 day trial:



http://www.simpit.co.nz/downloads/



get this "SimPitWarp_v2.2r5.zip"

Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit

Posted 02/07/2018 07:16 AM   
Everything still seems fine in 1.3.2 - are there specific settings I need to be using or something? show_original is showing that the handling=skip on 15df0cccbad97e19 is killing some shadows that seem to be rendering just fine without it, but otherwise it looks fine - I'm seeing shadows and so on, and they are rendering correctly. The reflection of the sun in water is broken, but that's about it.
Everything still seems fine in 1.3.2 - are there specific settings I need to be using or something?

show_original is showing that the handling=skip on 15df0cccbad97e19 is killing some shadows that seem to be rendering just fine without it, but otherwise it looks fine - I'm seeing shadows and so on, and they are rendering correctly. The reflection of the sun in water is broken, but that's about 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 02/07/2018 08:04 AM   
in the Options menu are you using Deferred shading and shadows on high pluse terrain objects on Default??
in the Options menu are you using Deferred shading and shadows on high pluse terrain objects on Default??

Intel i5 7600K @ 4.8ghz / MSI Z270 SLI / Asus 1080GTX - 416.16 / Optoma HD142x Projector / 1 4'x10' Curved Screen PVC / TrackIR / HOTAS Cougar / Cougar MFD's / Track IR / NVidia 3D Vision / Win 10 64bit

Posted 02/07/2018 08:15 AM   
Medium preset + I've tried both configurations listed on the blog: [quote]1. Shadows= FLAT (best Compromise for now) 2.Deffered shading- ON - to get the uber effects.. 3. Terrain Object Shadow- OFF ( this is MOST Important to have off) [/quote][quote]EDIT: IF you Want Shadows turn OFF Deferred shading and turn ON shadows to high and terrain shadows ON.. The GRaphics are not as good with Deferred shading OFF tho.. YMMV!!! [/quote] Maybe if you can track down the specific version of 3DMigoto that first broke it we can narrow down what it might be?
Medium preset + I've tried both configurations listed on the blog:

1. Shadows= FLAT (best Compromise for now)
2.Deffered shading- ON - to get the uber effects..
3. Terrain Object Shadow- OFF ( this is MOST Important to have off)
EDIT: IF you Want Shadows turn OFF Deferred shading and turn ON shadows to high and terrain shadows ON.. The GRaphics are not as good with Deferred shading OFF tho.. YMMV!!!

Maybe if you can track down the specific version of 3DMigoto that first broke it we can narrow down what it might be?

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 02/07/2018 08:27 AM   
  124 / 143    
Scroll To Top