Advertisement
Guest User

Untitled

a guest
Mar 19th, 2023
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.21 KB | None | 0 0
  1. Last login: Sun Mar 19 08:00:54 on ttys000
  2.  
  3. The default interactive shell is now zsh.
  4. To update your account to use zsh, please run `chsh -s /bin/zsh`.
  5. For more details, please visit https://support.apple.com/kb/HT208050.
  6. Daniels-MacBook-Pro:~ daniel$ /Applications/Hugin/tools_mac/nona -o test --gpu --debug test.pto
  7. nona: using graphics card: Apple Apple M1 Pro
  8. destStart=[0, 0]
  9. destEnd=[3704, 2750]
  10. destSize=[(3704, 2750)]
  11. srcSize=[(4000, 3000)]
  12. srcBuffer=0x7f96f3900000
  13. srcAlphaBuffer=0x0
  14. destBuffer=0x7f96f5b5c000
  15. destAlphaBuffer=0x7f9700000000
  16. destGLInternalFormat=GL_RGBA8
  17. destGLFormat=GL_RGB
  18. destGLType=GL_UNSIGNED_BYTE
  19. srcGLInternalFormat=GL_RGBA8
  20. srcGLFormat=GL_RGB
  21. srcGLType=GL_UNSIGNED_BYTE
  22. srcAlphaGLType=GL_BYTE
  23. destAlphaGLType=GL_UNSIGNED_BYTE
  24.  
  25. warparound=0
  26. needsAtanWorkaround=0
  27. Retrieving GL_MAX_RECTANGLE_TEXTURE_SIZE: 16384
  28. Testing texture size 16384, result=16384
  29. maxTextureSize=16384
  30. Source chunks:
  31. [(0, 0) to (4000, 3000) = (4000x3000)]
  32. Dest chunks:
  33. [(0, 0) to (3704, 2750) = (3704x2750)]
  34. Total GPU memory used: 532184000
  35. Interpolator chunks:
  36. [(0, 0) to (4, 4) = (4x4)]
  37. #version 110
  38. #extension GL_ARB_texture_rectangle : enable
  39. uniform sampler2DRect SrcTexture;
  40. float sinh(in float x) { return (exp(x) - exp(-x)) / 2.0; }
  41. float cosh(in float x) { return (exp(x) + exp(-x)) / 2.0; }
  42. float atan2_xge0(const in float y, const in float x) {
  43. return atan(y, x);
  44. }
  45. float atan2_safe(const in float y, const in float x) {
  46. return atan(y, x);
  47. }
  48. float atan_safe(const in float yx) {
  49. return atan(yx);
  50. }
  51. void main(void)
  52. {
  53. float discardA = 1.0;
  54. float discardB = 0.0;
  55. vec2 src = gl_TexCoord[0].st;
  56. src -= vec2(1850.0000000000000000, 1375.0000000000000000);
  57.  
  58. // erect_rect(2565.4893433121469570)
  59. src.t = 2565.4893433121469570 * atan2_xge0(src.t, length(vec2(2565.4893433121469570, src.s)));
  60. src.s = 2565.4893433121469570 * atan2_safe(src.s, 2565.4893433121469570);
  61.  
  62. // rotate_erect(8059.7224738123431962, -0.0000000000000000000)
  63. {
  64. //src.s += -0.0000000000000000000;
  65. float w = (abs(src.s) > 8059.7224738123431962) ? 1.0 : 0.0;
  66. float n = (src.s < 0.0) ? 0.5 : -0.5;
  67. src.s += w * -16119.444947624686392 * ceil(src.s / 16119.444947624686392 + n);
  68. }
  69.  
  70. // sphere_tp_erect(2565.4893433121469570)
  71. {
  72. float phi = src.s / 2565.4893433121469570;
  73. float theta = -src.t / 2565.4893433121469570 + 1.5707963267948965580;
  74. if (theta < 0.0) {
  75. theta = -theta;
  76. phi += 3.1415926535897931160;
  77. }
  78. if (theta > 3.1415926535897931160) {
  79. theta = 3.1415926535897931160 - (theta - 3.1415926535897931160);
  80. phi += 3.1415926535897931160;
  81. }
  82. float s = sin(theta);
  83. vec2 v = vec2(s * sin(phi), cos(theta));
  84. float r = length(v);
  85. theta = 2565.4893433121469570 * atan2_safe(r, s * cos(phi));
  86. src = v * (theta / r);
  87. }
  88.  
  89. // persp_sphere(2565.4893433121469570)
  90. {
  91. mat3 m = mat3(1.0000000000000000000, 0.0000000000000000000, 0.0000000000000000000,
  92. 0.0000000000000000000, 1.0000000000000000000, 0.0000000000000000000,
  93. 0.0000000000000000000, 0.0000000000000000000, 1.0000000000000000000);
  94. float r = length(src);
  95. float theta = r / 2565.4893433121469570;
  96. float s = 0.0;
  97. if (r != 0.0) s = sin(theta) / r;
  98. vec3 v = vec3(s * src.s, s * src.t, cos(theta));
  99. vec3 u = v * m;
  100. r = length(u.st);
  101. theta = 0.0;
  102. if (r != 0.0) theta = 2565.4893433121469570 * atan2_safe(r, u.p) / r;
  103. src = theta * u.st;
  104. }
  105.  
  106. // rect_sphere_tp(2565.4893433121469570)
  107. {
  108. float r = length(src);
  109. float theta = r / 2565.4893433121469570;
  110. float rho = 0.0;
  111. if (theta >= 1.5707963267948965580) rho = 1.6e16;
  112. else if (theta == 0.0) rho = 1.0;
  113. else rho = tan(theta) / theta;
  114. src *= rho;
  115. }
  116.  
  117. // resize(1.0810807128353780993, 1.0810807128353780993)
  118. src *= vec2(1.0810807128353780993, 1.0810807128353780993);
  119.  
  120. src += vec2(1999.5000000000000000, 1499.5000000000000000);
  121.  
  122. src = src * discardA + vec2(-1000.0, -1000.0) * discardB;
  123. gl_FragColor = vec4(src.s, 0.0, 0.0, src.t);
  124. }
  125. #version 110
  126. #extension GL_ARB_texture_rectangle : enable
  127. uniform sampler2DRect CoordTexture;
  128. uniform sampler2DRect SrcTexture;
  129. uniform sampler2DRect AccumTexture;
  130. uniform vec2 SrcUL;
  131. uniform vec2 SrcLR;
  132. uniform vec2 KernelUL;
  133. uniform vec2 KernelWH;
  134. float w(const in float i, const in float f) {
  135. float A = -0.75000000000000000000;
  136. float c = abs(i - 1.0);
  137. float m = (i > 1.0) ? -1.0 : 1.0;
  138. float p = c + m * f;
  139. if (i == 1.0 || i == 2.0) {
  140. return (( A + 2.0 )*p - ( A + 3.0 ))*p*p + 1.0;
  141. } else {
  142. return (( A * p - 5.0 * A ) * p + 8.0 * A ) * p - 4.0 * A;
  143. }
  144. }
  145. void main(void)
  146. {
  147. vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
  148. vec4 accum = texture2DRect(AccumTexture, gl_TexCoord[0].st);
  149.  
  150. src -= SrcUL;
  151. vec2 t = floor(src) + -0.50000000000000000000;
  152. vec2 f = fract(src);
  153. vec2 k = vec2(0.0, 0.0);
  154.  
  155. for (float ky = 0.0; ky < 4.0000000000000000000; ky += 1.0) {
  156. k.t = ky + KernelUL.t;
  157. float wy = w(k.t, f.t);
  158. for (float kx = 0.0; kx < 4.0000000000000000000; kx += 1.0) {
  159. k.s = kx + KernelUL.s;
  160. float wx = w(k.s, f.s);
  161. vec2 ix = t + k;
  162. vec4 sp = texture2DRect(SrcTexture, ix);
  163. float weight = wx * wy * sp.a;
  164. accum += sp * weight;
  165. }
  166. }
  167.  
  168. gl_FragColor = accum;
  169. }
  170.  
  171. #version 120
  172. #extension GL_ARB_texture_rectangle : enable
  173. uniform sampler2DRect NormTexture;
  174. uniform sampler2DRect CoordTexture;
  175. uniform sampler2DRect InvLutTexture;
  176. uniform sampler2DRect DestLutTexture;
  177. void main(void)
  178. {
  179. // Normalization
  180. vec4 n = texture2DRect(NormTexture, gl_TexCoord[0].st);
  181. vec4 p = vec4(0.0, 0.0, 0.0, 0.0);
  182. if (n.a >= 0.2) p = n / n.a;
  183.  
  184. // Photometric
  185. // invLutSize = 256.00000000000000000
  186. // pixelMax = 255.00000000000000000
  187. // destLutSize = 1024.0000000000000000
  188. // destExposure = 0.00019929594818414287749
  189. // srcExposure = 0.00019929847914560141152
  190. // whiteBalanceRed = 1.0000000000000000000
  191. // whiteBalanceBlue = 1.0000000000000000000
  192. p.rgb = p.rgb * 255.00000000000000000;
  193. vec2 invR = texture2DRect(InvLutTexture, vec2(p.r, 0.0)).sq;
  194. vec2 invG = texture2DRect(InvLutTexture, vec2(p.g, 0.0)).sq;
  195. vec2 invB = texture2DRect(InvLutTexture, vec2(p.b, 0.0)).sq;
  196. vec3 invX = vec3(invR.x, invG.x, invB.x);
  197. vec3 invY = vec3(invR.y, invG.y, invB.y);
  198. vec3 invA = fract(p.rgb);
  199. p.rgb = mix(invX, invY, invA);
  200. // VigCorrMode=VIGCORR_RADIAL
  201. float vig = 1.0;
  202. {
  203. vec2 vigCorrCenter = vec2(1999.5000000000000000, 1499.5000000000000000);
  204. float radiusScale=0.00040000000000000001917;
  205. float radialVigCorrCoeff0 = 1.0000000000000000000;
  206. float radialVigCorrCoeff1 = 0.0000000000000000000;
  207. float radialVigCorrCoeff2 = 0.0000000000000000000;
  208. float radialVigCorrCoeff3 = 0.0000000000000000000;
  209. vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
  210. vec2 d = src - vigCorrCenter;
  211. d *= radiusScale;
  212. vig = radialVigCorrCoeff0;
  213. float r2 = dot(d, d);
  214. float r = r2;
  215. vig += radialVigCorrCoeff1 * r;
  216. r *= r2;
  217. vig += radialVigCorrCoeff2 * r;
  218. r *= r2;
  219. vig += radialVigCorrCoeff3 * r;
  220. }
  221. vec3 exposure_whitebalance = vec3(0.99998730064840746223, 0.99998730064840746223, 0.99998730064840746223);
  222. p.rgb = (p.rgb * exposure_whitebalance) / vig;
  223. p.rgb = p.rgb * 1023.0000000000000000;
  224. vec2 destR = texture2DRect(DestLutTexture, vec2(p.r, 0.0)).sq;
  225. vec2 destG = texture2DRect(DestLutTexture, vec2(p.g, 0.0)).sq;
  226. vec2 destB = texture2DRect(DestLutTexture, vec2(p.b, 0.0)).sq;
  227. vec3 destX = vec3(destR.x, destG.x, destB.x);
  228. vec3 destY = vec3(destR.y, destG.y, destB.y);
  229. vec3 destA = fract(p.rgb);
  230. p.rgb = mix(destX, destY, destA);
  231.  
  232. gl_FragColor = p;
  233. }
  234.  
  235. gpu shader program compile time = 0.014
  236. gpu shader texture/framebuffer setup time = 0.001
  237. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] coord image render time = 0.049
  238. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] src upload = 0.037
  239. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] src render = 0.004
  240. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] interpolation chunk=[(0, 0) to (4, 4) = (4x4)] setup = 0.009
  241. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] interpolation chunk=[(0, 0) to (4, 4) = (4x4)] render = 0.014
  242. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] normalization setup = 0
  243. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] normalization render = 0.004
  244. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest rgb disassembly setup = 0
  245. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest rgb disassembly render = 0.003
  246. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] rgb readback = 0.004
  247. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest alpha disassembly setup = 0
  248. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest alpha disassembly render = 0.003
  249. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] alpha readback = 0.002
  250. gpu destruct time = 0.006
  251. gpu total time = 0.15
  252. destStart=[0, 0]
  253. destEnd=[3704, 2750]
  254. destSize=[(3704, 2750)]
  255. srcSize=[(4000, 3000)]
  256. srcBuffer=0x7f96f3900000
  257. srcAlphaBuffer=0x0
  258. destBuffer=0x7f96f5b5c000
  259. destAlphaBuffer=0x7f9710000000
  260. destGLInternalFormat=GL_RGBA8
  261. destGLFormat=GL_RGB
  262. destGLType=GL_UNSIGNED_BYTE
  263. srcGLInternalFormat=GL_RGBA8
  264. srcGLFormat=GL_RGB
  265. srcGLType=GL_UNSIGNED_BYTE
  266. srcAlphaGLType=GL_BYTE
  267. destAlphaGLType=GL_UNSIGNED_BYTE
  268.  
  269. warparound=0
  270. needsAtanWorkaround=0
  271. Retrieving GL_MAX_RECTANGLE_TEXTURE_SIZE: 16384
  272. Testing texture size 16384, result=16384
  273. maxTextureSize=16384
  274. Source chunks:
  275. [(0, 0) to (4000, 3000) = (4000x3000)]
  276. Dest chunks:
  277. [(0, 0) to (3704, 2750) = (3704x2750)]
  278. Total GPU memory used: 532184000
  279. Interpolator chunks:
  280. [(0, 0) to (4, 4) = (4x4)]
  281. #version 110
  282. #extension GL_ARB_texture_rectangle : enable
  283. uniform sampler2DRect SrcTexture;
  284. float sinh(in float x) { return (exp(x) - exp(-x)) / 2.0; }
  285. float cosh(in float x) { return (exp(x) + exp(-x)) / 2.0; }
  286. float atan2_xge0(const in float y, const in float x) {
  287. return atan(y, x);
  288. }
  289. float atan2_safe(const in float y, const in float x) {
  290. return atan(y, x);
  291. }
  292. float atan_safe(const in float yx) {
  293. return atan(yx);
  294. }
  295. void main(void)
  296. {
  297. float discardA = 1.0;
  298. float discardB = 0.0;
  299. vec2 src = gl_TexCoord[0].st;
  300. src -= vec2(1850.0000000000000000, 1375.0000000000000000);
  301.  
  302. // erect_rect(2565.4893433121469570)
  303. src.t = 2565.4893433121469570 * atan2_xge0(src.t, length(vec2(2565.4893433121469570, src.s)));
  304. src.s = 2565.4893433121469570 * atan2_safe(src.s, 2565.4893433121469570);
  305.  
  306. // rotate_erect(8059.7224738123431962, 0.62763801957168108281)
  307. {
  308. src.s += 0.62763801957168108281;
  309. float w = (abs(src.s) > 8059.7224738123431962) ? 1.0 : 0.0;
  310. float n = (src.s < 0.0) ? 0.5 : -0.5;
  311. src.s += w * -16119.444947624686392 * ceil(src.s / 16119.444947624686392 + n);
  312. }
  313.  
  314. // sphere_tp_erect(2565.4893433121469570)
  315. {
  316. float phi = src.s / 2565.4893433121469570;
  317. float theta = -src.t / 2565.4893433121469570 + 1.5707963267948965580;
  318. if (theta < 0.0) {
  319. theta = -theta;
  320. phi += 3.1415926535897931160;
  321. }
  322. if (theta > 3.1415926535897931160) {
  323. theta = 3.1415926535897931160 - (theta - 3.1415926535897931160);
  324. phi += 3.1415926535897931160;
  325. }
  326. float s = sin(theta);
  327. vec2 v = vec2(s * sin(phi), cos(theta));
  328. float r = length(v);
  329. theta = 2565.4893433121469570 * atan2_safe(r, s * cos(phi));
  330. src = v * (theta / r);
  331. }
  332.  
  333. // persp_sphere(2565.4893433121469570)
  334. {
  335. mat3 m = mat3(0.99999999761966595901, 6.8997594513900772722e-05, 1.0996696250148663720e-09,
  336. -6.8997594522663918096e-05, 0.99999999749265933158, 1.5937796527617674111e-05,
  337. 0.0000000000000000000, -1.5937796565554955059e-05, 0.99999999987299337256);
  338. float r = length(src);
  339. float theta = r / 2565.4893433121469570;
  340. float s = 0.0;
  341. if (r != 0.0) s = sin(theta) / r;
  342. vec3 v = vec3(s * src.s, s * src.t, cos(theta));
  343. vec3 u = v * m;
  344. r = length(u.st);
  345. theta = 0.0;
  346. if (r != 0.0) theta = 2565.4893433121469570 * atan2_safe(r, u.p) / r;
  347. src = theta * u.st;
  348. }
  349.  
  350. // rect_sphere_tp(2565.4893433121469570)
  351. {
  352. float r = length(src);
  353. float theta = r / 2565.4893433121469570;
  354. float rho = 0.0;
  355. if (theta >= 1.5707963267948965580) rho = 1.6e16;
  356. else if (theta == 0.0) rho = 1.0;
  357. else rho = tan(theta) / theta;
  358. src *= rho;
  359. }
  360.  
  361. // resize(1.0810807128353780993, 1.0810807128353780993)
  362. src *= vec2(1.0810807128353780993, 1.0810807128353780993);
  363.  
  364. src += vec2(1999.5000000000000000, 1499.5000000000000000);
  365.  
  366. src = src * discardA + vec2(-1000.0, -1000.0) * discardB;
  367. gl_FragColor = vec4(src.s, 0.0, 0.0, src.t);
  368. }
  369. #version 110
  370. #extension GL_ARB_texture_rectangle : enable
  371. uniform sampler2DRect CoordTexture;
  372. uniform sampler2DRect SrcTexture;
  373. uniform sampler2DRect AccumTexture;
  374. uniform vec2 SrcUL;
  375. uniform vec2 SrcLR;
  376. uniform vec2 KernelUL;
  377. uniform vec2 KernelWH;
  378. float w(const in float i, const in float f) {
  379. float A = -0.75000000000000000000;
  380. float c = abs(i - 1.0);
  381. float m = (i > 1.0) ? -1.0 : 1.0;
  382. float p = c + m * f;
  383. if (i == 1.0 || i == 2.0) {
  384. return (( A + 2.0 )*p - ( A + 3.0 ))*p*p + 1.0;
  385. } else {
  386. return (( A * p - 5.0 * A ) * p + 8.0 * A ) * p - 4.0 * A;
  387. }
  388. }
  389. void main(void)
  390. {
  391. vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
  392. vec4 accum = texture2DRect(AccumTexture, gl_TexCoord[0].st);
  393.  
  394. src -= SrcUL;
  395. vec2 t = floor(src) + -0.50000000000000000000;
  396. vec2 f = fract(src);
  397. vec2 k = vec2(0.0, 0.0);
  398.  
  399. for (float ky = 0.0; ky < 4.0000000000000000000; ky += 1.0) {
  400. k.t = ky + KernelUL.t;
  401. float wy = w(k.t, f.t);
  402. for (float kx = 0.0; kx < 4.0000000000000000000; kx += 1.0) {
  403. k.s = kx + KernelUL.s;
  404. float wx = w(k.s, f.s);
  405. vec2 ix = t + k;
  406. vec4 sp = texture2DRect(SrcTexture, ix);
  407. float weight = wx * wy * sp.a;
  408. accum += sp * weight;
  409. }
  410. }
  411.  
  412. gl_FragColor = accum;
  413. }
  414.  
  415. #version 120
  416. #extension GL_ARB_texture_rectangle : enable
  417. uniform sampler2DRect NormTexture;
  418. uniform sampler2DRect CoordTexture;
  419. uniform sampler2DRect InvLutTexture;
  420. uniform sampler2DRect DestLutTexture;
  421. void main(void)
  422. {
  423. // Normalization
  424. vec4 n = texture2DRect(NormTexture, gl_TexCoord[0].st);
  425. vec4 p = vec4(0.0, 0.0, 0.0, 0.0);
  426. if (n.a >= 0.2) p = n / n.a;
  427.  
  428. // Photometric
  429. // invLutSize = 256.00000000000000000
  430. // pixelMax = 255.00000000000000000
  431. // destLutSize = 1024.0000000000000000
  432. // destExposure = 0.00019929594818414287749
  433. // srcExposure = 0.00012755103081087685235
  434. // whiteBalanceRed = 1.0000000000000000000
  435. // whiteBalanceBlue = 1.0000000000000000000
  436. p.rgb = p.rgb * 255.00000000000000000;
  437. vec2 invR = texture2DRect(InvLutTexture, vec2(p.r, 0.0)).sq;
  438. vec2 invG = texture2DRect(InvLutTexture, vec2(p.g, 0.0)).sq;
  439. vec2 invB = texture2DRect(InvLutTexture, vec2(p.b, 0.0)).sq;
  440. vec3 invX = vec3(invR.x, invG.x, invB.x);
  441. vec3 invY = vec3(invR.y, invG.y, invB.y);
  442. vec3 invA = fract(p.rgb);
  443. p.rgb = mix(invX, invY, invA);
  444. // VigCorrMode=VIGCORR_RADIAL
  445. float vig = 1.0;
  446. {
  447. vec2 vigCorrCenter = vec2(1999.5000000000000000, 1499.5000000000000000);
  448. float radiusScale=0.00040000000000000001917;
  449. float radialVigCorrCoeff0 = 1.0000000000000000000;
  450. float radialVigCorrCoeff1 = 0.0000000000000000000;
  451. float radialVigCorrCoeff2 = 0.0000000000000000000;
  452. float radialVigCorrCoeff3 = 0.0000000000000000000;
  453. vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
  454. vec2 d = src - vigCorrCenter;
  455. d *= radiusScale;
  456. vig = radialVigCorrCoeff0;
  457. float r2 = dot(d, d);
  458. float r = r2;
  459. vig += radialVigCorrCoeff1 * r;
  460. r *= r2;
  461. vig += radialVigCorrCoeff2 * r;
  462. r *= r2;
  463. vig += radialVigCorrCoeff3 * r;
  464. }
  465. vec3 exposure_whitebalance = vec3(1.5624801063320612471, 1.5624801063320612471, 1.5624801063320612471);
  466. p.rgb = (p.rgb * exposure_whitebalance) / vig;
  467. p.rgb = p.rgb * 1023.0000000000000000;
  468. vec2 destR = texture2DRect(DestLutTexture, vec2(p.r, 0.0)).sq;
  469. vec2 destG = texture2DRect(DestLutTexture, vec2(p.g, 0.0)).sq;
  470. vec2 destB = texture2DRect(DestLutTexture, vec2(p.b, 0.0)).sq;
  471. vec3 destX = vec3(destR.x, destG.x, destB.x);
  472. vec3 destY = vec3(destR.y, destG.y, destB.y);
  473. vec3 destA = fract(p.rgb);
  474. p.rgb = mix(destX, destY, destA);
  475.  
  476. gl_FragColor = p;
  477. }
  478.  
  479. gpu shader program compile time = 0.007
  480. gpu shader texture/framebuffer setup time = 0.001
  481. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] coord image render time = 0.018
  482. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] src upload = 0.025
  483. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] src render = 0.003
  484. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] interpolation chunk=[(0, 0) to (4, 4) = (4x4)] setup = 0.009
  485. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] interpolation chunk=[(0, 0) to (4, 4) = (4x4)] render = 0.014
  486. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] normalization setup = 0
  487. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] normalization render = 0.003
  488. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest rgb disassembly setup = 0
  489. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest rgb disassembly render = 0.003
  490. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] rgb readback = 0.002
  491. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest alpha disassembly setup = 0
  492. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest alpha disassembly render = 0.003
  493. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] alpha readback = 0.002
  494. gpu destruct time = 0.005
  495. gpu total time = 0.096
  496. destStart=[0, 0]
  497. destEnd=[3704, 2750]
  498. destSize=[(3704, 2750)]
  499. srcSize=[(4000, 3000)]
  500. srcBuffer=0x7f96f3900000
  501. srcAlphaBuffer=0x0
  502. destBuffer=0x7f96f5b5c000
  503. destAlphaBuffer=0x7f9700000000
  504. destGLInternalFormat=GL_RGBA8
  505. destGLFormat=GL_RGB
  506. destGLType=GL_UNSIGNED_BYTE
  507. srcGLInternalFormat=GL_RGBA8
  508. srcGLFormat=GL_RGB
  509. srcGLType=GL_UNSIGNED_BYTE
  510. srcAlphaGLType=GL_BYTE
  511. destAlphaGLType=GL_UNSIGNED_BYTE
  512.  
  513. warparound=0
  514. needsAtanWorkaround=0
  515. Retrieving GL_MAX_RECTANGLE_TEXTURE_SIZE: 16384
  516. Testing texture size 16384, result=16384
  517. maxTextureSize=16384
  518. Source chunks:
  519. [(0, 0) to (4000, 3000) = (4000x3000)]
  520. Dest chunks:
  521. [(0, 0) to (3704, 2750) = (3704x2750)]
  522. Total GPU memory used: 532184000
  523. Interpolator chunks:
  524. [(0, 0) to (4, 4) = (4x4)]
  525. #version 110
  526. #extension GL_ARB_texture_rectangle : enable
  527. uniform sampler2DRect SrcTexture;
  528. float sinh(in float x) { return (exp(x) - exp(-x)) / 2.0; }
  529. float cosh(in float x) { return (exp(x) + exp(-x)) / 2.0; }
  530. float atan2_xge0(const in float y, const in float x) {
  531. return atan(y, x);
  532. }
  533. float atan2_safe(const in float y, const in float x) {
  534. return atan(y, x);
  535. }
  536. float atan_safe(const in float yx) {
  537. return atan(yx);
  538. }
  539. void main(void)
  540. {
  541. float discardA = 1.0;
  542. float discardB = 0.0;
  543. vec2 src = gl_TexCoord[0].st;
  544. src -= vec2(1850.0000000000000000, 1375.0000000000000000);
  545.  
  546. // erect_rect(2565.4893433121469570)
  547. src.t = 2565.4893433121469570 * atan2_xge0(src.t, length(vec2(2565.4893433121469570, src.s)));
  548. src.s = 2565.4893433121469570 * atan2_safe(src.s, 2565.4893433121469570);
  549.  
  550. // rotate_erect(8059.7224738123431962, 1.1012479165175173002)
  551. {
  552. src.s += 1.1012479165175173002;
  553. float w = (abs(src.s) > 8059.7224738123431962) ? 1.0 : 0.0;
  554. float n = (src.s < 0.0) ? 0.5 : -0.5;
  555. src.s += w * -16119.444947624686392 * ceil(src.s / 16119.444947624686392 + n);
  556. }
  557.  
  558. // sphere_tp_erect(2565.4893433121469570)
  559. {
  560. float phi = src.s / 2565.4893433121469570;
  561. float theta = -src.t / 2565.4893433121469570 + 1.5707963267948965580;
  562. if (theta < 0.0) {
  563. theta = -theta;
  564. phi += 3.1415926535897931160;
  565. }
  566. if (theta > 3.1415926535897931160) {
  567. theta = 3.1415926535897931160 - (theta - 3.1415926535897931160);
  568. phi += 3.1415926535897931160;
  569. }
  570. float s = sin(theta);
  571. vec2 v = vec2(s * sin(phi), cos(theta));
  572. float r = length(v);
  573. theta = 2565.4893433121469570 * atan2_safe(r, s * cos(phi));
  574. src = v * (theta / r);
  575. }
  576.  
  577. // persp_sphere(2565.4893433121469570)
  578. {
  579. mat3 m = mat3(0.99999998665116685004, 0.00016339420484989285501, 5.6918562158017812270e-09,
  580. -0.00016339420494903108194, 0.99999998604442419392, 3.4835116346982139155e-05,
  581. 0.0000000000000000000, -3.4835116811990298087e-05, 0.99999999939325734388);
  582. float r = length(src);
  583. float theta = r / 2565.4893433121469570;
  584. float s = 0.0;
  585. if (r != 0.0) s = sin(theta) / r;
  586. vec3 v = vec3(s * src.s, s * src.t, cos(theta));
  587. vec3 u = v * m;
  588. r = length(u.st);
  589. theta = 0.0;
  590. if (r != 0.0) theta = 2565.4893433121469570 * atan2_safe(r, u.p) / r;
  591. src = theta * u.st;
  592. }
  593.  
  594. // rect_sphere_tp(2565.4893433121469570)
  595. {
  596. float r = length(src);
  597. float theta = r / 2565.4893433121469570;
  598. float rho = 0.0;
  599. if (theta >= 1.5707963267948965580) rho = 1.6e16;
  600. else if (theta == 0.0) rho = 1.0;
  601. else rho = tan(theta) / theta;
  602. src *= rho;
  603. }
  604.  
  605. // resize(1.0810807128353780993, 1.0810807128353780993)
  606. src *= vec2(1.0810807128353780993, 1.0810807128353780993);
  607.  
  608. src += vec2(1999.5000000000000000, 1499.5000000000000000);
  609.  
  610. src = src * discardA + vec2(-1000.0, -1000.0) * discardB;
  611. gl_FragColor = vec4(src.s, 0.0, 0.0, src.t);
  612. }
  613. #version 110
  614. #extension GL_ARB_texture_rectangle : enable
  615. uniform sampler2DRect CoordTexture;
  616. uniform sampler2DRect SrcTexture;
  617. uniform sampler2DRect AccumTexture;
  618. uniform vec2 SrcUL;
  619. uniform vec2 SrcLR;
  620. uniform vec2 KernelUL;
  621. uniform vec2 KernelWH;
  622. float w(const in float i, const in float f) {
  623. float A = -0.75000000000000000000;
  624. float c = abs(i - 1.0);
  625. float m = (i > 1.0) ? -1.0 : 1.0;
  626. float p = c + m * f;
  627. if (i == 1.0 || i == 2.0) {
  628. return (( A + 2.0 )*p - ( A + 3.0 ))*p*p + 1.0;
  629. } else {
  630. return (( A * p - 5.0 * A ) * p + 8.0 * A ) * p - 4.0 * A;
  631. }
  632. }
  633. void main(void)
  634. {
  635. vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
  636. vec4 accum = texture2DRect(AccumTexture, gl_TexCoord[0].st);
  637.  
  638. src -= SrcUL;
  639. vec2 t = floor(src) + -0.50000000000000000000;
  640. vec2 f = fract(src);
  641. vec2 k = vec2(0.0, 0.0);
  642.  
  643. for (float ky = 0.0; ky < 4.0000000000000000000; ky += 1.0) {
  644. k.t = ky + KernelUL.t;
  645. float wy = w(k.t, f.t);
  646. for (float kx = 0.0; kx < 4.0000000000000000000; kx += 1.0) {
  647. k.s = kx + KernelUL.s;
  648. float wx = w(k.s, f.s);
  649. vec2 ix = t + k;
  650. vec4 sp = texture2DRect(SrcTexture, ix);
  651. float weight = wx * wy * sp.a;
  652. accum += sp * weight;
  653. }
  654. }
  655.  
  656. gl_FragColor = accum;
  657. }
  658.  
  659. #version 120
  660. #extension GL_ARB_texture_rectangle : enable
  661. uniform sampler2DRect NormTexture;
  662. uniform sampler2DRect CoordTexture;
  663. uniform sampler2DRect InvLutTexture;
  664. uniform sampler2DRect DestLutTexture;
  665. void main(void)
  666. {
  667. // Normalization
  668. vec4 n = texture2DRect(NormTexture, gl_TexCoord[0].st);
  669. vec4 p = vec4(0.0, 0.0, 0.0, 0.0);
  670. if (n.a >= 0.2) p = n / n.a;
  671.  
  672. // Photometric
  673. // invLutSize = 256.00000000000000000
  674. // pixelMax = 255.00000000000000000
  675. // destLutSize = 1024.0000000000000000
  676. // destExposure = 0.00019929594818414287749
  677. // srcExposure = 0.00031887755475383414107
  678. // whiteBalanceRed = 1.0000000000000000000
  679. // whiteBalanceBlue = 1.0000000000000000000
  680. p.rgb = p.rgb * 255.00000000000000000;
  681. vec2 invR = texture2DRect(InvLutTexture, vec2(p.r, 0.0)).sq;
  682. vec2 invG = texture2DRect(InvLutTexture, vec2(p.g, 0.0)).sq;
  683. vec2 invB = texture2DRect(InvLutTexture, vec2(p.b, 0.0)).sq;
  684. vec3 invX = vec3(invR.x, invG.x, invB.x);
  685. vec3 invY = vec3(invR.y, invG.y, invB.y);
  686. vec3 invA = fract(p.rgb);
  687. p.rgb = mix(invX, invY, invA);
  688. // VigCorrMode=VIGCORR_RADIAL
  689. float vig = 1.0;
  690. {
  691. vec2 vigCorrCenter = vec2(1999.5000000000000000, 1499.5000000000000000);
  692. float radiusScale=0.00040000000000000001917;
  693. float radialVigCorrCoeff0 = 1.0000000000000000000;
  694. float radialVigCorrCoeff1 = 0.0000000000000000000;
  695. float radialVigCorrCoeff2 = 0.0000000000000000000;
  696. float radialVigCorrCoeff3 = 0.0000000000000000000;
  697. vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
  698. vec2 d = src - vigCorrCenter;
  699. d *= radiusScale;
  700. vig = radialVigCorrCoeff0;
  701. float r2 = dot(d, d);
  702. float r = r2;
  703. vig += radialVigCorrCoeff1 * r;
  704. r *= r2;
  705. vig += radialVigCorrCoeff2 * r;
  706. r *= r2;
  707. vig += radialVigCorrCoeff3 * r;
  708. }
  709. vec3 exposure_whitebalance = vec3(0.62499208618804980020, 0.62499208618804980020, 0.62499208618804980020);
  710. p.rgb = (p.rgb * exposure_whitebalance) / vig;
  711. p.rgb = p.rgb * 1023.0000000000000000;
  712. vec2 destR = texture2DRect(DestLutTexture, vec2(p.r, 0.0)).sq;
  713. vec2 destG = texture2DRect(DestLutTexture, vec2(p.g, 0.0)).sq;
  714. vec2 destB = texture2DRect(DestLutTexture, vec2(p.b, 0.0)).sq;
  715. vec3 destX = vec3(destR.x, destG.x, destB.x);
  716. vec3 destY = vec3(destR.y, destG.y, destB.y);
  717. vec3 destA = fract(p.rgb);
  718. p.rgb = mix(destX, destY, destA);
  719.  
  720. gl_FragColor = p;
  721. }
  722.  
  723. gpu shader program compile time = 0.006
  724. gpu shader texture/framebuffer setup time = 0.001
  725. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] coord image render time = 0.019
  726. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] src upload = 0.024
  727. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] src render = 0.002
  728. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] interpolation chunk=[(0, 0) to (4, 4) = (4x4)] setup = 0.01
  729. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] source chunk=[(0, 0) to (4000, 3000) = (4000x3000)] interpolation chunk=[(0, 0) to (4, 4) = (4x4)] render = 0.014
  730. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] normalization setup = 0
  731. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] normalization render = 0.003
  732. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest rgb disassembly setup = 0
  733. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest rgb disassembly render = 0.003
  734. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] rgb readback = 0.001
  735. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest alpha disassembly setup = 0
  736. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] dest alpha disassembly render = 0.003
  737. gpu dest chunk=[(0, 0) to (3704, 2750) = (3704x2750)] alpha readback = 0.002
  738. gpu destruct time = 0.005
  739. gpu total time = 0.093
  740. Daniels-MacBook-Pro:~ daniel$
  741.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement