Bo3b's School For Shaderhackers
  86 / 87    
try this: [code] // ---- Created with 3Dmigoto v1.3.11 on Sat Dec 22 10:40:48 2018 2.Texture2D<float4> t2 : register(t2); 3. 4.Texture2D<float4> t1 : register(t1); 5. 6.Texture2D<float4> t0 : register(t0); 7. 8.SamplerState s2_s : register(s2); 9. 10.SamplerState s1_s : register(s1); 11. 12.SamplerState s0_s : register(s0); 13. 14.cbuffer cb3 : register(b3) 15.{ 16. float4 cb3[21]; 17.} 18. 19.cbuffer cb2 : register(b2) 20.{ 21. float4 cb2[4]; 22.} 23. 24.cbuffer cb1 : register(b1) 25.{ 26. float4 cb1[5]; 27.} 28. 29.cbuffer cb0 : register(b0) 30.{ 31. float4 cb0[9]; 32.} 33. 34. 35. 36. 37.// 3Dmigoto declarations 38.#define cmp - 39.Texture1D<float4> IniParams : register(t120); 40.Texture2D<float4> StereoParams : register(t125); 41. 42. 43.void main( 44. float4 v0 : POSITION0, 45. float3 v1 : NORMAL0, 46. float4 v2 : TEXCOORD0, 47. out float4 o0 : SV_POSITION0, 48. out float4 o1 : TEXCOORD0, 49. out float3 o2 : TEXCOORD1, 50. out float3 o3 : COLOR0, 51. out float3 o4 : COLOR1) 52.{ 53. float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12; 54. uint4 bitmask, uiDest; 55. float4 fDest; float4 stereo = StereoParams.Load(0); float4 params2 = IniParams.Load(int2(1,0)); float4 params = IniParams.Load(0); 57. r0.xyz = cb1[4].xyz + -cb0[2].xyz; 58. r0.w = dot(r0.xyz, r0.xyz); 59. r1.xyz = cb2[1].xyz * v0.yyy; 60. r1.xyz = cb2[0].xyz * v0.xxx + r1.xyz; 61. r1.xyz = cb2[2].xyz * v0.zzz + r1.xyz; 62. r1.xyz = cb2[3].xyz * v0.www + r1.xyz; 63. r1.xyz = -cb0[2].xyz + r1.xyz; 64. r2.xyz = r1.xyz + -r0.xyz; 65. r1.w = dot(r2.xyz, r2.xyz); 66. r1.w = sqrt(r1.w); 67. r2.xyz = r2.xyz / r1.www; 68. r3.xyzw = cb2[1].xyzw * v0.yyyy; 69. r3.xyzw = cb2[0].xyzw * v0.xxxx + r3.xyzw; 70. r3.xyzw = cb2[2].xyzw * v0.zzzz + r3.xyzw; 71. r3.xyzw = cb2[3].xyzw + r3.xyzw; 72. r4.xyzw = cb3[18].xyzw * r3.yyyy; 73. r4.xyzw = cb3[17].xyzw * r3.xxxx + r4.xyzw; 74. r4.xyzw = cb3[19].xyzw * r3.zzzz + r4.xyzw; 75. r3.xyzw = cb3[20].xyzw * r3.wwww + r4.xyzw; 76. r4.xyz = -r1.xyz + r0.xyz; 77. r2.w = dot(r0.xyz, r2.xyz); 78. r4.w = r2.w + r2.w; 79. r5.x = -cb0[5].x + r0.w; 80. r5.x = 4 * r5.x; 81. r4.w = r4.w * r4.w + -r5.x; 82. r4.w = max(0, r4.w); 83. r4.w = sqrt(r4.w); 84. r2.w = -r2.w * 2 + -r4.w; 85. r4.w = cmp(0 >= r2.w); 86. if (r4.w != 0) { 87. r0.w = sqrt(r0.w); 88. r4.w = -cb0[5].y + r0.w; 89. r5.x = cb0[6].w * r4.w; 90. r1.x = dot(r1.xyz, r1.xyz); 91. r1.x = sqrt(r1.x); 92. r1.x = cmp(r0.w >= r1.x); 93. r6.xyz = r1.xxx ? -r2.xyz : r2.xyz; 94. r1.y = dot(r6.xyz, r0.xyz); 95. r0.w = r1.y / r0.w; 96. r5.y = -r0.w * 0.5 + 0.5; 97. r6.xyzw = t0.SampleLevel(s0_s, r5.xy, 0).xyzw; 98. r5.xyzw = t2.SampleLevel(s1_s, r5.xy, 0).xyzw; 99. r0.w = dot(r5.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1)); 100. r1.y = cmp(r0.w >= 0.999998987); 101. r0.w = r1.y ? 1 : r0.w; 102. r6.y = cb0[8].x * r0.w; 103. } else { 104. r0.w = 0.5 * r2.w; 105. r0.xyz = r2.xyz * r0.www + r0.xyz; 106. r1.w = -r2.w * 0.5 + r1.w; 107. r6.xy = float2(0,0); 108. r1.x = -1; 109. } 110. r0.w = cmp(9.99999997e-007 >= r1.w); 111. if (r0.w != 0) { 112. o0.xyzw = r3.xyzw; 113. o2.xyz = r4.xyz; 114. o3.xyz = float3(0,0,0); 115. o4.xyz = float3(0,0,0); 116. o1.xy = v2.xy; 117. return; 118. } 119. r0.w = r1.w / cb0[7].w; 120. r1.y = cb0[6].w * r0.w; 121. r5.xyz = r2.xyz * r0.www; 122. r0.xyz = r5.xyz * float3(0.5,0.5,0.5) + r0.xyz; 123. r1.z = (int)cb0[7].w; 124. r5.xyz = float3(0,0,0); 125. r7.xyz = float3(0,0,0); 126. r8.xyz = r0.xyz; 127. r1.w = r1.x; 128. r2.w = 0; 129. while (true) { 130. r4.w = cmp((int)r2.w >= (int)r1.z); 131. if (r4.w != 0) break; 132. r4.w = dot(r8.xyz, r8.xyz); 133. r4.w = sqrt(r4.w); 134. r5.w = dot(cb0[3].xyz, r8.xyz); 135. r5.w = r5.w / r4.w; 136. r6.z = -cb0[5].y + r4.w; 137. r9.x = cb0[6].w * r6.z; 138. r9.y = -r5.w * 0.5 + 0.5; 139. r10.xyzw = t0.SampleLevel(s0_s, r9.xy, 0).xyzw; 140. r5.w = cmp(r10.x < 9.99999997e-007); 141. if (r5.w != 0) { 142. break; 143. } 144. r11.xyzw = t1.SampleLevel(s2_s, r9.xy, 0).xyzw; 145. r5.w = dot(r11.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1)); 146. r6.z = cmp(r5.w >= 0.999998987); 147. r5.w = r6.z ? 1 : r5.w; 148. r11.xyzw = t2.SampleLevel(s1_s, r9.xy, 0).xyzw; 149. r6.z = dot(r11.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1)); 150. r6.w = cmp(r6.z >= 0.999998987); 151. r6.z = r6.w ? 1 : r6.z; 152. r10.xy = r10.xy * r1.yy; 153. if (r1.w != 0) { 154. r6.w = dot(-r2.xyz, r8.xyz); 155. r6.w = r6.w / r4.w; 156. r9.z = -r6.w * 0.5 + 0.5; 157. r11.xyzw = t0.SampleLevel(s0_s, r9.xz, 0).xyzw; 158. r12.xyzw = t2.SampleLevel(s1_s, r9.xz, 0).xyzw; 159. r6.w = dot(r12.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1)); 160. r7.w = cmp(r6.w >= 0.999998987); 161. r6.w = r7.w ? 1 : r6.w; 162. r7.w = r11.x + -r6.x; 163. r11.x = r5.w * cb0[8].y + r7.w; 164. r6.w = r6.w * cb0[8].x + -r6.y; 165. r11.y = r6.z * cb0[8].x + r6.w; 166. } else { 167. r6.w = dot(r2.xyz, r8.xyz); 168. r4.w = r6.w / r4.w; 169. r9.w = -r4.w * 0.5 + 0.5; 170. r12.xyzw = t0.SampleLevel(s0_s, r9.xw, 0).xyzw; 171. r9.xyzw = t2.SampleLevel(s1_s, r9.xw, 0).xyzw; 172. r4.w = dot(r9.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1)); 173. r6.w = cmp(r4.w >= 0.999998987); 174. r4.w = r6.w ? 1 : r4.w; 175. r6.w = -r12.x + r6.x; 176. r11.x = r5.w * cb0[8].y + r6.w; 177. r4.w = -r4.w * cb0[8].x + r6.y; 178. r11.y = r6.z * cb0[8].x + r4.w; 179. } 180. r6.zw = cb0[6].yz * r11.xy; 181. r9.xyz = -r6.zzz * cb0[4].xyz + -r6.www; 182. r9.xyz = float3(1.44269502,1.44269502,1.44269502) * r9.xyz; 183. r9.xyz = exp2(r9.xyz); 184. r5.xyz = r10.xxx * r9.xyz + r5.xyz; 185. r7.xyz = r10.yyy * r9.xyz + r7.xyz; 186. r8.xyz = r2.xyz * r0.www + r8.xyz; 187. r2.w = (int)r2.w + 1; 188. } 189. r0.xyz = cb0[4].xyz * r5.xyz; 190. o3.xyz = cb0[5].www * r0.xyz; 191. o4.xyz = cb0[6].xxx * r7.xyz; 192. o0.xyzw = r3.xyzw; 193. o2.xyz = r4.xyz; 194. o1.xy = v2.xy; o0.x += stereo.x; 195. return; 196.} 197. 198./*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199.// 200.// Generated by Microsoft (R) D3D Shader Disassembler 201.// 202.// using 3Dmigoto v1.3.11 on Sat Dec 22 10:40:48 2018 203.// 204.// 205.// Input signature: 206.// 207.// Name Index Mask Register SysValue Format Used 208.// -------------------- ----- ------ -------- -------- ------- ------ 209.// POSITION 0 xyzw 0 NONE float xyzw 210.// NORMAL 0 xyz 1 NONE float 211.// TEXCOORD 0 xyzw 2 NONE float xy 212.// 213.// 214.// Output signature: 215.// 216.// Name Index Mask Register SysValue Format Used 217.// -------------------- ----- ------ -------- -------- ------- ------ 218.// SV_POSITION 0 xyzw 0 POS float xyzw 219.// TEXCOORD 0 xy 1 NONE float xy 220.// TEXCOORD 1 xyz 2 NONE float xyz 221.// COLOR 0 xyz 3 NONE float xyz 222.// COLOR 1 xyz 4 NONE float xyz 223.// 224.vs_4_0 225.dcl_constantbuffer cb0[9], immediateIndexed 226.dcl_constantbuffer cb1[5], immediateIndexed 227.dcl_constantbuffer cb2[4], immediateIndexed 228.dcl_constantbuffer cb3[21], immediateIndexed 229.dcl_sampler s0, mode_default 230.dcl_sampler s1, mode_default 231.dcl_sampler s2, mode_default 232.dcl_resource_texture2d (float,float,float,float) t0 233.dcl_resource_texture2d (float,float,float,float) t1 234.dcl_resource_texture2d (float,float,float,float) t2 235.dcl_input v0.xyzw 236.dcl_input v2.xy 237.dcl_output_siv o0.xyzw, position 238.dcl_output o1.xy 239.dcl_output o2.xyz 240.dcl_output o3.xyz 241.dcl_output o4.xyz 242.dcl_temps 13 243.add r0.xyz, -cb0[2].xyzx, cb1[4].xyzx 244.dp3 r0.w, r0.xyzx, r0.xyzx 245.mul r1.xyz, v0.yyyy, cb2[1].xyzx 246.mad r1.xyz, cb2[0].xyzx, v0.xxxx, r1.xyzx 247.mad r1.xyz, cb2[2].xyzx, v0.zzzz, r1.xyzx 248.mad r1.xyz, cb2[3].xyzx, v0.wwww, r1.xyzx 249.add r1.xyz, r1.xyzx, -cb0[2].xyzx 250.add r2.xyz, -r0.xyzx, r1.xyzx 251.dp3 r1.w, r2.xyzx, r2.xyzx 252.sqrt r1.w, r1.w 253.div r2.xyz, r2.xyzx, r1.wwww 254.mul r3.xyzw, v0.yyyy, cb2[1].xyzw 255.mad r3.xyzw, cb2[0].xyzw, v0.xxxx, r3.xyzw 256.mad r3.xyzw, cb2[2].xyzw, v0.zzzz, r3.xyzw 257.add r3.xyzw, r3.xyzw, cb2[3].xyzw 258.mul r4.xyzw, r3.yyyy, cb3[18].xyzw 259.mad r4.xyzw, cb3[17].xyzw, r3.xxxx, r4.xyzw 260.mad r4.xyzw, cb3[19].xyzw, r3.zzzz, r4.xyzw 261.mad r3.xyzw, cb3[20].xyzw, r3.wwww, r4.xyzw 262.add r4.xyz, r0.xyzx, -r1.xyzx 263.dp3 r2.w, r0.xyzx, r2.xyzx 264.add r4.w, r2.w, r2.w 265.add r5.x, r0.w, -cb0[5].x 266.mul r5.x, r5.x, l(4.000000) 267.mad r4.w, r4.w, r4.w, -r5.x 268.max r4.w, r4.w, l(0.000000) 269.sqrt r4.w, r4.w 270.mad r2.w, -r2.w, l(2.000000), -r4.w 271.ge r4.w, l(0.000000), r2.w 272.if_nz r4.w 273. sqrt r0.w, r0.w 274. add r4.w, r0.w, -cb0[5].y 275. mul r5.x, r4.w, cb0[6].w 276. dp3 r1.x, r1.xyzx, r1.xyzx 277. sqrt r1.x, r1.x 278. ge r1.x, r0.w, r1.x 279. movc r6.xyz, r1.xxxx, -r2.xyzx, r2.xyzx 280. dp3 r1.y, r6.xyzx, r0.xyzx 281. div r0.w, r1.y, r0.w 282. mad r5.y, -r0.w, l(0.500000), l(0.500000) 283. sample_l r6.xyzw, r5.xyxx, t0.xyzw, s0, l(0.000000) 284. sample_l r5.xyzw, r5.xyxx, t2.xyzw, s1, l(0.000000) 285. dp4 r0.w, r5.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000) 286. ge r1.y, r0.w, l(0.999999) 287. movc r0.w, r1.y, l(1.000000), r0.w 288. mul r6.y, r0.w, cb0[8].x 289.else 290. mul r0.w, r2.w, l(0.500000) 291. mad r0.xyz, r2.xyzx, r0.wwww, r0.xyzx 292. mad r1.w, -r2.w, l(0.500000), r1.w 293. mov r6.xy, l(0,0,0,0) 294. mov r1.x, l(-1) 295.endif 296.ge r0.w, l(0.000001), r1.w 297.if_nz r0.w 298. mov o0.xyzw, r3.xyzw 299. mov o2.xyz, r4.xyzx 300. mov o3.xyz, l(0,0,0,0) 301. mov o4.xyz, l(0,0,0,0) 302. mov o1.xy, v2.xyxx 303. ret 304.endif 305.div r0.w, r1.w, cb0[7].w 306.mul r1.y, r0.w, cb0[6].w 307.mul r5.xyz, r0.wwww, r2.xyzx 308.mad r0.xyz, r5.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), r0.xyzx 309.ftoi r1.z, cb0[7].w 310.mov r5.xyz, l(0,0,0,0) 311.mov r7.xyz, l(0,0,0,0) 312.mov r8.xyz, r0.xyzx 313.mov r1.w, r1.x 314.mov r2.w, l(0) 315.loop 316. ige r4.w, r2.w, r1.z 317. breakc_nz r4.w 318. dp3 r4.w, r8.xyzx, r8.xyzx 319. sqrt r4.w, r4.w 320. dp3 r5.w, cb0[3].xyzx, r8.xyzx 321. div r5.w, r5.w, r4.w 322. add r6.z, r4.w, -cb0[5].y 323. mul r9.x, r6.z, cb0[6].w 324. mad r9.y, -r5.w, l(0.500000), l(0.500000) 325. sample_l r10.xyzw, r9.xyxx, t0.xyzw, s0, l(0.000000) 326. lt r5.w, r10.x, l(0.000001) 327. if_nz r5.w 328. break 329. endif 330. sample_l r11.xyzw, r9.xyxx, t1.xyzw, s2, l(0.000000) 331. dp4 r5.w, r11.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000) 332. ge r6.z, r5.w, l(0.999999) 333. movc r5.w, r6.z, l(1.000000), r5.w 334. sample_l r11.xyzw, r9.xyxx, t2.xyzw, s1, l(0.000000) 335. dp4 r6.z, r11.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000) 336. ge r6.w, r6.z, l(0.999999) 337. movc r6.z, r6.w, l(1.000000), r6.z 338. mul r10.xy, r1.yyyy, r10.xyxx 339. if_nz r1.w 340. dp3 r6.w, -r2.xyzx, r8.xyzx 341. div r6.w, r6.w, r4.w 342. mad r9.z, -r6.w, l(0.500000), l(0.500000) 343. sample_l r11.xyzw, r9.xzxx, t0.xyzw, s0, l(0.000000) 344. sample_l r12.xyzw, r9.xzxx, t2.xyzw, s1, l(0.000000) 345. dp4 r6.w, r12.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000) 346. ge r7.w, r6.w, l(0.999999) 347. movc r6.w, r7.w, l(1.000000), r6.w 348. add r7.w, -r6.x, r11.x 349. mad r11.x, r5.w, cb0[8].y, r7.w 350. mad r6.w, r6.w, cb0[8].x, -r6.y 351. mad r11.y, r6.z, cb0[8].x, r6.w 352. else 353. dp3 r6.w, r2.xyzx, r8.xyzx 354. div r4.w, r6.w, r4.w 355. mad r9.w, -r4.w, l(0.500000), l(0.500000) 356. sample_l r12.xyzw, r9.xwxx, t0.xyzw, s0, l(0.000000) 357. sample_l r9.xyzw, r9.xwxx, t2.xyzw, s1, l(0.000000) 358. dp4 r4.w, r9.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000) 359. ge r6.w, r4.w, l(0.999999) 360. movc r4.w, r6.w, l(1.000000), r4.w 361. add r6.w, r6.x, -r12.x 362. mad r11.x, r5.w, cb0[8].y, r6.w 363. mad r4.w, -r4.w, cb0[8].x, r6.y 364. mad r11.y, r6.z, cb0[8].x, r4.w 365. endif 366. mul r6.zw, r11.xxxy, cb0[6].yyyz 367. mad r9.xyz, -r6.zzzz, cb0[4].xyzx, -r6.wwww 368. mul r9.xyz, r9.xyzx, l(1.442695, 1.442695, 1.442695, 0.000000) 369. exp r9.xyz, r9.xyzx 370. mad r5.xyz, r10.xxxx, r9.xyzx, r5.xyzx 371. mad r7.xyz, r10.yyyy, r9.xyzx, r7.xyzx 372. mad r8.xyz, r2.xyzx, r0.wwww, r8.xyzx 373. iadd r2.w, r2.w, l(1) 374.endloop 375.mul r0.xyz, r5.xyzx, cb0[4].xyzx 376.mul o3.xyz, r0.xyzx, cb0[5].wwww 377.mul o4.xyz, r7.xyzx, cb0[6].xxxx 378.mov o0.xyzw, r3.xyzw 379.mov o2.xyz, r4.xyzx 380.mov o1.xy, v2.xyxx 381.ret 382.// Approximately 0 instruction slots used 383. 384.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code]
try this:


// ---- Created with 3Dmigoto v1.3.11 on Sat Dec 22 10:40:48 2018

2.Texture2D<float4> t2 : register(t2);

3.

4.Texture2D<float4> t1 : register(t1);

5.

6.Texture2D<float4> t0 : register(t0);

7.

8.SamplerState s2_s : register(s2);

9.

10.SamplerState s1_s : register(s1);

11.

12.SamplerState s0_s : register(s0);

13.

14.cbuffer cb3 : register(b3)

15.{

16. float4 cb3[21];

17.}

18.

19.cbuffer cb2 : register(b2)

20.{

21. float4 cb2[4];

22.}

23.

24.cbuffer cb1 : register(b1)

25.{

26. float4 cb1[5];

27.}

28.

29.cbuffer cb0 : register(b0)

30.{

31. float4 cb0[9];

32.}

33.

34.

35.

36.

37.// 3Dmigoto declarations

38.#define cmp -

39.Texture1D<float4> IniParams : register(t120);

40.Texture2D<float4> StereoParams : register(t125);

41.

42.

43.void main(

44. float4 v0 : POSITION0,

45. float3 v1 : NORMAL0,

46. float4 v2 : TEXCOORD0,

47. out float4 o0 : SV_POSITION0,

48. out float4 o1 : TEXCOORD0,

49. out float3 o2 : TEXCOORD1,

50. out float3 o3 : COLOR0,

51. out float3 o4 : COLOR1)

52.{

53. float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12;

54. uint4 bitmask, uiDest;

55. float4 fDest;

float4 stereo = StereoParams.Load(0);
float4 params2 = IniParams.Load(int2(1,0));
float4 params = IniParams.Load(0);




57. r0.xyz = cb1[4].xyz + -cb0[2].xyz;

58. r0.w = dot(r0.xyz, r0.xyz);

59. r1.xyz = cb2[1].xyz * v0.yyy;

60. r1.xyz = cb2[0].xyz * v0.xxx + r1.xyz;

61. r1.xyz = cb2[2].xyz * v0.zzz + r1.xyz;

62. r1.xyz = cb2[3].xyz * v0.www + r1.xyz;

63. r1.xyz = -cb0[2].xyz + r1.xyz;

64. r2.xyz = r1.xyz + -r0.xyz;

65. r1.w = dot(r2.xyz, r2.xyz);

66. r1.w = sqrt(r1.w);

67. r2.xyz = r2.xyz / r1.www;

68. r3.xyzw = cb2[1].xyzw * v0.yyyy;

69. r3.xyzw = cb2[0].xyzw * v0.xxxx + r3.xyzw;

70. r3.xyzw = cb2[2].xyzw * v0.zzzz + r3.xyzw;

71. r3.xyzw = cb2[3].xyzw + r3.xyzw;

72. r4.xyzw = cb3[18].xyzw * r3.yyyy;

73. r4.xyzw = cb3[17].xyzw * r3.xxxx + r4.xyzw;

74. r4.xyzw = cb3[19].xyzw * r3.zzzz + r4.xyzw;

75. r3.xyzw = cb3[20].xyzw * r3.wwww + r4.xyzw;

76. r4.xyz = -r1.xyz + r0.xyz;

77. r2.w = dot(r0.xyz, r2.xyz);

78. r4.w = r2.w + r2.w;

79. r5.x = -cb0[5].x + r0.w;

80. r5.x = 4 * r5.x;

81. r4.w = r4.w * r4.w + -r5.x;

82. r4.w = max(0, r4.w);

83. r4.w = sqrt(r4.w);

84. r2.w = -r2.w * 2 + -r4.w;

85. r4.w = cmp(0 >= r2.w);

86. if (r4.w != 0) {

87. r0.w = sqrt(r0.w);

88. r4.w = -cb0[5].y + r0.w;

89. r5.x = cb0[6].w * r4.w;

90. r1.x = dot(r1.xyz, r1.xyz);

91. r1.x = sqrt(r1.x);

92. r1.x = cmp(r0.w >= r1.x);

93. r6.xyz = r1.xxx ? -r2.xyz : r2.xyz;

94. r1.y = dot(r6.xyz, r0.xyz);

95. r0.w = r1.y / r0.w;

96. r5.y = -r0.w * 0.5 + 0.5;

97. r6.xyzw = t0.SampleLevel(s0_s, r5.xy, 0).xyzw;

98. r5.xyzw = t2.SampleLevel(s1_s, r5.xy, 0).xyzw;

99. r0.w = dot(r5.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1));

100. r1.y = cmp(r0.w >= 0.999998987);

101. r0.w = r1.y ? 1 : r0.w;

102. r6.y = cb0[8].x * r0.w;

103. } else {

104. r0.w = 0.5 * r2.w;

105. r0.xyz = r2.xyz * r0.www + r0.xyz;

106. r1.w = -r2.w * 0.5 + r1.w;

107. r6.xy = float2(0,0);

108. r1.x = -1;

109. }

110. r0.w = cmp(9.99999997e-007 >= r1.w);

111. if (r0.w != 0) {

112. o0.xyzw = r3.xyzw;

113. o2.xyz = r4.xyz;

114. o3.xyz = float3(0,0,0);

115. o4.xyz = float3(0,0,0);

116. o1.xy = v2.xy;

117. return;

118. }

119. r0.w = r1.w / cb0[7].w;

120. r1.y = cb0[6].w * r0.w;

121. r5.xyz = r2.xyz * r0.www;

122. r0.xyz = r5.xyz * float3(0.5,0.5,0.5) + r0.xyz;

123. r1.z = (int)cb0[7].w;

124. r5.xyz = float3(0,0,0);

125. r7.xyz = float3(0,0,0);

126. r8.xyz = r0.xyz;

127. r1.w = r1.x;

128. r2.w = 0;

129. while (true) {

130. r4.w = cmp((int)r2.w >= (int)r1.z);

131. if (r4.w != 0) break;

132. r4.w = dot(r8.xyz, r8.xyz);

133. r4.w = sqrt(r4.w);

134. r5.w = dot(cb0[3].xyz, r8.xyz);

135. r5.w = r5.w / r4.w;

136. r6.z = -cb0[5].y + r4.w;

137. r9.x = cb0[6].w * r6.z;

138. r9.y = -r5.w * 0.5 + 0.5;

139. r10.xyzw = t0.SampleLevel(s0_s, r9.xy, 0).xyzw;

140. r5.w = cmp(r10.x < 9.99999997e-007);

141. if (r5.w != 0) {

142. break;

143. }

144. r11.xyzw = t1.SampleLevel(s2_s, r9.xy, 0).xyzw;

145. r5.w = dot(r11.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1));

146. r6.z = cmp(r5.w >= 0.999998987);

147. r5.w = r6.z ? 1 : r5.w;

148. r11.xyzw = t2.SampleLevel(s1_s, r9.xy, 0).xyzw;

149. r6.z = dot(r11.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1));

150. r6.w = cmp(r6.z >= 0.999998987);

151. r6.z = r6.w ? 1 : r6.z;

152. r10.xy = r10.xy * r1.yy;

153. if (r1.w != 0) {

154. r6.w = dot(-r2.xyz, r8.xyz);

155. r6.w = r6.w / r4.w;

156. r9.z = -r6.w * 0.5 + 0.5;

157. r11.xyzw = t0.SampleLevel(s0_s, r9.xz, 0).xyzw;

158. r12.xyzw = t2.SampleLevel(s1_s, r9.xz, 0).xyzw;

159. r6.w = dot(r12.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1));

160. r7.w = cmp(r6.w >= 0.999998987);

161. r6.w = r7.w ? 1 : r6.w;

162. r7.w = r11.x + -r6.x;

163. r11.x = r5.w * cb0[8].y + r7.w;

164. r6.w = r6.w * cb0[8].x + -r6.y;

165. r11.y = r6.z * cb0[8].x + r6.w;

166. } else {

167. r6.w = dot(r2.xyz, r8.xyz);

168. r4.w = r6.w / r4.w;

169. r9.w = -r4.w * 0.5 + 0.5;

170. r12.xyzw = t0.SampleLevel(s0_s, r9.xw, 0).xyzw;

171. r9.xyzw = t2.SampleLevel(s1_s, r9.xw, 0).xyzw;

172. r4.w = dot(r9.xyzw, float4(6.03086292e-008,1.53787005e-005,0.00392156886,1));

173. r6.w = cmp(r4.w >= 0.999998987);

174. r4.w = r6.w ? 1 : r4.w;

175. r6.w = -r12.x + r6.x;

176. r11.x = r5.w * cb0[8].y + r6.w;

177. r4.w = -r4.w * cb0[8].x + r6.y;

178. r11.y = r6.z * cb0[8].x + r4.w;

179. }

180. r6.zw = cb0[6].yz * r11.xy;

181. r9.xyz = -r6.zzz * cb0[4].xyz + -r6.www;

182. r9.xyz = float3(1.44269502,1.44269502,1.44269502) * r9.xyz;

183. r9.xyz = exp2(r9.xyz);

184. r5.xyz = r10.xxx * r9.xyz + r5.xyz;

185. r7.xyz = r10.yyy * r9.xyz + r7.xyz;

186. r8.xyz = r2.xyz * r0.www + r8.xyz;

187. r2.w = (int)r2.w + 1;

188. }

189. r0.xyz = cb0[4].xyz * r5.xyz;

190. o3.xyz = cb0[5].www * r0.xyz;

191. o4.xyz = cb0[6].xxx * r7.xyz;

192. o0.xyzw = r3.xyzw;

193. o2.xyz = r4.xyz;

194. o1.xy = v2.xy;


o0.x += stereo.x;


195. return;

196.}

197.

198./*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

199.//

200.// Generated by Microsoft (R) D3D Shader Disassembler

201.//

202.// using 3Dmigoto v1.3.11 on Sat Dec 22 10:40:48 2018

203.//

204.//

205.// Input signature:

206.//

207.// Name Index Mask Register SysValue Format Used

208.// -------------------- ----- ------ -------- -------- ------- ------

209.// POSITION 0 xyzw 0 NONE float xyzw

210.// NORMAL 0 xyz 1 NONE float

211.// TEXCOORD 0 xyzw 2 NONE float xy

212.//

213.//

214.// Output signature:

215.//

216.// Name Index Mask Register SysValue Format Used

217.// -------------------- ----- ------ -------- -------- ------- ------

218.// SV_POSITION 0 xyzw 0 POS float xyzw

219.// TEXCOORD 0 xy 1 NONE float xy

220.// TEXCOORD 1 xyz 2 NONE float xyz

221.// COLOR 0 xyz 3 NONE float xyz

222.// COLOR 1 xyz 4 NONE float xyz

223.//

224.vs_4_0

225.dcl_constantbuffer cb0[9], immediateIndexed

226.dcl_constantbuffer cb1[5], immediateIndexed

227.dcl_constantbuffer cb2[4], immediateIndexed

228.dcl_constantbuffer cb3[21], immediateIndexed

229.dcl_sampler s0, mode_default

230.dcl_sampler s1, mode_default

231.dcl_sampler s2, mode_default

232.dcl_resource_texture2d (float,float,float,float) t0

233.dcl_resource_texture2d (float,float,float,float) t1

234.dcl_resource_texture2d (float,float,float,float) t2

235.dcl_input v0.xyzw

236.dcl_input v2.xy

237.dcl_output_siv o0.xyzw, position

238.dcl_output o1.xy

239.dcl_output o2.xyz

240.dcl_output o3.xyz

241.dcl_output o4.xyz

242.dcl_temps 13

243.add r0.xyz, -cb0[2].xyzx, cb1[4].xyzx

244.dp3 r0.w, r0.xyzx, r0.xyzx

245.mul r1.xyz, v0.yyyy, cb2[1].xyzx

246.mad r1.xyz, cb2[0].xyzx, v0.xxxx, r1.xyzx

247.mad r1.xyz, cb2[2].xyzx, v0.zzzz, r1.xyzx

248.mad r1.xyz, cb2[3].xyzx, v0.wwww, r1.xyzx

249.add r1.xyz, r1.xyzx, -cb0[2].xyzx

250.add r2.xyz, -r0.xyzx, r1.xyzx

251.dp3 r1.w, r2.xyzx, r2.xyzx

252.sqrt r1.w, r1.w

253.div r2.xyz, r2.xyzx, r1.wwww

254.mul r3.xyzw, v0.yyyy, cb2[1].xyzw

255.mad r3.xyzw, cb2[0].xyzw, v0.xxxx, r3.xyzw

256.mad r3.xyzw, cb2[2].xyzw, v0.zzzz, r3.xyzw

257.add r3.xyzw, r3.xyzw, cb2[3].xyzw

258.mul r4.xyzw, r3.yyyy, cb3[18].xyzw

259.mad r4.xyzw, cb3[17].xyzw, r3.xxxx, r4.xyzw

260.mad r4.xyzw, cb3[19].xyzw, r3.zzzz, r4.xyzw

261.mad r3.xyzw, cb3[20].xyzw, r3.wwww, r4.xyzw

262.add r4.xyz, r0.xyzx, -r1.xyzx

263.dp3 r2.w, r0.xyzx, r2.xyzx

264.add r4.w, r2.w, r2.w

265.add r5.x, r0.w, -cb0[5].x

266.mul r5.x, r5.x, l(4.000000)

267.mad r4.w, r4.w, r4.w, -r5.x

268.max r4.w, r4.w, l(0.000000)

269.sqrt r4.w, r4.w

270.mad r2.w, -r2.w, l(2.000000), -r4.w

271.ge r4.w, l(0.000000), r2.w

272.if_nz r4.w

273. sqrt r0.w, r0.w

274. add r4.w, r0.w, -cb0[5].y

275. mul r5.x, r4.w, cb0[6].w

276. dp3 r1.x, r1.xyzx, r1.xyzx

277. sqrt r1.x, r1.x

278. ge r1.x, r0.w, r1.x

279. movc r6.xyz, r1.xxxx, -r2.xyzx, r2.xyzx

280. dp3 r1.y, r6.xyzx, r0.xyzx

281. div r0.w, r1.y, r0.w

282. mad r5.y, -r0.w, l(0.500000), l(0.500000)

283. sample_l r6.xyzw, r5.xyxx, t0.xyzw, s0, l(0.000000)

284. sample_l r5.xyzw, r5.xyxx, t2.xyzw, s1, l(0.000000)

285. dp4 r0.w, r5.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000)

286. ge r1.y, r0.w, l(0.999999)

287. movc r0.w, r1.y, l(1.000000), r0.w

288. mul r6.y, r0.w, cb0[8].x

289.else

290. mul r0.w, r2.w, l(0.500000)

291. mad r0.xyz, r2.xyzx, r0.wwww, r0.xyzx

292. mad r1.w, -r2.w, l(0.500000), r1.w

293. mov r6.xy, l(0,0,0,0)

294. mov r1.x, l(-1)

295.endif

296.ge r0.w, l(0.000001), r1.w

297.if_nz r0.w

298. mov o0.xyzw, r3.xyzw

299. mov o2.xyz, r4.xyzx

300. mov o3.xyz, l(0,0,0,0)

301. mov o4.xyz, l(0,0,0,0)

302. mov o1.xy, v2.xyxx

303. ret

304.endif

305.div r0.w, r1.w, cb0[7].w

306.mul r1.y, r0.w, cb0[6].w

307.mul r5.xyz, r0.wwww, r2.xyzx

308.mad r0.xyz, r5.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), r0.xyzx

309.ftoi r1.z, cb0[7].w

310.mov r5.xyz, l(0,0,0,0)

311.mov r7.xyz, l(0,0,0,0)

312.mov r8.xyz, r0.xyzx

313.mov r1.w, r1.x

314.mov r2.w, l(0)

315.loop

316. ige r4.w, r2.w, r1.z

317. breakc_nz r4.w

318. dp3 r4.w, r8.xyzx, r8.xyzx

319. sqrt r4.w, r4.w

320. dp3 r5.w, cb0[3].xyzx, r8.xyzx

321. div r5.w, r5.w, r4.w

322. add r6.z, r4.w, -cb0[5].y

323. mul r9.x, r6.z, cb0[6].w

324. mad r9.y, -r5.w, l(0.500000), l(0.500000)

325. sample_l r10.xyzw, r9.xyxx, t0.xyzw, s0, l(0.000000)

326. lt r5.w, r10.x, l(0.000001)

327. if_nz r5.w

328. break

329. endif

330. sample_l r11.xyzw, r9.xyxx, t1.xyzw, s2, l(0.000000)

331. dp4 r5.w, r11.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000)

332. ge r6.z, r5.w, l(0.999999)

333. movc r5.w, r6.z, l(1.000000), r5.w

334. sample_l r11.xyzw, r9.xyxx, t2.xyzw, s1, l(0.000000)

335. dp4 r6.z, r11.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000)

336. ge r6.w, r6.z, l(0.999999)

337. movc r6.z, r6.w, l(1.000000), r6.z

338. mul r10.xy, r1.yyyy, r10.xyxx

339. if_nz r1.w

340. dp3 r6.w, -r2.xyzx, r8.xyzx

341. div r6.w, r6.w, r4.w

342. mad r9.z, -r6.w, l(0.500000), l(0.500000)

343. sample_l r11.xyzw, r9.xzxx, t0.xyzw, s0, l(0.000000)

344. sample_l r12.xyzw, r9.xzxx, t2.xyzw, s1, l(0.000000)

345. dp4 r6.w, r12.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000)

346. ge r7.w, r6.w, l(0.999999)

347. movc r6.w, r7.w, l(1.000000), r6.w

348. add r7.w, -r6.x, r11.x

349. mad r11.x, r5.w, cb0[8].y, r7.w

350. mad r6.w, r6.w, cb0[8].x, -r6.y

351. mad r11.y, r6.z, cb0[8].x, r6.w

352. else

353. dp3 r6.w, r2.xyzx, r8.xyzx

354. div r4.w, r6.w, r4.w

355. mad r9.w, -r4.w, l(0.500000), l(0.500000)

356. sample_l r12.xyzw, r9.xwxx, t0.xyzw, s0, l(0.000000)

357. sample_l r9.xyzw, r9.xwxx, t2.xyzw, s1, l(0.000000)

358. dp4 r4.w, r9.xyzw, l(6.030862920E-008, 0.0000153787005, 0.00392156886, 1.000000)

359. ge r6.w, r4.w, l(0.999999)

360. movc r4.w, r6.w, l(1.000000), r4.w

361. add r6.w, r6.x, -r12.x

362. mad r11.x, r5.w, cb0[8].y, r6.w

363. mad r4.w, -r4.w, cb0[8].x, r6.y

364. mad r11.y, r6.z, cb0[8].x, r4.w

365. endif

366. mul r6.zw, r11.xxxy, cb0[6].yyyz

367. mad r9.xyz, -r6.zzzz, cb0[4].xyzx, -r6.wwww

368. mul r9.xyz, r9.xyzx, l(1.442695, 1.442695, 1.442695, 0.000000)

369. exp r9.xyz, r9.xyzx

370. mad r5.xyz, r10.xxxx, r9.xyzx, r5.xyzx

371. mad r7.xyz, r10.yyyy, r9.xyzx, r7.xyzx

372. mad r8.xyz, r2.xyzx, r0.wwww, r8.xyzx

373. iadd r2.w, r2.w, l(1)

374.endloop

375.mul r0.xyz, r5.xyzx, cb0[4].xyzx

376.mul o3.xyz, r0.xyzx, cb0[5].wwww

377.mul o4.xyz, r7.xyzx, cb0[6].xxxx

378.mov o0.xyzw, r3.xyzw

379.mov o2.xyz, r4.xyzx

380.mov o1.xy, v2.xyxx

381.ret

382.// Approximately 0 instruction slots used

383.

384.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

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 12/22/2018 06:59 AM   
Hey, thanks for the response. I tried the addition of stereo.x to o0.x but it didn't seem to make any difference to the result unfortunately.
Hey, thanks for the response. I tried the addition of stereo.x to o0.x but it didn't seem to make any difference to the result unfortunately.

Posted 12/22/2018 08:31 AM   
did you add the other part of the correction: [code] float4 stereo = StereoParams.Load(0); 112.float4 params2 = IniParams.Load(int2(1,0)); 113.float4 params = IniParams.Load(0); [/code] IF so it was woth a shot ;) Hopefully someone can post the fix for both our problems ;)
did you add the other part of the correction:


float4 stereo = StereoParams.Load(0);

112.float4 params2 = IniParams.Load(int2(1,0));

113.float4 params = IniParams.Load(0);


IF so it was woth a shot ;) Hopefully someone can post the fix for both our problems ;)

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 12/22/2018 06:59 PM   
Yep, I added that part. I even checked the log to ensure it compiled correctly and got substituted. Anyway, as you say, worth a shot. :)
Yep, I added that part. I even checked the log to ensure it compiled correctly and got substituted.

Anyway, as you say, worth a shot. :)

Posted 12/23/2018 02:48 AM   
Its fixed :) I ended up using the following formula instead float4 stereo = StereoParams.Load(0); o0.x += stereo.x * (o0.w - stereo.y); I found this in mx-2's fix for ELEX (Rain shadow of all things). Sure enough, works perfectly. Thanks Th3_N3philim for the nod in the right direction (and mx-2 for the correct formula).
Its fixed :) I ended up using the following formula instead

float4 stereo = StereoParams.Load(0);
o0.x += stereo.x * (o0.w - stereo.y);


I found this in mx-2's fix for ELEX (Rain shadow of all things). Sure enough, works perfectly.


Thanks Th3_N3philim for the nod in the right direction (and mx-2 for the correct formula).

Posted 12/24/2018 06:33 AM   
That's just the standard stereo correction formula: http://wiki.bo3b.net/index.php?title=Canonical_Stereo_Code
That's just the standard stereo correction formula:

http://wiki.bo3b.net/index.php?title=Canonical_Stereo_Code

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 12/24/2018 01:58 PM   
[quote="DarkStarSword"]That's just the standard stereo correction formula: http://wiki.bo3b.net/index.php?title=Canonical_Stereo_Code[/quote] Well, that's rather embarrassing ;)
DarkStarSword said:That's just the standard stereo correction formula:

http://wiki.bo3b.net/index.php?title=Canonical_Stereo_Code



Well, that's rather embarrassing ;)

Posted 12/24/2018 10:48 PM   
Hm,mm Guess I overthought that one .. ;) So DSS is mine an easy one too?? I really hate to ask again I was just going to let it go but I have another trouble shader and did not want to ask until I got the other one I posted back a page fixed.. I was just being patient as it is Christmas time and all..
Hm,mm Guess I overthought that one .. ;)

So DSS is mine an easy one too?? I really hate to ask again I was just going to let it go but I have another trouble shader and did not want to ask until I got the other one I posted back a page fixed..

I was just being patient as it is Christmas time and all..

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 12/25/2018 02:37 AM   
Maybe, maybe not. I'd have to look at that in context and do some experiments to see what happens. I do have Elite Dangerous (I've been playing in VR and using it to make sure we don't have any more 3DMigoto overlay regressions because of some quirks it has at startup), so I can probably take a look. Does that happen at any of the major stations, or should I go somewhere specific to find it?
Maybe, maybe not. I'd have to look at that in context and do some experiments to see what happens. I do have Elite Dangerous (I've been playing in VR and using it to make sure we don't have any more 3DMigoto overlay regressions because of some quirks it has at startup), so I can probably take a look. Does that happen at any of the major stations, or should I go somewhere specific to find 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 12/25/2018 06:38 AM   
Well thank you for helping ;) I beleive if you goto a station that looks like the 1 in the screenshot it should show there.. Yes Elite is such a fun game, I like the new minning goodies we now have like siesmec charges..
Well thank you for helping ;)

I beleive if you goto a station that looks like the 1 in the screenshot it should show there.. Yes Elite is such a fun game, I like the new minning goodies we now have like siesmec charges..

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 12/25/2018 06:56 AM   
OH, I almost forgot DSS, I disabled the red/Green lights so goto line 433 in the ini and disable that disable.. [code] ;red lights on station and bright lights in corners of dock..12-14 leave disabled for now needs double fix [shaderoverride15] hash=e29d91120fc28c8e [/code]
OH, I almost forgot DSS, I disabled the red/Green lights so goto line 433 in the ini and disable that disable..

;red lights on station and bright lights in corners of dock..12-14 leave disabled for now needs double fix
[shaderoverride15]
hash=e29d91120fc28c8e

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 12/27/2018 03:38 AM   
I've had a two disk failure on my game RAID 5 array (just several days after a less than year old WD Red drive failed in my MythTV box*) so I'll be spending some time verifying/reinstalling/rebuilding everything. * This drive failed to reallocate pending sectors when they were overwritten and the result was more files became corrupt after each repair attempt, striking several OS files (easy to identify via debsums) and eventually hitting an (inconsequential) table in the MythTV Mysql database. This is a major design flaw as any failed sector can never be trusted again, so I would recommend avoiding WD Red based on this experience.
I've had a two disk failure on my game RAID 5 array (just several days after a less than year old WD Red drive failed in my MythTV box*) so I'll be spending some time verifying/reinstalling/rebuilding everything.

* This drive failed to reallocate pending sectors when they were overwritten and the result was more files became corrupt after each repair attempt, striking several OS files (easy to identify via debsums) and eventually hitting an (inconsequential) table in the MythTV Mysql database. This is a major design flaw as any failed sector can never be trusted again, so I would recommend avoiding WD Red based on this experience.

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 12/27/2018 09:40 AM   
Hello, I discovered a strange thing with IL2BoS : a dumped shader was working in ASM but introduced texture flashing/glitches when used in HLSL ! By making some trials, I found that the problem is in these lines: [code] while (true) { r3.w = (int)r3.w + -1; r4.x = cmp((int)r3.w < 0); if (r4.x != 0) break; ... }[/code] When replaced by these ones, it worked [code] int flag; ... while (true) { flag=(int)r3.w; flag = flag - 1; if (flag >= 0 ) break; ... }[/code] The ASM code is here [code]loop iadd r3.w, r3.w, l(-1) ilt r4.x, r3.w, l(0) breakc_nz r4.x ...[/code] I do not understand why the default code produced by 3Dmigoto is not working...maybe linked to the "cmp" alias ? Anyway, I have some other graphic glitches and I wonder if this problem is also involved, but less trivial...
Hello,
I discovered a strange thing with IL2BoS : a dumped shader was working in ASM but introduced texture flashing/glitches when used in HLSL !

By making some trials, I found that the problem is in these lines:
while (true) {
r3.w = (int)r3.w + -1;
r4.x = cmp((int)r3.w < 0);
if (r4.x != 0) break;
...
}


When replaced by these ones, it worked
int flag;
...
while (true) {
flag=(int)r3.w;
flag = flag - 1;
if (flag >= 0 ) break;
...
}


The ASM code is here
loop
iadd r3.w, r3.w, l(-1)
ilt r4.x, r3.w, l(0)
breakc_nz r4.x
...


I do not understand why the default code produced by 3Dmigoto is not working...maybe linked to the "cmp" alias ?
Anyway, I have some other graphic glitches and I wonder if this problem is also involved, but less trivial...

Posted 12/31/2018 09:50 AM   
Hi mates, I'm finishing to fix Air Missions Hind and found (the last one i guess!) a sun light effect that don't have a vs - just ps...I can disable this effect easily but i don't know how to put it at sky depth. The ps file is attached and in code below. Any help is welcome! [url]https://www.dropbox.com/s/kkuydc7k4n07htp/2fae13c197689bb6-ps_replace.txt?dl=0[/url] [code]// ---- Created with 3Dmigoto v1.3.12 on Wed Jan 02 14:03:05 2019 cbuffer _Globals : register(b0) { float2 g_avSampleOffsets[16] : packoffset(c0); float4 g_avSampleWeights[16] : packoffset(c16); float g_fTexelWidth : packoffset(c32); float g_fTexelHeight : packoffset(c32.y); float g_fMiddleGray : packoffset(c32.z); float g_fElapsedTime : packoffset(c32.w); float g_fBloomScale : packoffset(c33); float g_fBrightTreshold : packoffset(c33.y); float g_fBrightOffset : packoffset(c33.z); float g_fAlphaFactor : packoffset(c33.w); float g_fBrightness : packoffset(c34); float g_fConstrast : packoffset(c34.y); float g_fSaturation : packoffset(c34.z); float g_fBlackAndWhite : packoffset(c34.w); float g_fColorBalanceR : packoffset(c35); float g_fColorBalanceG : packoffset(c35.y); float g_fColorBalanceB : packoffset(c35.z); float g_fAutoLevels : packoffset(c35.w); float g_fDofCentre : packoffset(c36); float g_fDofRange : packoffset(c36.y); float g_fDofMul : packoffset(c36.z); float4 g_CameraPosition : packoffset(c37); float4 FogColor : packoffset(c38); float FogDensity : packoffset(c39); float FogPow : packoffset(c39.y); float4 VolumeFogColor : packoffset(c40); float VolumeFogDensity : packoffset(c41); float VolumeFogPow : packoffset(c41.y); float VolumeFogHeightStart : packoffset(c41.z); float VolumeFogHeightEnd : packoffset(c41.w); float VolumeFogTileOffsetX : packoffset(c42); float VolumeFogTileOffsetZ : packoffset(c42.y); float VolumeFogTileSizeX : packoffset(c42.z); float VolumeFogTileSizeZ : packoffset(c42.w); float4x4 g_VolumeFogMatrixView : packoffset(c43); float4x4 g_VolumeFogMatrixProj : packoffset(c47); float AODisplayDistance : packoffset(c51); float AOTotalStrength : packoffset(c51.y); float AOBase : packoffset(c51.z); float AOArea : packoffset(c51.w); float AOFallOff : packoffset(c52); float AORadius : packoffset(c52.y); float4 LensSunPosition : packoffset(c53); float LensExposure : packoffset(c54); float LensBrightOffset : packoffset(c54.y); float LensDensity : packoffset(c54.z); float LensAttenuation : packoffset(c54.w); float4 mArrayPosition[5] : packoffset(c55); float4 mArrayCoord[5] : packoffset(c60); float NEAR : packoffset(c65) = {1}; float FAR : packoffset(c65.y) = {25000}; } SamplerState SamplerLinear_s : register(s0); Texture2D<float4> Texture2DStage0 : register(t0); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_Position0, float2 v1 : TEXCOORD0, out float4 o0 : SV_Target0) { float4 r0; uint4 bitmask, uiDest; float4 fDest; r0.xyzw = Texture2DStage0.Sample(SamplerLinear_s, v1.xy).xyzw; o0.xyz = g_fAlphaFactor * r0.xxx; o0.w = 1; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // using 3Dmigoto v1.3.12 on Wed Jan 02 14:03:05 2019 // // // Buffer Definitions: // // cbuffer $Globals // { // // float2 g_avSampleOffsets[16]; // Offset: 0 Size: 248 [unused] // float4 g_avSampleWeights[16]; // Offset: 256 Size: 256 [unused] // float g_fTexelWidth; // Offset: 512 Size: 4 [unused] // float g_fTexelHeight; // Offset: 516 Size: 4 [unused] // float g_fMiddleGray; // Offset: 520 Size: 4 [unused] // float g_fElapsedTime; // Offset: 524 Size: 4 [unused] // float g_fBloomScale; // Offset: 528 Size: 4 [unused] // float g_fBrightTreshold; // Offset: 532 Size: 4 [unused] // float g_fBrightOffset; // Offset: 536 Size: 4 [unused] // float g_fAlphaFactor; // Offset: 540 Size: 4 // float g_fBrightness; // Offset: 544 Size: 4 [unused] // float g_fConstrast; // Offset: 548 Size: 4 [unused] // float g_fSaturation; // Offset: 552 Size: 4 [unused] // float g_fBlackAndWhite; // Offset: 556 Size: 4 [unused] // float g_fColorBalanceR; // Offset: 560 Size: 4 [unused] // float g_fColorBalanceG; // Offset: 564 Size: 4 [unused] // float g_fColorBalanceB; // Offset: 568 Size: 4 [unused] // float g_fAutoLevels; // Offset: 572 Size: 4 [unused] // float g_fDofCentre; // Offset: 576 Size: 4 [unused] // float g_fDofRange; // Offset: 580 Size: 4 [unused] // float g_fDofMul; // Offset: 584 Size: 4 [unused] // float4 g_CameraPosition; // Offset: 592 Size: 16 [unused] // float4 FogColor; // Offset: 608 Size: 16 [unused] // float FogDensity; // Offset: 624 Size: 4 [unused] // float FogPow; // Offset: 628 Size: 4 [unused] // float4 VolumeFogColor; // Offset: 640 Size: 16 [unused] // float VolumeFogDensity; // Offset: 656 Size: 4 [unused] // float VolumeFogPow; // Offset: 660 Size: 4 [unused] // float VolumeFogHeightStart; // Offset: 664 Size: 4 [unused] // float VolumeFogHeightEnd; // Offset: 668 Size: 4 [unused] // float VolumeFogTileOffsetX; // Offset: 672 Size: 4 [unused] // float VolumeFogTileOffsetZ; // Offset: 676 Size: 4 [unused] // float VolumeFogTileSizeX; // Offset: 680 Size: 4 [unused] // float VolumeFogTileSizeZ; // Offset: 684 Size: 4 [unused] // float4x4 g_VolumeFogMatrixView; // Offset: 688 Size: 64 [unused] // float4x4 g_VolumeFogMatrixProj; // Offset: 752 Size: 64 [unused] // float AODisplayDistance; // Offset: 816 Size: 4 [unused] // float AOTotalStrength; // Offset: 820 Size: 4 [unused] // float AOBase; // Offset: 824 Size: 4 [unused] // float AOArea; // Offset: 828 Size: 4 [unused] // float AOFallOff; // Offset: 832 Size: 4 [unused] // float AORadius; // Offset: 836 Size: 4 [unused] // float4 LensSunPosition; // Offset: 848 Size: 16 [unused] // float LensExposure; // Offset: 864 Size: 4 [unused] // float LensBrightOffset; // Offset: 868 Size: 4 [unused] // float LensDensity; // Offset: 872 Size: 4 [unused] // float LensAttenuation; // Offset: 876 Size: 4 [unused] // float4 mArrayPosition[5]; // Offset: 880 Size: 80 [unused] // float4 mArrayCoord[5]; // Offset: 960 Size: 80 [unused] // float NEAR; // Offset: 1040 Size: 4 [unused] // = 0x3f800000 // float FAR; // Offset: 1044 Size: 4 [unused] // = 0x46c35000 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // SamplerLinear sampler NA NA 0 1 // Texture2DStage0 texture float4 2d 0 1 // $Globals cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float // TEXCOORD 0 xy 1 NONE float xy // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Target 0 xyzw 0 TARGET float xyzw // ps_4_0 dcl_constantbuffer cb0[34], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_input_ps linear v1.xy dcl_output o0.xyzw dcl_temps 1 sample r0.xyzw, v1.xyxx, t0.xyzw, s0 mul o0.xyz, r0.xxxx, cb0[33].wwww mov o0.w, l(1.000000) ret // Approximately 4 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/[/code]
Hi mates,
I'm finishing to fix Air Missions Hind and found (the last one i guess!) a sun light effect that don't have a vs - just ps...I can disable this effect easily but i don't know how to put it at sky depth. The ps file is attached and in code below. Any help is welcome!

https://www.dropbox.com/s/kkuydc7k4n07htp/2fae13c197689bb6-ps_replace.txt?dl=0

// ---- Created with 3Dmigoto v1.3.12 on Wed Jan 02 14:03:05 2019

cbuffer _Globals : register(b0)
{
float2 g_avSampleOffsets[16] : packoffset(c0);
float4 g_avSampleWeights[16] : packoffset(c16);
float g_fTexelWidth : packoffset(c32);
float g_fTexelHeight : packoffset(c32.y);
float g_fMiddleGray : packoffset(c32.z);
float g_fElapsedTime : packoffset(c32.w);
float g_fBloomScale : packoffset(c33);
float g_fBrightTreshold : packoffset(c33.y);
float g_fBrightOffset : packoffset(c33.z);
float g_fAlphaFactor : packoffset(c33.w);
float g_fBrightness : packoffset(c34);
float g_fConstrast : packoffset(c34.y);
float g_fSaturation : packoffset(c34.z);
float g_fBlackAndWhite : packoffset(c34.w);
float g_fColorBalanceR : packoffset(c35);
float g_fColorBalanceG : packoffset(c35.y);
float g_fColorBalanceB : packoffset(c35.z);
float g_fAutoLevels : packoffset(c35.w);
float g_fDofCentre : packoffset(c36);
float g_fDofRange : packoffset(c36.y);
float g_fDofMul : packoffset(c36.z);
float4 g_CameraPosition : packoffset(c37);
float4 FogColor : packoffset(c38);
float FogDensity : packoffset(c39);
float FogPow : packoffset(c39.y);
float4 VolumeFogColor : packoffset(c40);
float VolumeFogDensity : packoffset(c41);
float VolumeFogPow : packoffset(c41.y);
float VolumeFogHeightStart : packoffset(c41.z);
float VolumeFogHeightEnd : packoffset(c41.w);
float VolumeFogTileOffsetX : packoffset(c42);
float VolumeFogTileOffsetZ : packoffset(c42.y);
float VolumeFogTileSizeX : packoffset(c42.z);
float VolumeFogTileSizeZ : packoffset(c42.w);
float4x4 g_VolumeFogMatrixView : packoffset(c43);
float4x4 g_VolumeFogMatrixProj : packoffset(c47);
float AODisplayDistance : packoffset(c51);
float AOTotalStrength : packoffset(c51.y);
float AOBase : packoffset(c51.z);
float AOArea : packoffset(c51.w);
float AOFallOff : packoffset(c52);
float AORadius : packoffset(c52.y);
float4 LensSunPosition : packoffset(c53);
float LensExposure : packoffset(c54);
float LensBrightOffset : packoffset(c54.y);
float LensDensity : packoffset(c54.z);
float LensAttenuation : packoffset(c54.w);
float4 mArrayPosition[5] : packoffset(c55);
float4 mArrayCoord[5] : packoffset(c60);
float NEAR : packoffset(c65) = {1};
float FAR : packoffset(c65.y) = {25000};
}

SamplerState SamplerLinear_s : register(s0);
Texture2D<float4> Texture2DStage0 : register(t0);


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


void main(
float4 v0 : SV_Position0,
float2 v1 : TEXCOORD0,
out float4 o0 : SV_Target0)
{
float4 r0;
uint4 bitmask, uiDest;
float4 fDest;

r0.xyzw = Texture2DStage0.Sample(SamplerLinear_s, v1.xy).xyzw;
o0.xyz = g_fAlphaFactor * r0.xxx;
o0.w = 1;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// using 3Dmigoto v1.3.12 on Wed Jan 02 14:03:05 2019
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
// float2 g_avSampleOffsets[16]; // Offset: 0 Size: 248 [unused]
// float4 g_avSampleWeights[16]; // Offset: 256 Size: 256 [unused]
// float g_fTexelWidth; // Offset: 512 Size: 4 [unused]
// float g_fTexelHeight; // Offset: 516 Size: 4 [unused]
// float g_fMiddleGray; // Offset: 520 Size: 4 [unused]
// float g_fElapsedTime; // Offset: 524 Size: 4 [unused]
// float g_fBloomScale; // Offset: 528 Size: 4 [unused]
// float g_fBrightTreshold; // Offset: 532 Size: 4 [unused]
// float g_fBrightOffset; // Offset: 536 Size: 4 [unused]
// float g_fAlphaFactor; // Offset: 540 Size: 4
// float g_fBrightness; // Offset: 544 Size: 4 [unused]
// float g_fConstrast; // Offset: 548 Size: 4 [unused]
// float g_fSaturation; // Offset: 552 Size: 4 [unused]
// float g_fBlackAndWhite; // Offset: 556 Size: 4 [unused]
// float g_fColorBalanceR; // Offset: 560 Size: 4 [unused]
// float g_fColorBalanceG; // Offset: 564 Size: 4 [unused]
// float g_fColorBalanceB; // Offset: 568 Size: 4 [unused]
// float g_fAutoLevels; // Offset: 572 Size: 4 [unused]
// float g_fDofCentre; // Offset: 576 Size: 4 [unused]
// float g_fDofRange; // Offset: 580 Size: 4 [unused]
// float g_fDofMul; // Offset: 584 Size: 4 [unused]
// float4 g_CameraPosition; // Offset: 592 Size: 16 [unused]
// float4 FogColor; // Offset: 608 Size: 16 [unused]
// float FogDensity; // Offset: 624 Size: 4 [unused]
// float FogPow; // Offset: 628 Size: 4 [unused]
// float4 VolumeFogColor; // Offset: 640 Size: 16 [unused]
// float VolumeFogDensity; // Offset: 656 Size: 4 [unused]
// float VolumeFogPow; // Offset: 660 Size: 4 [unused]
// float VolumeFogHeightStart; // Offset: 664 Size: 4 [unused]
// float VolumeFogHeightEnd; // Offset: 668 Size: 4 [unused]
// float VolumeFogTileOffsetX; // Offset: 672 Size: 4 [unused]
// float VolumeFogTileOffsetZ; // Offset: 676 Size: 4 [unused]
// float VolumeFogTileSizeX; // Offset: 680 Size: 4 [unused]
// float VolumeFogTileSizeZ; // Offset: 684 Size: 4 [unused]
// float4x4 g_VolumeFogMatrixView; // Offset: 688 Size: 64 [unused]
// float4x4 g_VolumeFogMatrixProj; // Offset: 752 Size: 64 [unused]
// float AODisplayDistance; // Offset: 816 Size: 4 [unused]
// float AOTotalStrength; // Offset: 820 Size: 4 [unused]
// float AOBase; // Offset: 824 Size: 4 [unused]
// float AOArea; // Offset: 828 Size: 4 [unused]
// float AOFallOff; // Offset: 832 Size: 4 [unused]
// float AORadius; // Offset: 836 Size: 4 [unused]
// float4 LensSunPosition; // Offset: 848 Size: 16 [unused]
// float LensExposure; // Offset: 864 Size: 4 [unused]
// float LensBrightOffset; // Offset: 868 Size: 4 [unused]
// float LensDensity; // Offset: 872 Size: 4 [unused]
// float LensAttenuation; // Offset: 876 Size: 4 [unused]
// float4 mArrayPosition[5]; // Offset: 880 Size: 80 [unused]
// float4 mArrayCoord[5]; // Offset: 960 Size: 80 [unused]
// float NEAR; // Offset: 1040 Size: 4 [unused]
// = 0x3f800000
// float FAR; // Offset: 1044 Size: 4 [unused]
// = 0x46c35000
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerLinear sampler NA NA 0 1
// Texture2DStage0 texture float4 2d 0 1
// $Globals cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
ps_4_0
dcl_constantbuffer cb0[34], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 1
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul o0.xyz, r0.xxxx, cb0[33].wwww
mov o0.w, l(1.000000)
ret
// Approximately 4 instruction slots used

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

Posted 01/02/2019 04:16 PM   
[quote="arubinig"]Hi mates, I'm finishing to fix Air Missions Hind and found (the last one i guess!) a sun light effect that don't have a vs - just ps...I can disable this effect easily but i don't know how to put it at sky depth. The ps file is attached and in code below. Any help is welcome![/quote] Try this: [code]// ---- Created with 3Dmigoto v1.3.12 on Wed Jan 02 14:03:05 2019 cbuffer _Globals : register(b0) { float2 g_avSampleOffsets[16] : packoffset(c0); float4 g_avSampleWeights[16] : packoffset(c16); float g_fTexelWidth : packoffset(c32); float g_fTexelHeight : packoffset(c32.y); float g_fMiddleGray : packoffset(c32.z); float g_fElapsedTime : packoffset(c32.w); float g_fBloomScale : packoffset(c33); float g_fBrightTreshold : packoffset(c33.y); float g_fBrightOffset : packoffset(c33.z); float g_fAlphaFactor : packoffset(c33.w); float g_fBrightness : packoffset(c34); float g_fConstrast : packoffset(c34.y); float g_fSaturation : packoffset(c34.z); float g_fBlackAndWhite : packoffset(c34.w); float g_fColorBalanceR : packoffset(c35); float g_fColorBalanceG : packoffset(c35.y); float g_fColorBalanceB : packoffset(c35.z); float g_fAutoLevels : packoffset(c35.w); float g_fDofCentre : packoffset(c36); float g_fDofRange : packoffset(c36.y); float g_fDofMul : packoffset(c36.z); float4 g_CameraPosition : packoffset(c37); float4 FogColor : packoffset(c38); float FogDensity : packoffset(c39); float FogPow : packoffset(c39.y); float4 VolumeFogColor : packoffset(c40); float VolumeFogDensity : packoffset(c41); float VolumeFogPow : packoffset(c41.y); float VolumeFogHeightStart : packoffset(c41.z); float VolumeFogHeightEnd : packoffset(c41.w); float VolumeFogTileOffsetX : packoffset(c42); float VolumeFogTileOffsetZ : packoffset(c42.y); float VolumeFogTileSizeX : packoffset(c42.z); float VolumeFogTileSizeZ : packoffset(c42.w); float4x4 g_VolumeFogMatrixView : packoffset(c43); float4x4 g_VolumeFogMatrixProj : packoffset(c47); float AODisplayDistance : packoffset(c51); float AOTotalStrength : packoffset(c51.y); float AOBase : packoffset(c51.z); float AOArea : packoffset(c51.w); float AOFallOff : packoffset(c52); float AORadius : packoffset(c52.y); float4 LensSunPosition : packoffset(c53); float LensExposure : packoffset(c54); float LensBrightOffset : packoffset(c54.y); float LensDensity : packoffset(c54.z); float LensAttenuation : packoffset(c54.w); float4 mArrayPosition[5] : packoffset(c55); float4 mArrayCoord[5] : packoffset(c60); float NEAR : packoffset(c65) = {1}; float FAR : packoffset(c65.y) = {25000}; } SamplerState SamplerLinear_s : register(s0); Texture2D<float4> Texture2DStage0 : register(t0); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_Position0, float2 v1 : TEXCOORD0, out float4 o0 : SV_Target0) { float4 r0; uint4 bitmask, uiDest; float4 fDest; float4 stereo = StereoParams.Load(0); v1.x -= stereo.x; r0.xyzw = Texture2DStage0.Sample(SamplerLinear_s, v1.xy).xyzw; o0.xyz = g_fAlphaFactor * r0.xxx; o0.w = 1; return; }[/code] If that doesn't work, try setting "marking_mode=pink" in the d3dx.ini file and cycle through the shaders again to see if you can find any other VS or PS.
arubinig said:Hi mates,
I'm finishing to fix Air Missions Hind and found (the last one i guess!) a sun light effect that don't have a vs - just ps...I can disable this effect easily but i don't know how to put it at sky depth. The ps file is attached and in code below. Any help is welcome!


Try this:
// ---- Created with 3Dmigoto v1.3.12 on Wed Jan 02 14:03:05 2019

cbuffer _Globals : register(b0)
{
float2 g_avSampleOffsets[16] : packoffset(c0);
float4 g_avSampleWeights[16] : packoffset(c16);
float g_fTexelWidth : packoffset(c32);
float g_fTexelHeight : packoffset(c32.y);
float g_fMiddleGray : packoffset(c32.z);
float g_fElapsedTime : packoffset(c32.w);
float g_fBloomScale : packoffset(c33);
float g_fBrightTreshold : packoffset(c33.y);
float g_fBrightOffset : packoffset(c33.z);
float g_fAlphaFactor : packoffset(c33.w);
float g_fBrightness : packoffset(c34);
float g_fConstrast : packoffset(c34.y);
float g_fSaturation : packoffset(c34.z);
float g_fBlackAndWhite : packoffset(c34.w);
float g_fColorBalanceR : packoffset(c35);
float g_fColorBalanceG : packoffset(c35.y);
float g_fColorBalanceB : packoffset(c35.z);
float g_fAutoLevels : packoffset(c35.w);
float g_fDofCentre : packoffset(c36);
float g_fDofRange : packoffset(c36.y);
float g_fDofMul : packoffset(c36.z);
float4 g_CameraPosition : packoffset(c37);
float4 FogColor : packoffset(c38);
float FogDensity : packoffset(c39);
float FogPow : packoffset(c39.y);
float4 VolumeFogColor : packoffset(c40);
float VolumeFogDensity : packoffset(c41);
float VolumeFogPow : packoffset(c41.y);
float VolumeFogHeightStart : packoffset(c41.z);
float VolumeFogHeightEnd : packoffset(c41.w);
float VolumeFogTileOffsetX : packoffset(c42);
float VolumeFogTileOffsetZ : packoffset(c42.y);
float VolumeFogTileSizeX : packoffset(c42.z);
float VolumeFogTileSizeZ : packoffset(c42.w);
float4x4 g_VolumeFogMatrixView : packoffset(c43);
float4x4 g_VolumeFogMatrixProj : packoffset(c47);
float AODisplayDistance : packoffset(c51);
float AOTotalStrength : packoffset(c51.y);
float AOBase : packoffset(c51.z);
float AOArea : packoffset(c51.w);
float AOFallOff : packoffset(c52);
float AORadius : packoffset(c52.y);
float4 LensSunPosition : packoffset(c53);
float LensExposure : packoffset(c54);
float LensBrightOffset : packoffset(c54.y);
float LensDensity : packoffset(c54.z);
float LensAttenuation : packoffset(c54.w);
float4 mArrayPosition[5] : packoffset(c55);
float4 mArrayCoord[5] : packoffset(c60);
float NEAR : packoffset(c65) = {1};
float FAR : packoffset(c65.y) = {25000};
}

SamplerState SamplerLinear_s : register(s0);
Texture2D<float4> Texture2DStage0 : register(t0);


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


void main(
float4 v0 : SV_Position0,
float2 v1 : TEXCOORD0,
out float4 o0 : SV_Target0)
{
float4 r0;
uint4 bitmask, uiDest;
float4 fDest;

float4 stereo = StereoParams.Load(0);
v1.x -= stereo.x;

r0.xyzw = Texture2DStage0.Sample(SamplerLinear_s, v1.xy).xyzw;
o0.xyz = g_fAlphaFactor * r0.xxx;
o0.w = 1;
return;
}


If that doesn't work, try setting "marking_mode=pink" in the d3dx.ini file and cycle through the shaders again to see if you can find any other VS or PS.

Dual boot Win 7 x64 & Win 10 (1809) | Geforce Drivers 417.35

Posted 01/03/2019 06:44 AM   
  86 / 87    
Scroll To Top