@uptimizr/dashboard 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +4 -4
  3. package/out/__next._full.txt +11 -11
  4. package/out/__next._head.txt +4 -4
  5. package/out/__next._index.txt +4 -4
  6. package/out/__next._tree.txt +2 -2
  7. package/out/_next/static/chunks/002cjeoit6-up.js +1 -0
  8. package/out/_next/static/chunks/02n1uiltexy3w.js +1 -0
  9. package/out/_next/static/chunks/03ab2khhe8-x5.js +1 -0
  10. package/out/_next/static/chunks/04_yytpc2paxy.js +1 -0
  11. package/out/_next/static/chunks/06qot1qvlsqaz.js +1 -0
  12. package/out/_next/static/chunks/07eeopuufsqp-.js +1501 -0
  13. package/out/_next/static/chunks/08a5xek662n8n.js +1 -0
  14. package/out/_next/static/chunks/08wuc9--s8zn_.js +1 -0
  15. package/out/_next/static/chunks/0927l-ygd5c8d.js +1 -0
  16. package/out/_next/static/chunks/09510356f0lad.js +1 -0
  17. package/out/_next/static/chunks/0_eu72k69lxj7.js +1 -0
  18. package/out/_next/static/chunks/0beajlqy8p8b5.js +1 -0
  19. package/out/_next/static/chunks/0c83pe1mpx456.js +1 -0
  20. package/out/_next/static/chunks/0echnagbkyx79.js +1198 -0
  21. package/out/_next/static/chunks/0eh1ml86u8dh7.js +1 -0
  22. package/out/_next/static/chunks/0fh-9h9ylxskr.js +674 -0
  23. package/out/_next/static/chunks/0fzmc1up21g1i.js +1 -0
  24. package/out/_next/static/chunks/0g_v2zswo4l6f.js +1 -0
  25. package/out/_next/static/chunks/0grlb9lo8e502.js +1 -0
  26. package/out/_next/static/chunks/0h22pg-0xrxnm.js +1 -0
  27. package/out/_next/static/chunks/0j6p1pmc14t96.js +1 -0
  28. package/out/_next/static/chunks/0j_6dx-sttgsy.js +1 -0
  29. package/out/_next/static/chunks/0j__xaq_8_di1.js +1 -0
  30. package/out/_next/static/chunks/0kfd-cvj5fvtz.js +1 -0
  31. package/out/_next/static/chunks/0o_mp98xzqfyf.js +1 -0
  32. package/out/_next/static/chunks/0otsec99kdkt7.js +213 -0
  33. package/out/_next/static/chunks/0ql-s-tsmel_u.js +151 -0
  34. package/out/_next/static/chunks/0r47gs_e93cka.js +1 -0
  35. package/out/_next/static/chunks/0sqys6o2pbe1q.js +1328 -0
  36. package/out/_next/static/chunks/0titqrn1qmcsv.js +1 -0
  37. package/out/_next/static/chunks/0tnlbw78tgaxp.js +4 -0
  38. package/out/_next/static/chunks/0tw4dyl-cp-hd.js +1 -0
  39. package/out/_next/static/chunks/0vbce-8omgurc.js +1 -0
  40. package/out/_next/static/chunks/0vfsg5byzep_0.js +1 -0
  41. package/out/_next/static/chunks/{0gv7mblzv3dl3.js → 0w8_1yjvol1f0.js} +20 -20
  42. package/out/_next/static/chunks/0xh144a5fz58h.js +1 -0
  43. package/out/_next/static/chunks/0xjltg_pph0c8.js +1 -0
  44. package/out/_next/static/chunks/0yeqgh0dnas8d.js +1 -0
  45. package/out/_next/static/chunks/101-7e_7up7rk.js +1 -0
  46. package/out/_next/static/chunks/128e51hj_04r0.js +1 -0
  47. package/out/_next/static/chunks/{10fnxpln_5xfd.js → 12kv810lohbsx.js} +2 -2
  48. package/out/_next/static/chunks/137xbvd4nd41j.js +3 -0
  49. package/out/_next/static/chunks/14bws-suyy5zu.js +1 -0
  50. package/out/_next/static/chunks/14ggsmqwej_tt.js +1656 -0
  51. package/out/_next/static/chunks/17genz6pkmty_.js +1 -0
  52. package/out/_next/static/chunks/17xd8hnazzr0g.js +1454 -0
  53. package/out/_next/static/chunks/18dczy9ylt2s_.js +1 -0
  54. package/out/_next/static/chunks/18xs_kvsaolb0.js +1 -0
  55. package/out/_next/static/chunks/19016f8-ry0z6.js +1 -0
  56. package/out/_next/static/chunks/1_6oejyxj39li.js +1 -0
  57. package/out/_next/static/chunks/1_aon8nz9p1fr.js +1 -0
  58. package/out/_next/static/chunks/1_qzlkuxukhpq.js +779 -0
  59. package/out/_next/static/chunks/1akaj5rhgitn3.js +1 -0
  60. package/out/_next/static/chunks/1bvl1ws7b_3gn.js +1 -0
  61. package/out/_next/static/chunks/1cdbk6kxyr1c9.js +1 -0
  62. package/out/_next/static/chunks/1fbjkk55uu4_g.js +1 -0
  63. package/out/_next/static/chunks/1furcfsgrw_3g.js +1 -0
  64. package/out/_next/static/chunks/1g0-f1g3gn_rs.js +1 -0
  65. package/out/_next/static/chunks/1g7emwu85bifo.js +557 -0
  66. package/out/_next/static/chunks/{37vzwr3ciejf1.js → 1gs-5722l4u59.js} +1 -1
  67. package/out/_next/static/chunks/1gt4kh0_xmigy.js +1 -0
  68. package/out/_next/static/chunks/1h8xzuuhhglu9.js +1 -0
  69. package/out/_next/static/chunks/1hatz-jlztrn0.js +1 -0
  70. package/out/_next/static/chunks/1iioifo7i0t0_.js +1 -0
  71. package/out/_next/static/chunks/{0impkpmxx3ttp.js → 1iiz7jqgj20z0.js} +1 -1
  72. package/out/_next/static/chunks/1kujmd5n0j9nk.js +1 -0
  73. package/out/_next/static/chunks/{2kazjq29jeamx.js → 1ltux4lwz7muf.js} +160 -372
  74. package/out/_next/static/chunks/1m_buecgcq67j.js +740 -0
  75. package/out/_next/static/chunks/1n9sy0yt5d2vq.js +1 -0
  76. package/out/_next/static/chunks/1p1gz6dseck--.js +1 -0
  77. package/out/_next/static/chunks/1p1xtsfwvpuqo.js +1 -0
  78. package/out/_next/static/chunks/1p8f6okk2ewbz.js +1 -0
  79. package/out/_next/static/chunks/1qg_etglhvp9h.js +740 -0
  80. package/out/_next/static/chunks/1th_t5ujeqlkf.js +1 -0
  81. package/out/_next/static/chunks/1thr-mdzbu96v.js +1 -0
  82. package/out/_next/static/chunks/1tta1a064979p.js +1 -0
  83. package/out/_next/static/chunks/1u_riwm0nfww7.js +1 -0
  84. package/out/_next/static/chunks/1ua15kzid0_8p.js +2560 -0
  85. package/out/_next/static/chunks/1uu-rt_8p1edp.js +2712 -0
  86. package/out/_next/static/chunks/1uu93wuxigx4k.js +1 -0
  87. package/out/_next/static/chunks/{1flb8adpj6_2o.js → 1xpwp4m1tqugp.js} +1 -1
  88. package/out/_next/static/chunks/1ynju1jqfrcv0.js +1 -0
  89. package/out/_next/static/chunks/1zfojlgb15okk.js +1 -0
  90. package/out/_next/static/chunks/1zj8x5wbgnzz-.js +1 -0
  91. package/out/_next/static/chunks/1zl6t15gh34nn.js +1 -0
  92. package/out/_next/static/chunks/{1thjncpj7u6pq.js → 223vrr_4sfhsj.js} +1 -1
  93. package/out/_next/static/chunks/22cr2b04btguf.js +1 -0
  94. package/out/_next/static/chunks/242xhzxxetctz.js +1 -0
  95. package/out/_next/static/chunks/24essz5mmvx-6.js +1 -0
  96. package/out/_next/static/chunks/256k1jw1m--l7.js +146 -0
  97. package/out/_next/static/chunks/259obyrpxcv6r.js +1 -0
  98. package/out/_next/static/chunks/26v9yqicofqba.js +1 -0
  99. package/out/_next/static/chunks/290d93hmm_e8b.js +1 -0
  100. package/out/_next/static/chunks/2_2fk7iddrs43.js +1 -0
  101. package/out/_next/static/chunks/{00k_j_r7bv_eb.js → 2bjlls8-qe05r.js} +9 -9
  102. package/out/_next/static/chunks/2ckd7f1wbfod-.js +1 -0
  103. package/out/_next/static/chunks/{163fa70v4mgxj.js → 2d6hru4qo23tt.js} +1 -1
  104. package/out/_next/static/chunks/2ejvntxtvf5o9.js +1 -0
  105. package/out/_next/static/chunks/2f7_3tzf7xhps.js +1 -0
  106. package/out/_next/static/chunks/2gxd_o1g89_bv.js +1 -0
  107. package/out/_next/static/chunks/2hd2txb4-m9k1.js +1 -0
  108. package/out/_next/static/chunks/2hpxou_cnp4f_.js +1 -0
  109. package/out/_next/static/chunks/2izioctrfc0s5.js +1 -0
  110. package/out/_next/static/chunks/2jhnk4h4n0udv.js +1 -0
  111. package/out/_next/static/chunks/2jpkhkk9zi8-f.js +1 -0
  112. package/out/_next/static/chunks/2kpet_l1kq2sx.js +1 -0
  113. package/out/_next/static/chunks/2mdbvf1b5h00_.css +3 -0
  114. package/out/_next/static/chunks/2nck5w4c7leb7.js +1 -0
  115. package/out/_next/static/chunks/2our10fwtj87e.js +1 -0
  116. package/out/_next/static/chunks/2qq3uzsbiicw3.js +1194 -0
  117. package/out/_next/static/chunks/2qqqpu0ahfdda.js +1 -0
  118. package/out/_next/static/chunks/2u-f7mmxvk8wj.js +1 -0
  119. package/out/_next/static/chunks/2ue1wo4ryk87z.js +1 -0
  120. package/out/_next/static/chunks/2uk-vwlxe9-xr.js +1 -0
  121. package/out/_next/static/chunks/2ur5-lxdvv1jm.js +1 -0
  122. package/out/_next/static/chunks/2veqsohwfhfqc.js +1 -0
  123. package/out/_next/static/chunks/2vqlv9wnewhu9.js +1 -0
  124. package/out/_next/static/chunks/{1zvc1tv--w8nn.js → 2wzshintp5lf8.js} +1 -1
  125. package/out/_next/static/chunks/2x-00glogc485.js +1 -0
  126. package/out/_next/static/chunks/2yfxy0f5fqs4o.js +1 -0
  127. package/out/_next/static/chunks/2z88mt3ixktu3.js +1 -0
  128. package/out/_next/static/chunks/2z_jn9ud28fk7.js +1 -0
  129. package/out/_next/static/chunks/3-eswqjobiqk1.js +1 -0
  130. package/out/_next/static/chunks/30-tbi7pys6fp.js +4 -0
  131. package/out/_next/static/chunks/30c-nsedy_ce0.js +1 -0
  132. package/out/_next/static/chunks/31u5lbu1vxznh.js +1 -0
  133. package/out/_next/static/chunks/{2feca0xcipcyt.js → 32ahba5ezp467.js} +156 -156
  134. package/out/_next/static/chunks/337hn35kts7ud.js +1 -0
  135. package/out/_next/static/chunks/33dgpebv-tf73.js +1 -0
  136. package/out/_next/static/chunks/36jkdhq6kb-cf.js +1 -0
  137. package/out/_next/static/chunks/37epa8fz59vba.js +1166 -0
  138. package/out/_next/static/chunks/3833xfnz0a-ub.js +1 -0
  139. package/out/_next/static/chunks/38awrh_qxn22k.js +1 -0
  140. package/out/_next/static/chunks/{0wrm9jr-9bw0e.js → 38x3c1ra5slhe.js} +383 -913
  141. package/out/_next/static/chunks/39idqlqlcp5b9.js +1 -0
  142. package/out/_next/static/chunks/{2a3spdq-m8drh.js → 3_gku1pwluoo0.js} +1 -1
  143. package/out/_next/static/chunks/3_mu-4rdjajna.js +1450 -0
  144. package/out/_next/static/chunks/3coacc4-g-g5c.js +1 -0
  145. package/out/_next/static/chunks/3e00fzdfkclzq.js +1 -0
  146. package/out/_next/static/chunks/3e8fmlq0k5wkg.js +1 -0
  147. package/out/_next/static/chunks/3e9tzyrt4_98z.js +1 -0
  148. package/out/_next/static/chunks/3edelqkq92pil.js +1 -0
  149. package/out/_next/static/chunks/3figbil1t4ssj.js +593 -0
  150. package/out/_next/static/chunks/3gimb3z_mteou.js +1 -0
  151. package/out/_next/static/chunks/{2p2vv6cc9i-3q.js → 3idaz_s77e-j_.js} +9 -9
  152. package/out/_next/static/chunks/3j-4wuhs5weba.js +1 -0
  153. package/out/_next/static/chunks/3jjfnwvybayy7.js +1 -0
  154. package/out/_next/static/chunks/3jwm5dfk_78gc.js +1 -0
  155. package/out/_next/static/chunks/3k9d4ylc3li2t.js +1352 -0
  156. package/out/_next/static/chunks/3l3_0ack3gy4k.js +1 -0
  157. package/out/_next/static/chunks/3lwhs5ja7tun3.js +1 -0
  158. package/out/_next/static/chunks/3m6nmp2dca6un.js +1342 -0
  159. package/out/_next/static/chunks/3mbnfpufs2-7e.js +7 -0
  160. package/out/_next/static/chunks/3mcd08gmt038z.js +1 -0
  161. package/out/_next/static/chunks/3mt5th7b1i_u9.js +1 -0
  162. package/out/_next/static/chunks/3ne77mjdz2y7o.js +1 -0
  163. package/out/_next/static/chunks/3puhrqtujktyv.js +1 -0
  164. package/out/_next/static/chunks/3rdifucupcgkg.js +1 -0
  165. package/out/_next/static/chunks/3riekaxl3uxfb.js +1195 -0
  166. package/out/_next/static/chunks/3sdoskq_buttj.js +1 -0
  167. package/out/_next/static/chunks/3tg-ma9tv9xu4.js +1 -0
  168. package/out/_next/static/chunks/3tm-pqpmq_ppw.js +1 -0
  169. package/out/_next/static/chunks/3w9go565cjhq3.js +1636 -0
  170. package/out/_next/static/chunks/3wi9gzq2mtr_q.js +8 -0
  171. package/out/_next/static/chunks/3xagd_2_9zft2.js +1 -0
  172. package/out/_next/static/chunks/3xsq_anpad-fb.js +1 -0
  173. package/out/_next/static/chunks/3ycv2qq7vpbua.js +1 -0
  174. package/out/_next/static/chunks/3z84au-mitjjw.js +1 -0
  175. package/out/_next/static/chunks/4030dhur2h70-.js +1 -0
  176. package/out/_next/static/chunks/40ffffml4h_3r.js +4 -0
  177. package/out/_next/static/chunks/{3-shckrcpvbxu.js → 41wt50z9tx9cx.js} +108 -711
  178. package/out/_next/static/chunks/431slrqh0wa0g.js +1 -0
  179. package/out/_next/static/chunks/43s_lbd1i2krj.js +1 -0
  180. package/out/_next/static/chunks/{0-2y-_oomza2l.js → 44nxswtahaq4w.js} +18 -18
  181. package/out/_next/static/chunks/45bwefvdpztfs.js +1 -0
  182. package/out/_next/static/chunks/{turbopack-0sgd6pfbe1fy6.js → turbopack-19105pdhzxp1x.js} +1 -1
  183. package/out/_not-found/__next._full.txt +9 -9
  184. package/out/_not-found/__next._head.txt +4 -4
  185. package/out/_not-found/__next._index.txt +4 -4
  186. package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
  187. package/out/_not-found/__next._not-found.txt +3 -3
  188. package/out/_not-found/__next._tree.txt +2 -2
  189. package/out/_not-found.html +1 -1
  190. package/out/_not-found.txt +9 -9
  191. package/out/index.html +1 -1
  192. package/out/index.txt +11 -11
  193. package/package.json +5 -4
  194. package/out/_next/static/chunks/068j6934u8j16.js +0 -1
  195. package/out/_next/static/chunks/09e4adtr6w0xe.js +0 -1
  196. package/out/_next/static/chunks/0_rf76jneiwal.js +0 -176
  197. package/out/_next/static/chunks/0aznt7717miff.js +0 -1
  198. package/out/_next/static/chunks/0cu-q5q3a7uf3.js +0 -1
  199. package/out/_next/static/chunks/0fskcfh9vbhtv.js +0 -1
  200. package/out/_next/static/chunks/0gg-ii7i6d_p6.js +0 -1
  201. package/out/_next/static/chunks/0tx1j_ghpz7rc.css +0 -3
  202. package/out/_next/static/chunks/0ufbyo1x3qkmo.js +0 -1
  203. package/out/_next/static/chunks/0wwcfw8i3j_zx.js +0 -1
  204. package/out/_next/static/chunks/0wwkrsvxwi57d.js +0 -1
  205. package/out/_next/static/chunks/0ys9-ozuluawt.js +0 -1
  206. package/out/_next/static/chunks/1-61zh4waha61.js +0 -1
  207. package/out/_next/static/chunks/10r_824wzt8hj.js +0 -1
  208. package/out/_next/static/chunks/123xxske5c9na.js +0 -1
  209. package/out/_next/static/chunks/13isnf0--pmx1.js +0 -1
  210. package/out/_next/static/chunks/157d9euci08yu.js +0 -1
  211. package/out/_next/static/chunks/18u58lorfahxi.js +0 -4
  212. package/out/_next/static/chunks/1_aahautsz2v_.js +0 -1
  213. package/out/_next/static/chunks/1o1d0p-v1z8ty.js +0 -1
  214. package/out/_next/static/chunks/1vdjn0pkoyypn.js +0 -1
  215. package/out/_next/static/chunks/1yehxf-fmeicg.js +0 -1
  216. package/out/_next/static/chunks/1zx2q-r32thv1.js +0 -4
  217. package/out/_next/static/chunks/2-sjjedfr0kfq.js +0 -1
  218. package/out/_next/static/chunks/25b9x-li-tvk2.js +0 -1
  219. package/out/_next/static/chunks/2aelw3far6rii.js +0 -1
  220. package/out/_next/static/chunks/2aor7m-wbis85.js +0 -1
  221. package/out/_next/static/chunks/2clzipqap01hp.js +0 -1
  222. package/out/_next/static/chunks/2fh-_9b6tqhvb.js +0 -1
  223. package/out/_next/static/chunks/2g5gecypj0rqe.js +0 -1
  224. package/out/_next/static/chunks/2szdcpl41-kzv.js +0 -1
  225. package/out/_next/static/chunks/2u6shh3oeycm-.js +0 -1
  226. package/out/_next/static/chunks/2unhhuv0arlcv.js +0 -1
  227. package/out/_next/static/chunks/2z5eqx5do5std.js +0 -1
  228. package/out/_next/static/chunks/310uz81hnnzsu.js +0 -1
  229. package/out/_next/static/chunks/3aqbf_wkg2sih.js +0 -3
  230. package/out/_next/static/chunks/3i3gbhccmhu7j.js +0 -210
  231. package/out/_next/static/chunks/3mqy-84_ul3t2.js +0 -1
  232. package/out/_next/static/chunks/3nz-dh9d7cehk.js +0 -1
  233. package/out/_next/static/chunks/3pufs8g4ui943.js +0 -1
  234. package/out/_next/static/chunks/3t06schbtqonl.js +0 -1
  235. package/out/_next/static/chunks/3v3-7fio3nw_t.js +0 -1
  236. package/out/_next/static/chunks/3v5ha25nxo43j.js +0 -1
  237. package/out/_next/static/chunks/3zskk1hxu3-_o.js +0 -1
  238. /package/out/_next/static/{vHD3x58R_2B6QWAhZXCg7 → M9ZSIaKJeBgkjz1qktYio}/_buildManifest.js +0 -0
  239. /package/out/_next/static/{vHD3x58R_2B6QWAhZXCg7 → M9ZSIaKJeBgkjz1qktYio}/_clientMiddlewareManifest.js +0 -0
  240. /package/out/_next/static/{vHD3x58R_2B6QWAhZXCg7 → M9ZSIaKJeBgkjz1qktYio}/_ssgManifest.js +0 -0
@@ -0,0 +1,1328 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,4357,e=>{"use strict";var t=e.i(12423);let r="helperFunctions",i=`const PI: f32=3.1415926535897932384626433832795;const TWO_PI: f32=6.283185307179586;const HALF_PI: f32=1.5707963267948966;const RECIPROCAL_PI: f32=0.3183098861837907;const RECIPROCAL_PI2: f32=0.15915494309189535;const RECIPROCAL_PI4: f32=0.07957747154594767;const HALF_MIN: f32=5.96046448e-08;
2
+ const LinearEncodePowerApprox: f32=2.2;const GammaEncodePowerApprox: f32=1.0/LinearEncodePowerApprox;const LuminanceEncodeApprox: vec3f=vec3f(0.2126,0.7152,0.0722);const Epsilon:f32=0.0000001;fn square(x: f32)->f32 {return x*x;}
3
+ fn saturate(x: f32)->f32 {return clamp(x,0.0,1.0);}
4
+ fn saturateVec3(x: vec3f)->vec3f {return clamp(x,vec3f(),vec3f(1.0));}
5
+ fn saturateEps(x: f32)->f32 {return clamp(x,Epsilon,1.0);}
6
+ fn maxEps(x: f32)->f32 {return max(x,Epsilon);}
7
+ fn maxEpsVec3(x: vec3f)->vec3f {return max(x,vec3f(Epsilon));}
8
+ fn absEps(x: f32)->f32 {return abs(x)+Epsilon;}
9
+ fn transposeMat3(inMatrix: mat3x3f)->mat3x3f {let i0: vec3f=inMatrix[0];let i1: vec3f=inMatrix[1];let i2: vec3f=inMatrix[2];let outMatrix:mat3x3f=mat3x3f(
10
+ vec3(i0.x,i1.x,i2.x),
11
+ vec3(i0.y,i1.y,i2.y),
12
+ vec3(i0.z,i1.z,i2.z)
13
+ );return outMatrix;}
14
+ fn inverseMat3(inMatrix: mat3x3f)->mat3x3f {let a00: f32=inMatrix[0][0];let a01: f32=inMatrix[0][1];let a02: f32=inMatrix[0][2];let a10: f32=inMatrix[1][0];let a11: f32=inMatrix[1][1];let a12: f32=inMatrix[1][2];let a20: f32=inMatrix[2][0];let a21: f32=inMatrix[2][1];let a22: f32=inMatrix[2][2];let b01: f32=a22*a11-a12*a21;let b11: f32=-a22*a10+a12*a20;let b21: f32=a21*a10-a11*a20;let det: f32=a00*b01+a01*b11+a02*b21;return mat3x3f(b01/det,(-a22*a01+a02*a21)/det,(a12*a01-a02*a11)/det,
15
+ b11/det,(a22*a00-a02*a20)/det,(-a12*a00+a02*a10)/det,
16
+ b21/det,(-a21*a00+a01*a20)/det,(a11*a00-a01*a10)/det);}
17
+ #if USE_EXACT_SRGB_CONVERSIONS
18
+ fn toLinearSpaceExact(color: vec3f)->vec3f
19
+ {let nearZeroSection: vec3f=0.0773993808*color;let remainingSection: vec3f=pow(0.947867299*(color+vec3f(0.055)),vec3f(2.4));return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3f(0.04045)));}
20
+ fn toGammaSpaceExact(color: vec3f)->vec3f
21
+ {let nearZeroSection: vec3f=12.92*color;let remainingSection: vec3f=1.055*pow(color,vec3f(0.41666))-vec3f(0.055);return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3f(0.0031308)));}
22
+ #endif
23
+ fn toLinearSpace(color: f32)->f32
24
+ {
25
+ #if USE_EXACT_SRGB_CONVERSIONS
26
+ var nearZeroSection=0.0773993808*color;var remainingSection=pow(0.947867299*(color+0.055),2.4);return select(remainingSection,nearZeroSection,color<=0.04045);
27
+ #else
28
+ return pow(color,LinearEncodePowerApprox);
29
+ #endif
30
+ }
31
+ fn toLinearSpaceVec3(color: vec3f)->vec3f
32
+ {
33
+ #if USE_EXACT_SRGB_CONVERSIONS
34
+ return toLinearSpaceExact(color);
35
+ #else
36
+ return pow(color,vec3f(LinearEncodePowerApprox));
37
+ #endif
38
+ }
39
+ fn toLinearSpaceVec4(color: vec4<f32>)->vec4<f32>
40
+ {
41
+ #if USE_EXACT_SRGB_CONVERSIONS
42
+ return vec4f(toLinearSpaceExact(color.rgb),color.a);
43
+ #else
44
+ return vec4f(pow(color.rgb,vec3f(LinearEncodePowerApprox)),color.a);
45
+ #endif
46
+ }
47
+ fn toGammaSpace(color: vec4<f32>)->vec4<f32>
48
+ {
49
+ #if USE_EXACT_SRGB_CONVERSIONS
50
+ return vec4<f32>(toGammaSpaceExact(color.rgb),color.a);
51
+ #else
52
+ return vec4<f32>(pow(color.rgb,vec3f(GammaEncodePowerApprox)),color.a);
53
+ #endif
54
+ }
55
+ fn toGammaSpaceVec3(color: vec3f)->vec3f
56
+ {
57
+ #if USE_EXACT_SRGB_CONVERSIONS
58
+ return toGammaSpaceExact(color);
59
+ #else
60
+ return pow(color,vec3f(GammaEncodePowerApprox));
61
+ #endif
62
+ }
63
+ fn squareVec3(value: vec3f)->vec3f
64
+ {return value*value;}
65
+ fn pow5(value: f32)->f32 {let sq: f32=value*value;return sq*sq*value;}
66
+ fn double_refract(I: vec3f,N: vec3f,eta: f32)->vec3f {let Tfront: vec3f=refract(I,N,1.0/eta);let Nback: vec3f=normalize(reflect(N,Tfront));return refract(Tfront,-Nback,eta);}
67
+ fn getLuminanceUnclamped(color: vec3f)->f32
68
+ {return dot(color,LuminanceEncodeApprox);}
69
+ fn getLuminance(color: vec3f)->f32
70
+ {return saturate(getLuminanceUnclamped(color));}
71
+ fn getRand(seed: vec2<f32>)->f32 {return fract(sin(dot(seed.xy ,vec2<f32>(12.9898,78.233)))*43758.5453);}
72
+ fn dither(seed: vec2<f32>,varianceAmount: f32)->f32 {let rand: f32=getRand(seed);let normVariance: f32=varianceAmount/255.0;let dither: f32=mix(-normVariance,normVariance,rand);return dither;}
73
+ const rgbdMaxRange: f32=255.0;fn toRGBD(color: vec3f)->vec4<f32> {let maxRGB: f32=max(max(color.r,max(color.g,color.b)),Epsilon);var D: f32 =max(rgbdMaxRange/maxRGB,1.);D =clamp(floor(D)/255.0,0.,1.);var rgb: vec3f =color.rgb*D;rgb=toGammaSpaceVec3(rgb);return vec4<f32>(saturateVec3(rgb),D);}
74
+ fn fromRGBD(rgbd: vec4<f32>)->vec3f {let rgb=toLinearSpaceVec3(rgbd.rgb);return rgb/rgbd.a;}
75
+ fn parallaxCorrectNormal(vertexPos: vec3f,origVec: vec3f,cubeSize: vec3f,cubePos: vec3f)->vec3f {let invOrigVec: vec3f=vec3f(1.)/origVec;let halfSize: vec3f=cubeSize*0.5;let intersecAtMaxPlane: vec3f=(cubePos+halfSize-vertexPos)*invOrigVec;let intersecAtMinPlane: vec3f=(cubePos-halfSize-vertexPos)*invOrigVec;let largestIntersec: vec3f=max(intersecAtMaxPlane,intersecAtMinPlane);let distance: f32=min(min(largestIntersec.x,largestIntersec.y),largestIntersec.z);let intersectPositionWS: vec3f=vertexPos+origVec*distance;return intersectPositionWS-cubePos;}
76
+ fn equirectangularToCubemapDirection(uv : vec2f)->vec3f {var longitude : f32=uv.x*TWO_PI-PI;var latitude : f32=HALF_PI-uv.y*PI;var direction : vec3f;direction.x=cos(latitude)*sin(longitude);direction.y=sin(latitude);direction.z=cos(latitude)*cos(longitude);return direction;}
77
+ fn sqrtClamped(value: f32)->f32 {return sqrt(max(value,0.));}
78
+ fn avg(value: vec3f)->f32 {return dot(value,vec3f(0.333333333));}
79
+ fn singleScatterToMultiScatterAlbedo(rho_ss: vec3f)->vec3f {let s: vec3f=sqrt(max(vec3f(1.0)-rho_ss,vec3f(0.0)));return (vec3f(1.0)-s)*(vec3f(1.0)-vec3f(0.139)*s)/(vec3f(1.0)+vec3f(1.17)*s);}
80
+ fn multiScatterToSingleScatterAlbedo(rho_ms: vec3f)->vec3f {let s: vec3f=4.09712f+4.20863f*rho_ms-sqrt(9.59217f+41.6808f*rho_ms+17.7126f*rho_ms*rho_ms);return 1.0f-s*s;}
81
+ fn multiScatterToSingleScatterAlbedoWithAniso(rho_ms: vec3f,aniso: f32)->vec3f {let s: vec3f=4.09712+4.20863f*rho_ms-sqrt(9.59217f+41.6808f*rho_ms+17.7126f*rho_ms*rho_ms);return (vec3f(1.0f)-s*s)/maxEpsVec3(vec3f(1.0f)-vec3f(aniso)*s*s);}
82
+ fn min3(v: vec3f)->f32 {return min(v.x,min(v.y,v.z));}
83
+ fn max3(v: vec3f)->f32 {return max(v.x,max(v.y,v.z));}
84
+ fn uint2float(i: u32)->f32 {return bitcast<f32>(0x3F800000u | (i>>9u))-1.0;}
85
+ fn plasticSequence(rstate: u32)->vec2f {return vec2f(uint2float(rstate*3242174889u),
86
+ uint2float(rstate*2447445414u));}
87
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["helperFunctionsWGSL",0,{name:r,shader:i}])},60106,e=>{"use strict";var t=e.i(12423);let r="sceneUboDeclaration",i=`struct Scene {viewProjection : mat4x4<f32>,
88
+ #ifdef MULTIVIEW
89
+ viewProjectionR : mat4x4<f32>,
90
+ #endif
91
+ view : mat4x4<f32>,
92
+ projection : mat4x4<f32>,
93
+ vEyePosition : vec4<f32>,
94
+ inverseProjection : mat4x4<f32>,};
95
+ #define SCENE_UBO
96
+ var<uniform> scene : Scene;
97
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["sceneUboDeclarationWGSL",0,{name:r,shader:i}])},50008,39780,54758,e=>{"use strict";var t=e.i(12423);let r="meshUboDeclaration",i=`struct Mesh {world : mat4x4<f32>,
98
+ visibility : f32,};var<uniform> mesh : Mesh;
99
+ #define WORLD_UBO
100
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["meshUboDeclarationWGSL",0,{name:r,shader:i}],50008);let n="mainUVVaryingDeclaration",a=`#ifdef MAINUV{X}
101
+ varying vMainUV{X}: vec2f;
102
+ #endif
103
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["mainUVVaryingDeclarationWGSL",0,{name:n,shader:a}],39780);let f="logDepthDeclaration",o=`#ifdef LOGARITHMICDEPTH
104
+ uniform logarithmicDepthConstant: f32;varying vFragmentDepth: f32;
105
+ #endif
106
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["logDepthDeclarationWGSL",0,{name:f,shader:o}],54758)},99452,e=>{"use strict";var t=e.i(12423);let r="harmonicsFunctions",i=`#ifdef USESPHERICALFROMREFLECTIONMAP
107
+ #ifdef SPHERICAL_HARMONICS
108
+ fn computeEnvironmentIrradiance(normal: vec3f)->vec3f {return uniforms.vSphericalL00
109
+ + uniforms.vSphericalL1_1*(normal.y)
110
+ + uniforms.vSphericalL10*(normal.z)
111
+ + uniforms.vSphericalL11*(normal.x)
112
+ + uniforms.vSphericalL2_2*(normal.y*normal.x)
113
+ + uniforms.vSphericalL2_1*(normal.y*normal.z)
114
+ + uniforms.vSphericalL20*((3.0*normal.z*normal.z)-1.0)
115
+ + uniforms.vSphericalL21*(normal.z*normal.x)
116
+ + uniforms.vSphericalL22*(normal.x*normal.x-(normal.y*normal.y));}
117
+ #else
118
+ fn computeEnvironmentIrradiance(normal: vec3f)->vec3f {var Nx: f32=normal.x;var Ny: f32=normal.y;var Nz: f32=normal.z;var C1: vec3f=uniforms.vSphericalZZ.rgb;var Cx: vec3f=uniforms.vSphericalX.rgb;var Cy: vec3f=uniforms.vSphericalY.rgb;var Cz: vec3f=uniforms.vSphericalZ.rgb;var Cxx_zz: vec3f=uniforms.vSphericalXX_ZZ.rgb;var Cyy_zz: vec3f=uniforms.vSphericalYY_ZZ.rgb;var Cxy: vec3f=uniforms.vSphericalXY.rgb;var Cyz: vec3f=uniforms.vSphericalYZ.rgb;var Czx: vec3f=uniforms.vSphericalZX.rgb;var a1: vec3f=Cyy_zz*Ny+Cy;var a2: vec3f=Cyz*Nz+a1;var b1: vec3f=Czx*Nz+Cx;var b2: vec3f=Cxy*Ny+b1;var b3: vec3f=Cxx_zz*Nx+b2;var t1: vec3f=Cz *Nz+C1;var t2: vec3f=a2 *Ny+t1;var t3: vec3f=b3 *Nx+t2;return t3;}
119
+ #endif
120
+ #endif
121
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["harmonicsFunctionsWGSL",0,{name:r,shader:i}])},61202,e=>{"use strict";var t=e.i(12423);let r="pbrBRDFFunctions",i=`#define FRESNEL_MAXIMUM_ON_ROUGH 0.25
122
+ #define BRDF_DIFFUSE_MODEL_EON 0
123
+ #define BRDF_DIFFUSE_MODEL_BURLEY 1
124
+ #define BRDF_DIFFUSE_MODEL_LAMBERT 2
125
+ #define BRDF_DIFFUSE_MODEL_LEGACY 3
126
+ #define DIELECTRIC_SPECULAR_MODEL_GLTF 0
127
+ #define DIELECTRIC_SPECULAR_MODEL_OPENPBR 1
128
+ #define CONDUCTOR_SPECULAR_MODEL_GLTF 0
129
+ #define CONDUCTOR_SPECULAR_MODEL_OPENPBR 1
130
+ #if !defined(PBR_VERTEX_SHADER) && !defined(OPENPBR_VERTEX_SHADER)
131
+ #ifdef MS_BRDF_ENERGY_CONSERVATION
132
+ fn getEnergyConservationFactor(specularEnvironmentR0: vec3f,environmentBrdf: vec3f)->vec3f {return 1.0+specularEnvironmentR0*(1.0/environmentBrdf.y-1.0);}
133
+ #endif
134
+ #if CONDUCTOR_SPECULAR_MODEL==CONDUCTOR_SPECULAR_MODEL_OPENPBR
135
+ const F82_COS_THETA_MAX: f32 =0.142857143;const F82_ONE_MINUS_CTM_POW5: f32 =0.462664366;const F82_ONE_MINUS_CTM_POW6: f32 =0.396569457;const F82_B_DENOMINATOR_RECIP: f32 =17.6512785;const BRDF_Z_SCALE: f32 =16.0;fn getF82Specular(NdotV: f32,F0: vec3f,edgeTint: vec3f,roughness: f32)->vec3f {let white_minus_F0: vec3f=vec3f(1.0f)-F0;let b_numerator: vec3f=(F0+white_minus_F0*F82_ONE_MINUS_CTM_POW5)*(vec3f(1.0)-edgeTint);let b: vec3f=b_numerator*F82_B_DENOMINATOR_RECIP;let cos_theta: f32=max(roughness,NdotV);let one_minus_cos_theta: f32=1.0-cos_theta;let offset_from_F0: vec3f=(white_minus_F0-b*cos_theta*one_minus_cos_theta)*pow(one_minus_cos_theta,5.0f);return clamp(F0+offset_from_F0,vec3f(0.0f),vec3f(1.0f));}
136
+ fn getF82B(F0: vec3f,edgeTint: vec3f)->vec3f {return (F0+(vec3f(1.0)-F0)*F82_ONE_MINUS_CTM_POW5)*(vec3f(1.0)-edgeTint)*F82_B_DENOMINATOR_RECIP;}
137
+ fn getF82DirectionalAlbedo(F0: vec3f,F90: vec3f,b: vec3f,environmentBrdf: vec3f)->vec3f {return (F90-F0)*environmentBrdf.x+F0*environmentBrdf.y-b*environmentBrdf.z;}
138
+ fn getF82AverageFresnel(F0: vec3f,b: vec3f)->vec3f {return F0+(vec3f(1.0)-F0)/21.0-b/126.0;}
139
+ #endif
140
+ #ifdef FUZZENVIRONMENTBRDF
141
+ fn getFuzzBRDFLookup(NdotV: f32,perceptualRoughness: f32)->vec3f {let UV: vec2f=vec2f(perceptualRoughness,NdotV);var brdfLookup: vec4f=textureSample(environmentFuzzBrdfSampler,environmentFuzzBrdfSamplerSampler,UV);const RiRange: vec2f=vec2f(0.0f,0.75f);const ARange: vec2f=vec2f(0.005f,0.88f);const BRange: vec2f=vec2f(-0.18f,0.002f);brdfLookup.r=mix(ARange.x, ARange.y, brdfLookup.r);brdfLookup.g=mix(BRange.x, BRange.y, brdfLookup.g);brdfLookup.b=mix(RiRange.x,RiRange.y,brdfLookup.b);return brdfLookup.rgb;}
142
+ #endif
143
+ #ifdef ENVIRONMENTBRDF
144
+ fn getBRDFLookup(NdotV: f32,perceptualRoughness: f32)->vec3f {var UV: vec2f= vec2f(NdotV,perceptualRoughness);var brdfLookup: vec4f= textureSample(environmentBrdfSampler,environmentBrdfSamplerSampler,UV);
145
+ #ifdef ENVIRONMENTBRDF_RGBD
146
+ brdfLookup=vec4f(fromRGBD(brdfLookup.rgba),brdfLookup.a);
147
+ #endif
148
+ return brdfLookup.rgb;}
149
+ fn getReflectanceFromBRDFWithEnvLookup(specularEnvironmentR0: vec3f,specularEnvironmentR90: vec3f,environmentBrdf: vec3f)->vec3f {
150
+ #ifdef BRDF_V_HEIGHT_CORRELATED
151
+ var reflectance: vec3f=(specularEnvironmentR90-specularEnvironmentR0)*environmentBrdf.x+specularEnvironmentR0*environmentBrdf.y;
152
+ #else
153
+ var reflectance: vec3f=specularEnvironmentR0*environmentBrdf.x+specularEnvironmentR90*environmentBrdf.y;
154
+ #endif
155
+ return reflectance;}
156
+ fn getReflectanceFromBRDFLookup(specularEnvironmentR0: vec3f,environmentBrdf: vec3f)->vec3f {
157
+ #ifdef BRDF_V_HEIGHT_CORRELATED
158
+ var reflectance: vec3f=mix(environmentBrdf.xxx,environmentBrdf.yyy,specularEnvironmentR0);
159
+ #else
160
+ var reflectance: vec3f=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y;
161
+ #endif
162
+ return reflectance;}
163
+ #endif
164
+ /* NOT USED
165
+ #if defined(SHEEN) && defined(SHEEN_SOFTER)
166
+ fn getBRDFLookupCharlieSheen(NdotV: f32,perceptualRoughness: f32)->f32
167
+ {var c: f32=1.0-NdotV;var c3: f32=c*c*c;return 0.65584461*c3+1.0/(4.16526551+exp(-7.97291361*perceptualRoughness+6.33516894));}
168
+ #endif
169
+ */
170
+ #if !defined(ENVIRONMENTBRDF) || defined(REFLECTIONMAP_SKYBOX) || defined(ALPHAFRESNEL)
171
+ fn getReflectanceFromAnalyticalBRDFLookup_Jones(VdotN: f32,reflectance0: vec3f,reflectance90: vec3f,smoothness: f32)->vec3f
172
+ {var weight: f32=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));}
173
+ #endif
174
+ #if defined(SHEEN) && defined(ENVIRONMENTBRDF)
175
+ /**
176
+ * The sheen BRDF not containing F can be easily stored in the blue channel of the BRDF texture.
177
+ * The blue channel contains DCharlie*VAshikhmin*NdotL as a lokkup table
178
+ */
179
+ fn getSheenReflectanceFromBRDFLookup(reflectance0: vec3f,environmentBrdf: vec3f)->vec3f {var sheenEnvironmentReflectance: vec3f=reflectance0*environmentBrdf.b;return sheenEnvironmentReflectance;}
180
+ #endif
181
+ fn fresnelSchlickGGXVec3(VdotH: f32,reflectance0: vec3f,reflectance90: vec3f)->vec3f
182
+ {return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}
183
+ fn fresnelSchlickGGX(VdotH: f32,reflectance0: f32,reflectance90: f32)->f32
184
+ {return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}
185
+ #ifdef CLEARCOAT
186
+ fn getR0RemappedForClearCoat(f0: vec3f)->vec3f {
187
+ #ifdef CLEARCOAT_DEFAULTIOR
188
+ #ifdef MOBILE
189
+ return saturateVec3(f0*(f0*0.526868+0.529324)-0.0482256);
190
+ #else
191
+ return saturateVec3(f0*(f0*(0.941892-0.263008*f0)+0.346479)-0.0285998);
192
+ #endif
193
+ #else
194
+ var s: vec3f=sqrt(f0);var t: vec3f=(uniforms.vClearCoatRefractionParams.z+uniforms.vClearCoatRefractionParams.w*s)/(uniforms.vClearCoatRefractionParams.w+uniforms.vClearCoatRefractionParams.z*s);return squareVec3(t);
195
+ #endif
196
+ }
197
+ #endif
198
+ #ifdef IRIDESCENCE
199
+ const XYZ_TO_REC709: mat3x3f= mat3x3f(
200
+ 3.2404542,-0.9692660, 0.0556434,
201
+ -1.5371385, 1.8760108,-0.2040259,
202
+ -0.4985314, 0.0415560, 1.0572252
203
+ );fn getIORTfromAirToSurfaceR0(f0: vec3f)->vec3f {var sqrtF0: vec3f=sqrt(f0);return (1.+sqrtF0)/(1.-sqrtF0);}
204
+ fn getR0fromIORsVec3(iorT: vec3f,iorI: f32)->vec3f {return squareVec3((iorT- vec3f(iorI))/(iorT+ vec3f(iorI)));}
205
+ fn getR0fromIORs(iorT: f32,iorI: f32)->f32 {return square((iorT-iorI)/(iorT+iorI));}
206
+ fn evalSensitivity(opd: f32,shift: vec3f)->vec3f {var phase: f32=2.0*PI*opd*1.0e-9;const val: vec3f= vec3f(5.4856e-13,4.4201e-13,5.2481e-13);const pos: vec3f= vec3f(1.6810e+06,1.7953e+06,2.2084e+06);const vr: vec3f= vec3f(4.3278e+09,9.3046e+09,6.6121e+09);var xyz: vec3f=val*sqrt(2.0*PI*vr)*cos(pos*phase+shift)*exp(-square(phase)*vr);xyz.x+=9.7470e-14*sqrt(2.0*PI*4.5282e+09)*cos(2.2399e+06*phase+shift[0])*exp(-4.5282e+09*square(phase));xyz/=1.0685e-7;var srgb: vec3f=XYZ_TO_REC709*xyz;return srgb;}
207
+ fn evalIridescence(outsideIOR: f32,eta2: f32,cosTheta1: f32,thinFilmThickness: f32,baseF0: vec3f)->vec3f {var I: vec3f= vec3f(1.0);var iridescenceIOR: f32=mix(outsideIOR,eta2,smoothstep(0.0,0.03,thinFilmThickness));var sinTheta2Sq: f32=square(outsideIOR/iridescenceIOR)*(1.0-square(cosTheta1));var cosTheta2Sq: f32=1.0-sinTheta2Sq;if (cosTheta2Sq<0.0) {return I;}
208
+ var cosTheta2: f32=sqrt(cosTheta2Sq);var R0: f32=getR0fromIORs(iridescenceIOR,outsideIOR);var R12: f32=fresnelSchlickGGX(cosTheta1,R0,1.);var R21: f32=R12;var T121: f32=1.0-R12;var phi12: f32=0.0;if (iridescenceIOR<outsideIOR) {phi12=PI;}
209
+ var phi21: f32=PI-phi12;var baseIOR: vec3f=getIORTfromAirToSurfaceR0(clamp(baseF0,vec3f(0.0),vec3f(0.9999)));
210
+ var R1: vec3f=getR0fromIORsVec3(baseIOR,iridescenceIOR);let maxR1: f32=max(R1.r,max(R1.g,R1.b));if (maxR1<1e-6) {return max(vec3f(R12),vec3f(0.0));}
211
+ var R23: vec3f=fresnelSchlickGGXVec3(cosTheta2,R1,vec3f(1.));var phi23: vec3f=vec3f(0.0);if (baseIOR[0]<iridescenceIOR) {phi23[0]=PI;}
212
+ if (baseIOR[1]<iridescenceIOR) {phi23[1]=PI;}
213
+ if (baseIOR[2]<iridescenceIOR) {phi23[2]=PI;}
214
+ var opd: f32=2.0*iridescenceIOR*thinFilmThickness*cosTheta2;var phi: vec3f=vec3f(phi21)+phi23;var R123: vec3f=clamp(R12*R23,vec3f(1e-5),vec3f(0.9999));var r123: vec3f=sqrt(R123);var Rs: vec3f=(T121*T121)*R23/(vec3f(1.0)-R123);var C0: vec3f=R12+Rs;I=C0;var Cm: vec3f=Rs-T121;for (var m: i32=1; m<=2; m++)
215
+ {Cm*=r123;var Sm: vec3f=2.0*evalSensitivity(f32(m)*opd,f32(m)*phi);I+=Cm*Sm;}
216
+ return max(I,vec3f(0.0));}
217
+ #endif
218
+ fn normalDistributionFunction_TrowbridgeReitzGGX(NdotH: f32,alphaG: f32)->f32
219
+ {var a2: f32=alphaG*alphaG;var d: f32=NdotH*NdotH*(a2-1.0)+1.0;return a2/(PI*d*d);}
220
+ #ifdef SHEEN
221
+ fn normalDistributionFunction_CharlieSheen(NdotH: f32,alphaG: f32)->f32
222
+ {var invR: f32=1./alphaG;var cos2h: f32=NdotH*NdotH;var sin2h: f32=1.-cos2h;return (2.+invR)*pow(sin2h,invR*.5)/(2.*PI);}
223
+ #endif
224
+ #ifdef ANISOTROPIC
225
+ fn normalDistributionFunction_BurleyGGX_Anisotropic(NdotH: f32,TdotH: f32,BdotH: f32,alphaTB: vec2f)->f32 {var a2: f32=alphaTB.x*alphaTB.y;var v: vec3f= vec3f(alphaTB.y*TdotH,alphaTB.x *BdotH,a2*NdotH);var v2: f32=dot(v,v);var w2: f32=a2/v2;return a2*w2*w2*RECIPROCAL_PI;}
226
+ #endif
227
+ #ifdef BRDF_V_HEIGHT_CORRELATED
228
+ fn smithVisibility_GGXCorrelated(NdotL: f32,NdotV: f32,alphaG: f32)->f32 {
229
+ #ifdef MOBILE
230
+ var GGXV: f32=NdotL*(NdotV*(1.0-alphaG)+alphaG);var GGXL: f32=NdotV*(NdotL*(1.0-alphaG)+alphaG);return 0.5/(GGXV+GGXL);
231
+ #else
232
+ var a2: f32=alphaG*alphaG;var GGXV: f32=NdotL*sqrt(NdotV*(NdotV-a2*NdotV)+a2);var GGXL: f32=NdotV*sqrt(NdotL*(NdotL-a2*NdotL)+a2);return 0.5/(GGXV+GGXL);
233
+ #endif
234
+ }
235
+ #else
236
+ fn smithVisibilityG1_TrowbridgeReitzGGXFast(dot: f32,alphaG: f32)->f32
237
+ {
238
+ #ifdef MOBILE
239
+ return 1.0/(dot+alphaG+(1.0-alphaG)*dot ));
240
+ #else
241
+ var alphaSquared: f32=alphaG*alphaG;return 1.0/(dot+sqrt(alphaSquared+(1.0-alphaSquared)*dot*dot));
242
+ #endif
243
+ }
244
+ fn smithVisibility_TrowbridgeReitzGGXFast(NdotL: f32,NdotV: f32,alphaG: f32)->f32
245
+ {var visibility: f32=smithVisibilityG1_TrowbridgeReitzGGXFast(NdotL,alphaG)*smithVisibilityG1_TrowbridgeReitzGGXFast(NdotV,alphaG);return visibility;}
246
+ #endif
247
+ #ifdef ANISOTROPIC
248
+ fn smithVisibility_GGXCorrelated_Anisotropic(NdotL: f32,NdotV: f32,TdotV: f32,BdotV: f32,TdotL: f32,BdotL: f32,alphaTB: vec2f)->f32 {var lambdaV: f32=NdotL*length( vec3f(alphaTB.x*TdotV,alphaTB.y*BdotV,NdotV));var lambdaL: f32=NdotV*length( vec3f(alphaTB.x*TdotL,alphaTB.y*BdotL,NdotL));var v: f32=0.5/(lambdaV+lambdaL);return v;}
249
+ #endif
250
+ #ifdef CLEARCOAT
251
+ fn visibility_Kelemen(VdotH: f32)->f32 {return 0.25/(VdotH*VdotH); }
252
+ #endif
253
+ #ifdef SHEEN
254
+ fn visibility_Ashikhmin(NdotL: f32,NdotV: f32)->f32
255
+ {return 1./(4.*(NdotL+NdotV-NdotL*NdotV));}
256
+ /* NOT USED
257
+ #ifdef SHEEN_SOFTER
258
+ fn l(x: f32,alphaG: f32)->f32
259
+ {var oneMinusAlphaSq: f32=(1.0-alphaG)*(1.0-alphaG);var a: f32=mix(21.5473,25.3245,oneMinusAlphaSq);var b: f32=mix(3.82987,3.32435,oneMinusAlphaSq);var c: f32=mix(0.19823,0.16801,oneMinusAlphaSq);var d: f32=mix(-1.97760,-1.27393,oneMinusAlphaSq);var e: f32=mix(-4.32054,-4.85967,oneMinusAlphaSq);return a/(1.0+b*pow(x,c))+d*x+e;}
260
+ fn lambdaSheen(cosTheta: f32,alphaG: f32)->f32
261
+ {return abs(cosTheta)<0.5 ? exp(l(cosTheta,alphaG)) : exp(2.0*l(0.5,alphaG)-l(1.0-cosTheta,alphaG));}
262
+ fn visibility_CharlieSheen(NdotL: f32,NdotV: f32,alphaG: f32)->f32
263
+ {var G: f32=1.0/(1.0+lambdaSheen(NdotV,alphaG)+lambdaSheen(NdotL,alphaG));return G/(4.0*NdotV*NdotL);}
264
+ #endif
265
+ */
266
+ #endif
267
+ const constant1_FON: f32=0.5f-2.0f/(3.0f*PI);const constant2_FON: f32=2.0f/3.0f-28.0f/(15.0f*PI);fn E_FON_approx(mu: f32,roughness: f32)->f32
268
+ {var sigma: f32=roughness;
269
+ var mucomp: f32=1.0f-mu;var mucomp2: f32=mucomp*mucomp;const Gcoeffs: mat2x2f=mat2x2f(0.0571085289f,-0.332181442f,
270
+ 0.491881867f,0.0714429953f);var GoverPi: f32=dot(Gcoeffs*vec2f(mucomp,mucomp2),vec2f(1.0f,mucomp2));return (1.0f+sigma*GoverPi)/(1.0f+constant1_FON*sigma);}
271
+ fn diffuseBRDF_EON(albedo: vec3f,roughness: f32,NdotL: f32,NdotV: f32,LdotV: f32)->vec3f
272
+ {var rho: vec3f=albedo;var sigma: f32=roughness;
273
+ var mu_i: f32=NdotL;
274
+ var mu_o: f32=NdotV;
275
+ var s: f32=LdotV-mu_i*mu_o;
276
+ var sovertF: f32=select(s,s/max(mu_i,mu_o),s>0.0f);
277
+ var AF: f32=1.0f/(1.0f+constant1_FON*sigma);
278
+ var f_ss: vec3f=(rho*RECIPROCAL_PI)*AF*(1.0f+sigma*sovertF);
279
+ var EFo: f32=E_FON_approx(mu_o,sigma);
280
+ var EFi: f32=E_FON_approx(mu_i,sigma);
281
+ var avgEF: f32=AF*(1.0f+constant2_FON*sigma);
282
+ var rho_ms: vec3f=(rho*rho)*avgEF/(vec3f(1.0f)-rho*(1.0f-avgEF));const eps: f32=1.0e-7f;var f_ms: vec3f=(rho_ms*RECIPROCAL_PI)*max(eps,1.0f-EFo)
283
+ * max(eps,1.0f-EFi)
284
+ / max(eps,1.0f-avgEF);return (f_ss+f_ms);}
285
+ fn diffuseBRDF_Burley(NdotL: f32,NdotV: f32,VdotH: f32,roughness: f32)->f32 {var diffuseFresnelNV: f32=pow5(saturateEps(1.0-NdotL));var diffuseFresnelNL: f32=pow5(saturateEps(1.0-NdotV));var diffuseFresnel90: f32=0.5+2.0*VdotH*VdotH*roughness;var fresnel: f32 =
286
+ (1.0+(diffuseFresnel90-1.0)*diffuseFresnelNL) *
287
+ (1.0+(diffuseFresnel90-1.0)*diffuseFresnelNV);return fresnel/PI;}
288
+ #ifdef SS_TRANSLUCENCY
289
+ fn transmittanceBRDF_Burley(tintColor: vec3f,diffusionDistance: vec3f,thickness: f32)->vec3f {var S: vec3f=1./maxEpsVec3(diffusionDistance);var temp: vec3f=exp((-0.333333333*thickness)*S);return tintColor.rgb*0.25*(temp*temp*temp+3.0*temp);}
290
+ fn computeWrappedDiffuseNdotL(NdotL: f32,w: f32)->f32 {var t: f32=1.0+w;var invt2: f32=1.0/(t*t);return saturate((NdotL+w)*invt2);}
291
+ #endif
292
+ #endif
293
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["pbrBRDFFunctionsWGSL",0,{name:r,shader:i}])},45329,35011,e=>{"use strict";var t=e.i(12423);let r="bonesDeclaration",i=`#if NUM_BONE_INFLUENCERS>0
294
+ #ifndef USE_VERTEX_PULLING
295
+ attribute matricesIndices : vec4f;attribute matricesWeights : vec4f;
296
+ #if NUM_BONE_INFLUENCERS>4
297
+ attribute matricesIndicesExtra : vec4f;attribute matricesWeightsExtra : vec4f;
298
+ #endif
299
+ #endif
300
+ #ifndef BAKED_VERTEX_ANIMATION_TEXTURE
301
+ #ifdef BONETEXTURE
302
+ var boneSampler : texture_2d<f32>;uniform boneTextureInfo : vec2f;
303
+ #else
304
+ uniform mBones : array<mat4x4f,BonesPerMesh>;
305
+ #endif
306
+ #ifdef BONES_VELOCITY_ENABLED
307
+ uniform mPreviousBones : array<mat4x4f,BonesPerMesh>;
308
+ #endif
309
+ #ifdef BONETEXTURE
310
+ fn readMatrixFromRawSampler(smp : texture_2d<f32>,index : f32)->mat4x4f
311
+ {let offset=i32(index)*4;
312
+ let textureWidth=i32(uniforms.boneTextureInfo.x);let y=offset/textureWidth;let x=offset % textureWidth;let m0=textureLoad(smp,vec2<i32>(x+0,y),0);let m1=textureLoad(smp,vec2<i32>(x+1,y),0);let m2=textureLoad(smp,vec2<i32>(x+2,y),0);let m3=textureLoad(smp,vec2<i32>(x+3,y),0);return mat4x4f(m0,m1,m2,m3);}
313
+ #endif
314
+ #endif
315
+ #endif
316
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["bonesDeclarationWGSL",0,{name:r,shader:i}],45329);let n="bakedVertexAnimationDeclaration",a=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
317
+ uniform bakedVertexAnimationTime: f32;uniform bakedVertexAnimationSettings: vec4<f32>;var bakedVertexAnimationTexture : texture_2d<f32>;
318
+ #ifdef INSTANCES
319
+ attribute bakedVertexAnimationSettingsInstanced : vec4<f32>;
320
+ #endif
321
+ fn readMatrixFromRawSamplerVAT(smp : texture_2d<f32>,index : f32,frame : f32)->mat4x4<f32>
322
+ {let offset=i32(index)*4;let frameUV=i32(frame);let m0=textureLoad(smp,vec2<i32>(offset+0,frameUV),0);let m1=textureLoad(smp,vec2<i32>(offset+1,frameUV),0);let m2=textureLoad(smp,vec2<i32>(offset+2,frameUV),0);let m3=textureLoad(smp,vec2<i32>(offset+3,frameUV),0);return mat4x4<f32>(m0,m1,m2,m3);}
323
+ #endif
324
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["bakedVertexAnimationDeclarationWGSL",0,{name:n,shader:a}],35011)},18062,e=>{"use strict";var t=e.i(12423);let r="instancesDeclaration",i=`#ifdef INSTANCES
325
+ attribute world0 : vec4<f32>;attribute world1 : vec4<f32>;attribute world2 : vec4<f32>;attribute world3 : vec4<f32>;
326
+ #ifdef INSTANCESCOLOR
327
+ attribute instanceColor : vec4<f32>;
328
+ #endif
329
+ #if defined(THIN_INSTANCES) && !defined(WORLD_UBO)
330
+ uniform world : mat4x4<f32>;
331
+ #endif
332
+ #if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
333
+ attribute previousWorld0 : vec4<f32>;attribute previousWorld1 : vec4<f32>;attribute previousWorld2 : vec4<f32>;attribute previousWorld3 : vec4<f32>;
334
+ #ifdef THIN_INSTANCES
335
+ uniform previousWorld : mat4x4<f32>;
336
+ #endif
337
+ #endif
338
+ #else
339
+ #if !defined(WORLD_UBO)
340
+ uniform world : mat4x4<f32>;
341
+ #endif
342
+ #if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
343
+ uniform previousWorld : mat4x4<f32>;
344
+ #endif
345
+ #endif
346
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["instancesDeclarationWGSL",0,{name:r,shader:i}])},77785,e=>{"use strict";var t=e.i(12423);let r="clipPlaneVertexDeclaration",i=`#ifdef CLIPPLANE
347
+ uniform vClipPlane: vec4<f32>;varying fClipDistance: f32;
348
+ #endif
349
+ #ifdef CLIPPLANE2
350
+ uniform vClipPlane2: vec4<f32>;varying fClipDistance2: f32;
351
+ #endif
352
+ #ifdef CLIPPLANE3
353
+ uniform vClipPlane3: vec4<f32>;varying fClipDistance3: f32;
354
+ #endif
355
+ #ifdef CLIPPLANE4
356
+ uniform vClipPlane4: vec4<f32>;varying fClipDistance4: f32;
357
+ #endif
358
+ #ifdef CLIPPLANE5
359
+ uniform vClipPlane5: vec4<f32>;varying fClipDistance5: f32;
360
+ #endif
361
+ #ifdef CLIPPLANE6
362
+ uniform vClipPlane6: vec4<f32>;varying fClipDistance6: f32;
363
+ #endif
364
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["clipPlaneVertexDeclarationWGSL",0,{name:r,shader:i}])},50331,3350,35845,3878,e=>{"use strict";var t=e.i(12423);let r="instancesVertex",i=`#ifdef INSTANCES
365
+ var finalWorld=mat4x4<f32>(vertexInputs.world0,vertexInputs.world1,vertexInputs.world2,vertexInputs.world3);
366
+ #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
367
+ var finalPreviousWorld=mat4x4<f32>(
368
+ vertexInputs.previousWorld0,vertexInputs.previousWorld1,
369
+ vertexInputs.previousWorld2,vertexInputs.previousWorld3);
370
+ #endif
371
+ #ifdef THIN_INSTANCES
372
+ #if !defined(WORLD_UBO)
373
+ finalWorld=uniforms.world*finalWorld;
374
+ #else
375
+ finalWorld=mesh.world*finalWorld;
376
+ #endif
377
+ #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
378
+ finalPreviousWorld=uniforms.previousWorld*finalPreviousWorld;
379
+ #endif
380
+ #endif
381
+ #else
382
+ #if !defined(WORLD_UBO)
383
+ var finalWorld=uniforms.world;
384
+ #else
385
+ var finalWorld=mesh.world;
386
+ #endif
387
+ #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
388
+ var finalPreviousWorld=uniforms.previousWorld;
389
+ #endif
390
+ #endif
391
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["instancesVertexWGSL",0,{name:r,shader:i}],50331);let n="bonesVertex",a=`#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
392
+ #if NUM_BONE_INFLUENCERS>0
393
+ var influence : mat4x4<f32>;
394
+ #ifdef BONETEXTURE
395
+ influence=readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[0])*vertexInputs.matricesWeights[0];
396
+ #if NUM_BONE_INFLUENCERS>1
397
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[1])*vertexInputs.matricesWeights[1];
398
+ #endif
399
+ #if NUM_BONE_INFLUENCERS>2
400
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[2])*vertexInputs.matricesWeights[2];
401
+ #endif
402
+ #if NUM_BONE_INFLUENCERS>3
403
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[3])*vertexInputs.matricesWeights[3];
404
+ #endif
405
+ #if NUM_BONE_INFLUENCERS>4
406
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[0])*vertexInputs.matricesWeightsExtra[0];
407
+ #endif
408
+ #if NUM_BONE_INFLUENCERS>5
409
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[1])*vertexInputs.matricesWeightsExtra[1];
410
+ #endif
411
+ #if NUM_BONE_INFLUENCERS>6
412
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[2])*vertexInputs.matricesWeightsExtra[2];
413
+ #endif
414
+ #if NUM_BONE_INFLUENCERS>7
415
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[3])*vertexInputs.matricesWeightsExtra[3];
416
+ #endif
417
+ #else
418
+ influence=uniforms.mBones[i32(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];
419
+ #if NUM_BONE_INFLUENCERS>1
420
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];
421
+ #endif
422
+ #if NUM_BONE_INFLUENCERS>2
423
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];
424
+ #endif
425
+ #if NUM_BONE_INFLUENCERS>3
426
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];
427
+ #endif
428
+ #if NUM_BONE_INFLUENCERS>4
429
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];
430
+ #endif
431
+ #if NUM_BONE_INFLUENCERS>5
432
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];
433
+ #endif
434
+ #if NUM_BONE_INFLUENCERS>6
435
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];
436
+ #endif
437
+ #if NUM_BONE_INFLUENCERS>7
438
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];
439
+ #endif
440
+ #endif
441
+ finalWorld=finalWorld*influence;
442
+ #endif
443
+ #endif
444
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["bonesVertexWGSL",0,{name:n,shader:a}],3350);let f="bakedVertexAnimation",o=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
445
+ {
446
+ #ifdef INSTANCES
447
+ let VATStartFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.x;let VATEndFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.y;let VATOffsetFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.z;let VATSpeed: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.w;
448
+ #else
449
+ let VATStartFrame: f32=uniforms.bakedVertexAnimationSettings.x;let VATEndFrame: f32=uniforms.bakedVertexAnimationSettings.y;let VATOffsetFrame: f32=uniforms.bakedVertexAnimationSettings.z;let VATSpeed: f32=uniforms.bakedVertexAnimationSettings.w;
450
+ #endif
451
+ let totalFrames: f32=VATEndFrame-VATStartFrame+1.0;let time: f32=uniforms.bakedVertexAnimationTime*VATSpeed/totalFrames;let frameCorrection: f32=select(1.0,0.0,time<1.0);let numOfFrames: f32=totalFrames-frameCorrection;var VATFrameNum: f32=fract(time)*numOfFrames;VATFrameNum=(VATFrameNum+VATOffsetFrame) % numOfFrames;VATFrameNum=floor(VATFrameNum);VATFrameNum=VATFrameNum+VATStartFrame+frameCorrection;var VATInfluence : mat4x4<f32>;VATInfluence=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[0],VATFrameNum)*vertexInputs.matricesWeights[0];
452
+ #if NUM_BONE_INFLUENCERS>1
453
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[1],VATFrameNum)*vertexInputs.matricesWeights[1];
454
+ #endif
455
+ #if NUM_BONE_INFLUENCERS>2
456
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[2],VATFrameNum)*vertexInputs.matricesWeights[2];
457
+ #endif
458
+ #if NUM_BONE_INFLUENCERS>3
459
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[3],VATFrameNum)*vertexInputs.matricesWeights[3];
460
+ #endif
461
+ #if NUM_BONE_INFLUENCERS>4
462
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[0],VATFrameNum)*vertexInputs.matricesWeightsExtra[0];
463
+ #endif
464
+ #if NUM_BONE_INFLUENCERS>5
465
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[1],VATFrameNum)*vertexInputs.matricesWeightsExtra[1];
466
+ #endif
467
+ #if NUM_BONE_INFLUENCERS>6
468
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[2],VATFrameNum)*vertexInputs.matricesWeightsExtra[2];
469
+ #endif
470
+ #if NUM_BONE_INFLUENCERS>7
471
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[3],VATFrameNum)*vertexInputs.matricesWeightsExtra[3];
472
+ #endif
473
+ finalWorld=finalWorld*VATInfluence;}
474
+ #endif
475
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["bakedVertexAnimationWGSL",0,{name:f,shader:o}],35845);let s="clipPlaneVertex",d=`#ifdef CLIPPLANE
476
+ vertexOutputs.fClipDistance=dot(worldPos,uniforms.vClipPlane);
477
+ #endif
478
+ #ifdef CLIPPLANE2
479
+ vertexOutputs.fClipDistance2=dot(worldPos,uniforms.vClipPlane2);
480
+ #endif
481
+ #ifdef CLIPPLANE3
482
+ vertexOutputs.fClipDistance3=dot(worldPos,uniforms.vClipPlane3);
483
+ #endif
484
+ #ifdef CLIPPLANE4
485
+ vertexOutputs.fClipDistance4=dot(worldPos,uniforms.vClipPlane4);
486
+ #endif
487
+ #ifdef CLIPPLANE5
488
+ vertexOutputs.fClipDistance5=dot(worldPos,uniforms.vClipPlane5);
489
+ #endif
490
+ #ifdef CLIPPLANE6
491
+ vertexOutputs.fClipDistance6=dot(worldPos,uniforms.vClipPlane6);
492
+ #endif
493
+ `;t.ShaderStore.IncludesShadersStoreWGSL[s]||(t.ShaderStore.IncludesShadersStoreWGSL[s]=d),e.s(["clipPlaneVertexWGSL",0,{name:s,shader:d}],3878)},75234,42893,8154,e=>{"use strict";var t=e.i(12423);let r="fogVertexDeclaration",i=`#ifdef FOG
494
+ varying vFogDistance: vec3f;
495
+ #endif
496
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["fogVertexDeclarationWGSL",0,{name:r,shader:i}],75234);let n="fogVertex",a=`#ifdef FOG
497
+ #ifdef SCENE_UBO
498
+ vertexOutputs.vFogDistance=(scene.view*worldPos).xyz;
499
+ #else
500
+ vertexOutputs.vFogDistance=(uniforms.view*worldPos).xyz;
501
+ #endif
502
+ #endif
503
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["fogVertexWGSL",0,{name:n,shader:a}],42893);let f="vertexColorMixing",o=`#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
504
+ vertexOutputs.vColor=vec4f(1.0);
505
+ #ifdef VERTEXCOLOR
506
+ #ifdef VERTEXALPHA
507
+ vertexOutputs.vColor*=colorUpdated;
508
+ #else
509
+ vertexOutputs.vColor=vec4f(vertexOutputs.vColor.rgb*colorUpdated.rgb,vertexOutputs.vColor.a);
510
+ #endif
511
+ #endif
512
+ #ifdef INSTANCESCOLOR
513
+ vertexOutputs.vColor*=vertexInputs.instanceColor;
514
+ #endif
515
+ #endif
516
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["vertexColorMixingWGSL",0,{name:f,shader:o}],8154)},89340,5122,49853,62077,e=>{"use strict";var t=e.i(12423);let r="morphTargetsVertexGlobalDeclaration",i=`#ifdef MORPHTARGETS
517
+ uniform morphTargetInfluences : array<f32,NUM_MORPH_INFLUENCERS>;
518
+ #ifdef MORPHTARGETS_TEXTURE
519
+ uniform morphTargetTextureIndices : array<f32,NUM_MORPH_INFLUENCERS>;uniform morphTargetTextureInfo : vec3<f32>;var morphTargets : texture_2d_array<f32>;fn readVector3FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec3<f32>
520
+ {
521
+ let textureWidth: i32=i32(uniforms.morphTargetTextureInfo.y);let y: i32=i32(vertexIndex)/textureWidth;let x: i32=i32(vertexIndex) % textureWidth;return textureLoad(morphTargets,vec2i(x,y),i32(uniforms.morphTargetTextureIndices[targetIndex]),0).xyz;}
522
+ fn readVector4FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec4<f32>
523
+ {
524
+ let textureWidth: i32=i32(uniforms.morphTargetTextureInfo.y);
525
+ let y: i32=i32(vertexIndex)/textureWidth;let x: i32=i32(vertexIndex) % textureWidth;return textureLoad(morphTargets,vec2i(x,y),i32(uniforms.morphTargetTextureIndices[targetIndex]),0);}
526
+ #endif
527
+ #endif
528
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["morphTargetsVertexGlobalDeclarationWGSL",0,{name:r,shader:i}],89340);let n="morphTargetsVertexDeclaration",a=`#ifdef MORPHTARGETS
529
+ #ifndef MORPHTARGETS_TEXTURE
530
+ #ifdef MORPHTARGETS_POSITION
531
+ attribute position{X} : vec3<f32>;
532
+ #endif
533
+ #ifdef MORPHTARGETS_NORMAL
534
+ attribute normal{X} : vec3<f32>;
535
+ #endif
536
+ #ifdef MORPHTARGETS_TANGENT
537
+ attribute tangent{X} : vec3<f32>;
538
+ #endif
539
+ #ifdef MORPHTARGETS_UV
540
+ attribute uv_{X} : vec2<f32>;
541
+ #endif
542
+ #ifdef MORPHTARGETS_UV2
543
+ attribute uv2_{X} : vec2<f32>;
544
+ #endif
545
+ #ifdef MORPHTARGETS_COLOR
546
+ attribute color{X} : vec4<f32>;
547
+ #endif
548
+ #elif {X}==0
549
+ uniform morphTargetCount: f32;
550
+ #endif
551
+ #endif
552
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["morphTargetsVertexDeclarationWGSL",0,{name:n,shader:a}],5122);let f="morphTargetsVertexGlobal",o=`#ifdef MORPHTARGETS
553
+ #ifdef MORPHTARGETS_TEXTURE
554
+ var vertexID : f32;
555
+ #endif
556
+ #endif
557
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["morphTargetsVertexGlobalWGSL",0,{name:f,shader:o}],49853);let s="morphTargetsVertex",d=`#ifdef MORPHTARGETS
558
+ #ifdef MORPHTARGETS_TEXTURE
559
+ #if {X}==0
560
+ for (var i=0; i<NUM_MORPH_INFLUENCERS; i=i+1) {if (f32(i)>=uniforms.morphTargetCount) {break;}
561
+ #ifdef USE_VERTEX_PULLING
562
+ vertexID=f32(vpVertexIndex)*uniforms.morphTargetTextureInfo.x;
563
+ #else
564
+ vertexID=f32(vertexInputs.vertexIndex)*uniforms.morphTargetTextureInfo.x;
565
+ #endif
566
+ #ifdef MORPHTARGETS_POSITION
567
+ #ifdef USE_VERTEX_PULLING
568
+ positionUpdated=positionUpdated+(readVector3FromRawSampler(i,vertexID)-vp_basePosition)*uniforms.morphTargetInfluences[i];
569
+ #else
570
+ positionUpdated=positionUpdated+(readVector3FromRawSampler(i,vertexID)-vertexInputs.position)*uniforms.morphTargetInfluences[i];
571
+ #endif
572
+ #endif
573
+ #ifdef MORPHTARGETTEXTURE_HASPOSITIONS
574
+ vertexID=vertexID+1.0;
575
+ #endif
576
+ #ifdef MORPHTARGETS_NORMAL
577
+ #ifdef USE_VERTEX_PULLING
578
+ normalUpdated=normalUpdated+(readVector3FromRawSampler(i,vertexID) -vp_baseNormal)*uniforms.morphTargetInfluences[i];
579
+ #else
580
+ normalUpdated=normalUpdated+(readVector3FromRawSampler(i,vertexID) -vertexInputs.normal)*uniforms.morphTargetInfluences[i];
581
+ #endif
582
+ #endif
583
+ #ifdef MORPHTARGETTEXTURE_HASNORMALS
584
+ vertexID=vertexID+1.0;
585
+ #endif
586
+ #ifdef MORPHTARGETS_UV
587
+ #ifdef USE_VERTEX_PULLING
588
+ uvUpdated=uvUpdated+(readVector3FromRawSampler(i,vertexID).xy-vp_baseUV)*uniforms.morphTargetInfluences[i];
589
+ #else
590
+ uvUpdated=uvUpdated+(readVector3FromRawSampler(i,vertexID).xy-vertexInputs.uv)*uniforms.morphTargetInfluences[i];
591
+ #endif
592
+ #endif
593
+ #ifdef MORPHTARGETTEXTURE_HASUVS
594
+ vertexID=vertexID+1.0;
595
+ #endif
596
+ #ifdef MORPHTARGETS_TANGENT
597
+ #ifdef USE_VERTEX_PULLING
598
+ tangentUpdated=vec4f(tangentUpdated.xyz+(readVector3FromRawSampler(i,vertexID) -vp_baseTangent.xyz)*uniforms.morphTargetInfluences[i],tangentUpdated.a);
599
+ #else
600
+ tangentUpdated=vec4f(tangentUpdated.xyz+(readVector3FromRawSampler(i,vertexID) -vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[i],tangentUpdated.a);
601
+ #endif
602
+ #endif
603
+ #ifdef MORPHTARGETTEXTURE_HASTANGENTS
604
+ vertexID=vertexID+1.0;
605
+ #endif
606
+ #ifdef MORPHTARGETS_UV2
607
+ #ifdef USE_VERTEX_PULLING
608
+ uv2Updated=uv2Updated+(readVector3FromRawSampler(i,vertexID).xy-vp_baseUV2)*uniforms.morphTargetInfluences[i];
609
+ #else
610
+ uv2Updated=uv2Updated+(readVector3FromRawSampler(i,vertexID).xy-vertexInputs.uv2)*uniforms.morphTargetInfluences[i];
611
+ #endif
612
+ #endif
613
+ #ifdef MORPHTARGETS_COLOR
614
+ #ifdef USE_VERTEX_PULLING
615
+ colorUpdated=colorUpdated+(readVector4FromRawSampler(i,vertexID)-vp_baseColor)*uniforms.morphTargetInfluences[i];
616
+ #else
617
+ colorUpdated=colorUpdated+(readVector4FromRawSampler(i,vertexID)-vertexInputs.color)*uniforms.morphTargetInfluences[i];
618
+ #endif
619
+ #endif
620
+ }
621
+ #endif
622
+ #else
623
+ #ifdef MORPHTARGETS_POSITION
624
+ #ifdef USE_VERTEX_PULLING
625
+ positionUpdated=positionUpdated+(vertexInputs.position{X}-vp_basePosition)*uniforms.morphTargetInfluences[{X}];
626
+ #else
627
+ positionUpdated=positionUpdated+(vertexInputs.position{X}-vertexInputs.position)*uniforms.morphTargetInfluences[{X}];
628
+ #endif
629
+ #endif
630
+ #ifdef MORPHTARGETS_NORMAL
631
+ #ifdef USE_VERTEX_PULLING
632
+ normalUpdated=normalUpdated+(vertexInputs.normal{X}-vp_baseNormal)*uniforms.morphTargetInfluences[{X}];
633
+ #else
634
+ normalUpdated=normalUpdated+(vertexInputs.normal{X}-vertexInputs.normal)*uniforms.morphTargetInfluences[{X}];
635
+ #endif
636
+ #endif
637
+ #ifdef MORPHTARGETS_TANGENT
638
+ #ifdef USE_VERTEX_PULLING
639
+ tangentUpdated=vec4f(tangentUpdated.xyz+(vertexInputs.tangent{X}-vp_baseTangent.xyz)*uniforms.morphTargetInfluences[{X}],tangentUpdated.a);
640
+ #else
641
+ tangentUpdated=vec4f(tangentUpdated.xyz+(vertexInputs.tangent{X}-vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[{X}],tangentUpdated.a);
642
+ #endif
643
+ #endif
644
+ #ifdef MORPHTARGETS_UV
645
+ #ifdef USE_VERTEX_PULLING
646
+ uvUpdated=uvUpdated+(vertexInputs.uv_{X}-vp_baseUV)*uniforms.morphTargetInfluences[{X}];
647
+ #else
648
+ uvUpdated=uvUpdated+(vertexInputs.uv_{X}-vertexInputs.uv)*uniforms.morphTargetInfluences[{X}];
649
+ #endif
650
+ #endif
651
+ #ifdef MORPHTARGETS_UV2
652
+ #ifdef USE_VERTEX_PULLING
653
+ uv2Updated=uv2Updated+(vertexInputs.uv2_{X}-vp_baseUV2)*uniforms.morphTargetInfluences[{X}];
654
+ #else
655
+ uv2Updated=uv2Updated+(vertexInputs.uv2_{X}-vertexInputs.uv2)*uniforms.morphTargetInfluences[{X}];
656
+ #endif
657
+ #endif
658
+ #ifdef MORPHTARGETS_COLOR
659
+ #ifdef USE_VERTEX_PULLING
660
+ colorUpdated=colorUpdated+(vertexInputs.color{X}-vp_baseColor)*uniforms.morphTargetInfluences[{X}];
661
+ #else
662
+ colorUpdated=colorUpdated+(vertexInputs.color{X}-vertexInputs.color)*uniforms.morphTargetInfluences[{X}];
663
+ #endif
664
+ #endif
665
+ #endif
666
+ #endif
667
+ `;t.ShaderStore.IncludesShadersStoreWGSL[s]||(t.ShaderStore.IncludesShadersStoreWGSL[s]=d),e.s(["morphTargetsVertexWGSL",0,{name:s,shader:d}],62077)},71822,39359,19376,90742,45012,20958,80255,25716,86752,6275,47167,e=>{"use strict";var t=e.i(12423);let r="uvAttributeDeclaration",i=`#if defined(UV{X}) && !defined(USE_VERTEX_PULLING)
668
+ attribute uv{X}: vec2f;
669
+ #endif
670
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["uvAttributeDeclarationWGSL",0,{name:r,shader:i}],71822);let n="prePassVertexDeclaration",a=`#ifdef PREPASS
671
+ #ifdef PREPASS_LOCAL_POSITION
672
+ varying vPosition : vec3f;
673
+ #endif
674
+ #ifdef PREPASS_DEPTH
675
+ varying vViewPos: vec3f;
676
+ #endif
677
+ #ifdef PREPASS_NORMALIZED_VIEW_DEPTH
678
+ varying vNormViewDepth: f32;
679
+ #endif
680
+ #if defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)
681
+ uniform previousViewProjection: mat4x4f;varying vCurrentPosition: vec4f;varying vPreviousPosition: vec4f;
682
+ #endif
683
+ #endif
684
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["prePassVertexDeclarationWGSL",0,{name:n,shader:a}],39359);let f="samplerVertexDeclaration",o=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
685
+ varying v_VARYINGNAME_UV: vec2f;
686
+ #endif
687
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["samplerVertexDeclarationWGSL",0,{name:f,shader:o}],19376);let s="lightVxUboDeclaration",d=`#ifdef LIGHT{X}
688
+ struct Light{X}
689
+ {vLightData: vec4f,
690
+ vLightDiffuse: vec4f,
691
+ vLightSpecular: vec4f,
692
+ #ifdef SPOTLIGHT{X}
693
+ vLightDirection: vec4f,
694
+ vLightFalloff: vec4f,
695
+ #elif defined(POINTLIGHT{X})
696
+ vLightFalloff: vec4f,
697
+ #elif defined(HEMILIGHT{X})
698
+ vLightGround: vec3f,
699
+ #elif defined(CLUSTLIGHT{X})
700
+ vSliceData: vec2f,
701
+ vSliceRanges: array<vec4f,CLUSTLIGHT_SLICES>,
702
+ #endif
703
+ #if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
704
+ vLightWidth: vec4f,
705
+ vLightHeight: vec4f,
706
+ #endif
707
+ shadowsInfo: vec4f,
708
+ depthValues: vec2f} ;var<uniform> light{X} : Light{X};
709
+ #ifdef SHADOW{X}
710
+ #ifdef SHADOWCSM{X}
711
+ uniform lightMatrix{X}: array<mat4x4f,SHADOWCSMNUM_CASCADES{X}>;varying vPositionFromLight{X}_0: vec4f;varying vDepthMetric{X}_0: f32;varying vPositionFromLight{X}_1: vec4f;varying vDepthMetric{X}_1: f32;varying vPositionFromLight{X}_2: vec4f;varying vDepthMetric{X}_2: f32;varying vPositionFromLight{X}_3: vec4f;varying vDepthMetric{X}_3: f32;varying vPositionFromCamera{X}: vec4f;
712
+ #elif defined(SHADOWCUBE{X})
713
+ #else
714
+ varying vPositionFromLight{X}: vec4f;varying vDepthMetric{X}: f32;uniform lightMatrix{X}: mat4x4f;
715
+ #endif
716
+ #endif
717
+ #endif
718
+ `;t.ShaderStore.IncludesShadersStoreWGSL[s]||(t.ShaderStore.IncludesShadersStoreWGSL[s]=d),e.s(["lightVxUboDeclarationWGSL",0,{name:s,shader:d}],90742);let l="vertexPullingDeclaration",c=`#ifdef USE_VERTEX_PULLING
719
+ #ifdef VERTEX_PULLING_USE_INDEX_BUFFER
720
+ var<storage,read> indices : array<u32>;
721
+ #endif
722
+ var<storage,read> position : array<f32>;uniform vp_position_info : vec4f;
723
+ #ifdef NORMAL
724
+ var<storage,read> normal : array<f32>;uniform vp_normal_info : vec4f;
725
+ #endif
726
+ #ifdef TANGENT
727
+ var<storage,read> tangent : array<f32>;uniform vp_tangent_info : vec4f;
728
+ #endif
729
+ #ifdef UV1
730
+ var<storage,read> uv : array<f32>;uniform vp_uv_info : vec4f;
731
+ #define VP_UV1_SUPPORTED
732
+ #endif
733
+ #ifdef UV2
734
+ var<storage,read> uv2 : array<f32>;uniform vp_uv2_info : vec4f;
735
+ #define VP_UV2_SUPPORTED
736
+ #endif
737
+ #ifdef UV3
738
+ var<storage,read> uv3 : array<f32>;uniform vp_uv3_info : vec4f;
739
+ #define VP_UV3_SUPPORTED
740
+ #endif
741
+ #ifdef UV4
742
+ var<storage,read> uv4 : array<f32>;uniform vp_uv4_info : vec4f;
743
+ #define VP_UV4_SUPPORTED
744
+ #endif
745
+ #ifdef UV5
746
+ var<storage,read> uv5 : array<f32>;uniform vp_uv5_info : vec4f;
747
+ #define VP_UV5_SUPPORTED
748
+ #endif
749
+ #ifdef UV6
750
+ var<storage,read> uv6 : array<f32>;uniform vp_uv6_info : vec4f;
751
+ #define VP_UV6_SUPPORTED
752
+ #endif
753
+ #ifdef VERTEXCOLOR
754
+ var<storage,read> color : array<f32>;uniform vp_color_info : vec4f;
755
+ #endif
756
+ #if NUM_BONE_INFLUENCERS>0
757
+ var<storage,read> matricesIndices : array<u32>;var<storage,read> matricesWeights : array<f32>;uniform vp_matricesIndices_info : vec4f;uniform vp_matricesWeights_info : vec4f;
758
+ #if NUM_BONE_INFLUENCERS>4
759
+ var<storage,read> matricesIndicesExtra : array<u32>;var<storage,read> matricesWeightsExtra : array<f32>;uniform vp_matricesIndicesExtra_info : vec4f;uniform vp_matricesWeightsExtra_info : vec4f;
760
+ #endif
761
+ #endif
762
+ fn vp_convertToFloat(word : u32,byteInWord : u32,dataType : u32,normalized : bool)->f32 {switch (dataType) {case 5120u: {
763
+ let shift=byteInWord*8u;let value=(word>>shift) & 0xFFu;let signedValue=f32(i32(value<<24u)>>24u);if (normalized) { return signedValue/127.0; }
764
+ return signedValue;}
765
+ case 5121u: {
766
+ let shift=byteInWord*8u;let value=(word>>shift) & 0xFFu;if (normalized) { return f32(value)/255.0; }
767
+ return f32(value);}
768
+ case 5122u: {
769
+ let shift=(byteInWord & 0xFFFFFFFEu)*8u;let value=(word>>shift) & 0xFFFFu;let signedValue=f32(i32(value<<16u)>>16u);if (normalized) { return signedValue/32767.0; }
770
+ return signedValue;}
771
+ case 5123u: {
772
+ let shift=(byteInWord & 0xFFFFFFFEu)*8u;let value=(word>>shift) & 0xFFFFu;if (normalized) { return f32(value)/65535.0; }
773
+ return f32(value);}
774
+ case 5126u: {
775
+ return bitcast<f32>(word);}
776
+ default: { return 0.0; }}}
777
+ fn vp_componentSize(dataType : u32)->u32 {return select(select(2u,1u,dataType==5120u || dataType==5121u),4u,dataType==5126u);}
778
+ fn vp_readVertexIndex(index : u32)->u32 {
779
+ #ifndef VERTEX_PULLING_USE_INDEX_BUFFER
780
+ return index;
781
+ #else
782
+ #ifdef VERTEX_PULLING_INDEX_BUFFER_32BITS
783
+ return indices[index];
784
+ #else
785
+ let u32_index=index/2u;let bit_offset=(index & 1u)*16u;return (indices[u32_index]>>bit_offset) & 0xFFFFu;
786
+ #endif
787
+ #endif
788
+ }
789
+ fn vp_readPositionValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(position[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
790
+ fn vp_readPosition(info : vec4f,vertexIndex : u32)->vec3f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec3f(
791
+ vp_readPositionValue(offset,dataType,normalized),
792
+ vp_readPositionValue(offset+cs,dataType,normalized),
793
+ vp_readPositionValue(offset+cs*2u,dataType,normalized)
794
+ );}
795
+ #ifdef NORMAL
796
+ fn vp_readNormalValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(normal[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
797
+ fn vp_readNormal(info : vec4f,vertexIndex : u32)->vec3f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec3f(
798
+ vp_readNormalValue(offset,dataType,normalized),
799
+ vp_readNormalValue(offset+cs,dataType,normalized),
800
+ vp_readNormalValue(offset+cs*2u,dataType,normalized)
801
+ );}
802
+ #endif
803
+ #ifdef TANGENT
804
+ fn vp_readTangentValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(tangent[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
805
+ fn vp_readTangent(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
806
+ vp_readTangentValue(offset,dataType,normalized),
807
+ vp_readTangentValue(offset+cs,dataType,normalized),
808
+ vp_readTangentValue(offset+cs*2u,dataType,normalized),
809
+ vp_readTangentValue(offset+cs*3u,dataType,normalized)
810
+ );}
811
+ #endif
812
+ #ifdef UV1
813
+ fn vp_readUVValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
814
+ fn vp_readUV(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
815
+ vp_readUVValue(offset,dataType,normalized),
816
+ vp_readUVValue(offset+cs,dataType,normalized)
817
+ );}
818
+ #endif
819
+ #ifdef UV2
820
+ fn vp_readUV2Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv2[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
821
+ fn vp_readUV2(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
822
+ vp_readUV2Value(offset,dataType,normalized),
823
+ vp_readUV2Value(offset+cs,dataType,normalized)
824
+ );}
825
+ #endif
826
+ #ifdef UV3
827
+ fn vp_readUV3Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv3[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
828
+ fn vp_readUV3(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
829
+ vp_readUV3Value(offset,dataType,normalized),
830
+ vp_readUV3Value(offset+cs,dataType,normalized)
831
+ );}
832
+ #endif
833
+ #ifdef UV4
834
+ fn vp_readUV4Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv4[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
835
+ fn vp_readUV4(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
836
+ vp_readUV4Value(offset,dataType,normalized),
837
+ vp_readUV4Value(offset+cs,dataType,normalized)
838
+ );}
839
+ #endif
840
+ #ifdef UV5
841
+ fn vp_readUV5Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv5[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
842
+ fn vp_readUV5(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
843
+ vp_readUV5Value(offset,dataType,normalized),
844
+ vp_readUV5Value(offset+cs,dataType,normalized)
845
+ );}
846
+ #endif
847
+ #ifdef UV6
848
+ fn vp_readUV6Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv6[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
849
+ fn vp_readUV6(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
850
+ vp_readUV6Value(offset,dataType,normalized),
851
+ vp_readUV6Value(offset+cs,dataType,normalized)
852
+ );}
853
+ #endif
854
+ #ifdef VERTEXCOLOR
855
+ fn vp_readColorValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(color[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
856
+ fn vp_readColor(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
857
+ vp_readColorValue(offset,dataType,normalized),
858
+ vp_readColorValue(offset+cs,dataType,normalized),
859
+ vp_readColorValue(offset+cs*2u,dataType,normalized),
860
+ vp_readColorValue(offset+cs*3u,dataType,normalized)
861
+ );}
862
+ #endif
863
+ #if NUM_BONE_INFLUENCERS>0
864
+ fn vp_readMatrixIndexValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(matricesIndices[byteOffset/4u],byteOffset % 4u,dataType,normalized);}
865
+ fn vp_readBoneIndices(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
866
+ vp_readMatrixIndexValue(offset,dataType,normalized),
867
+ vp_readMatrixIndexValue(offset+cs,dataType,normalized),
868
+ vp_readMatrixIndexValue(offset+cs*2u,dataType,normalized),
869
+ vp_readMatrixIndexValue(offset+cs*3u,dataType,normalized)
870
+ );}
871
+ fn vp_readMatrixWeightValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(matricesWeights[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
872
+ fn vp_readBoneWeights(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
873
+ vp_readMatrixWeightValue(offset,dataType,normalized),
874
+ vp_readMatrixWeightValue(offset+cs,dataType,normalized),
875
+ vp_readMatrixWeightValue(offset+cs*2u,dataType,normalized),
876
+ vp_readMatrixWeightValue(offset+cs*3u,dataType,normalized)
877
+ );}
878
+ #if NUM_BONE_INFLUENCERS>4
879
+ fn vp_readMatrixIndexExtraValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(matricesIndicesExtra[byteOffset/4u],byteOffset % 4u,dataType,normalized);}
880
+ fn vp_readBoneIndicesExtra(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
881
+ vp_readMatrixIndexExtraValue(offset,dataType,normalized),
882
+ vp_readMatrixIndexExtraValue(offset+cs,dataType,normalized),
883
+ vp_readMatrixIndexExtraValue(offset+cs*2u,dataType,normalized),
884
+ vp_readMatrixIndexExtraValue(offset+cs*3u,dataType,normalized)
885
+ );}
886
+ fn vp_readMatrixWeightExtraValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(matricesWeightsExtra[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
887
+ fn vp_readBoneWeightsExtra(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
888
+ vp_readMatrixWeightExtraValue(offset,dataType,normalized),
889
+ vp_readMatrixWeightExtraValue(offset+cs,dataType,normalized),
890
+ vp_readMatrixWeightExtraValue(offset+cs*2u,dataType,normalized),
891
+ vp_readMatrixWeightExtraValue(offset+cs*3u,dataType,normalized)
892
+ );}
893
+ #endif
894
+ #endif
895
+ #endif
896
+ `;t.ShaderStore.IncludesShadersStoreWGSL[l]||(t.ShaderStore.IncludesShadersStoreWGSL[l]=c),e.s(["vertexPullingDeclarationWGSL",0,{name:l,shader:c}],45012);let u="vertexPullingVertex",v=`#ifdef USE_VERTEX_PULLING
897
+ let vpVertexIndex: u32=vp_readVertexIndex(vertexInputs.vertexIndex);positionUpdated=vp_readPosition(uniforms.vp_position_info,vpVertexIndex);
898
+ #ifdef NORMAL
899
+ normalUpdated=vp_readNormal(uniforms.vp_normal_info,vpVertexIndex);
900
+ #endif
901
+ #ifdef TANGENT
902
+ tangentUpdated=vp_readTangent(uniforms.vp_tangent_info,vpVertexIndex);
903
+ #endif
904
+ #ifdef UV1
905
+ uvUpdated=vp_readUV(uniforms.vp_uv_info,vpVertexIndex);
906
+ #endif
907
+ #ifdef UV2
908
+ uv2Updated=vp_readUV2(uniforms.vp_uv2_info,vpVertexIndex);
909
+ #endif
910
+ #ifdef UV3
911
+ var uv3Updated: vec2f=vp_readUV3(uniforms.vp_uv3_info,vpVertexIndex);
912
+ #endif
913
+ #ifdef UV4
914
+ var uv4Updated: vec2f=vp_readUV4(uniforms.vp_uv4_info,vpVertexIndex);
915
+ #endif
916
+ #ifdef UV5
917
+ var uv5Updated: vec2f=vp_readUV5(uniforms.vp_uv5_info,vpVertexIndex);
918
+ #endif
919
+ #ifdef UV6
920
+ var uv6Updated: vec2f=vp_readUV6(uniforms.vp_uv6_info,vpVertexIndex);
921
+ #endif
922
+ #ifdef VERTEXCOLOR
923
+ colorUpdated=vp_readColor(uniforms.vp_color_info,vpVertexIndex);
924
+ #endif
925
+ #ifdef MORPHTARGETS
926
+ let vp_basePosition: vec3f=positionUpdated;
927
+ #ifdef NORMAL
928
+ let vp_baseNormal: vec3f=normalUpdated;
929
+ #endif
930
+ #ifdef TANGENT
931
+ let vp_baseTangent: vec4f=tangentUpdated;
932
+ #endif
933
+ #ifdef UV1
934
+ let vp_baseUV: vec2f=uvUpdated;
935
+ #endif
936
+ #ifdef UV2
937
+ let vp_baseUV2: vec2f=uv2Updated;
938
+ #endif
939
+ #ifdef VERTEXCOLOR
940
+ let vp_baseColor: vec4f=colorUpdated;
941
+ #endif
942
+ #endif
943
+ #if NUM_BONE_INFLUENCERS>0
944
+ var vp_matricesIndices: vec4f=vp_readBoneIndices(uniforms.vp_matricesIndices_info,vpVertexIndex);var vp_matricesWeights: vec4f=vp_readBoneWeights(uniforms.vp_matricesWeights_info,vpVertexIndex);
945
+ #if NUM_BONE_INFLUENCERS>4
946
+ var vp_matricesIndicesExtra: vec4f=vp_readBoneIndicesExtra(uniforms.vp_matricesIndicesExtra_info,vpVertexIndex);var vp_matricesWeightsExtra: vec4f=vp_readBoneWeightsExtra(uniforms.vp_matricesWeightsExtra_info,vpVertexIndex);
947
+ #endif
948
+ #endif
949
+ #endif
950
+ `;t.ShaderStore.IncludesShadersStoreWGSL[u]||(t.ShaderStore.IncludesShadersStoreWGSL[u]=v),e.s(["vertexPullingVertexWGSL",0,{name:u,shader:v}],20958);let m="prePassVertex",p=`#ifdef PREPASS_DEPTH
951
+ vertexOutputs.vViewPos=(scene.view*worldPos).rgb;
952
+ #endif
953
+ #ifdef PREPASS_NORMALIZED_VIEW_DEPTH
954
+ vertexOutputs.vNormViewDepth=((scene.view*worldPos).z-uniforms.cameraInfo.x)/(uniforms.cameraInfo.y-uniforms.cameraInfo.x);
955
+ #endif
956
+ #ifdef PREPASS_LOCAL_POSITION
957
+ vertexOutputs.vPosition=positionUpdated.xyz;
958
+ #endif
959
+ #if (defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && defined(BONES_VELOCITY_ENABLED)
960
+ vertexOutputs.vCurrentPosition=scene.viewProjection*worldPos;
961
+ #if NUM_BONE_INFLUENCERS>0
962
+ var previousInfluence: mat4x4f;previousInfluence=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];
963
+ #if NUM_BONE_INFLUENCERS>1
964
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];
965
+ #endif
966
+ #if NUM_BONE_INFLUENCERS>2
967
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];
968
+ #endif
969
+ #if NUM_BONE_INFLUENCERS>3
970
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];
971
+ #endif
972
+ #if NUM_BONE_INFLUENCERS>4
973
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];
974
+ #endif
975
+ #if NUM_BONE_INFLUENCERS>5
976
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];
977
+ #endif
978
+ #if NUM_BONE_INFLUENCERS>6
979
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];
980
+ #endif
981
+ #if NUM_BONE_INFLUENCERS>7
982
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];
983
+ #endif
984
+ vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*previousInfluence* vec4f(positionUpdated,1.0);
985
+ #else
986
+ vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld* vec4f(positionUpdated,1.0);
987
+ #endif
988
+ #endif
989
+ `;t.ShaderStore.IncludesShadersStoreWGSL[m]||(t.ShaderStore.IncludesShadersStoreWGSL[m]=p),e.s(["prePassVertexWGSL",0,{name:m,shader:p}],80255);let E="uvVariableDeclaration",_=`#ifdef MAINUV{X}
990
+ #if !defined(UV{X})
991
+ var uv{X}: vec2f=vec2f(0.,0.);
992
+ #elif defined(USE_VERTEX_PULLING)
993
+ var uv{X}: vec2f=uv{X}Updated;
994
+ #else
995
+ var uv{X}: vec2f=vertexInputs.uv{X};
996
+ #endif
997
+ vertexOutputs.vMainUV{X}=uv{X};
998
+ #endif
999
+ `;t.ShaderStore.IncludesShadersStoreWGSL[E]||(t.ShaderStore.IncludesShadersStoreWGSL[E]=_),e.s(["uvVariableDeclarationWGSL",0,{name:E,shader:_}],25716);let I="samplerVertexImplementation",S=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
1000
+ if (uniforms.v_INFONAME_==0.)
1001
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(uvUpdated,1.0,0.0)).xy;}
1002
+ #ifdef UV2
1003
+ else if (uniforms.v_INFONAME_==1.)
1004
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(uv2Updated,1.0,0.0)).xy;}
1005
+ #endif
1006
+ #ifdef UV3
1007
+ else if (uniforms.v_INFONAME_==2.)
1008
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv3,1.0,0.0)).xy;}
1009
+ #endif
1010
+ #ifdef UV4
1011
+ else if (uniforms.v_INFONAME_==3.)
1012
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv4,1.0,0.0)).xy;}
1013
+ #endif
1014
+ #ifdef UV5
1015
+ else if (uniforms.v_INFONAME_==4.)
1016
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv5,1.0,0.0)).xy;}
1017
+ #endif
1018
+ #ifdef UV6
1019
+ else if (uniforms.v_INFONAME_==5.)
1020
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv6,1.0,0.0)).xy;}
1021
+ #endif
1022
+ #endif
1023
+ `;t.ShaderStore.IncludesShadersStoreWGSL[I]||(t.ShaderStore.IncludesShadersStoreWGSL[I]=S),e.s(["samplerVertexImplementationWGSL",0,{name:I,shader:S}],86752);let x="shadowsVertex",N=`#ifdef SHADOWS
1024
+ #if defined(SHADOWCSM{X})
1025
+ #ifdef SCENE_UBO
1026
+ vertexOutputs.vPositionFromCamera{X}=scene.view*worldPos;
1027
+ #else
1028
+ vertexOutputs.vPositionFromCamera{X}=uniforms.view*worldPos;
1029
+ #endif
1030
+ #if SHADOWCSMNUM_CASCADES{X}>0
1031
+ vertexOutputs.vPositionFromLight{X}_0=uniforms.lightMatrix{X}[0]*worldPos;
1032
+ #ifdef USE_REVERSE_DEPTHBUFFER
1033
+ vertexOutputs.vDepthMetric{X}_0=(-vertexOutputs.vPositionFromLight{X}_0.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1034
+ #else
1035
+ vertexOutputs.vDepthMetric{X}_0= (vertexOutputs.vPositionFromLight{X}_0.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1036
+ #endif
1037
+ #endif
1038
+ #if SHADOWCSMNUM_CASCADES{X}>1
1039
+ vertexOutputs.vPositionFromLight{X}_1=uniforms.lightMatrix{X}[1]*worldPos;
1040
+ #ifdef USE_REVERSE_DEPTHBUFFER
1041
+ vertexOutputs.vDepthMetric{X}_1=(-vertexOutputs.vPositionFromLight{X}_1.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1042
+ #else
1043
+ vertexOutputs.vDepthMetric{X}_1= (vertexOutputs.vPositionFromLight{X}_1.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1044
+ #endif
1045
+ #endif
1046
+ #if SHADOWCSMNUM_CASCADES{X}>2
1047
+ vertexOutputs.vPositionFromLight{X}_2=uniforms.lightMatrix{X}[2]*worldPos;
1048
+ #ifdef USE_REVERSE_DEPTHBUFFER
1049
+ vertexOutputs.vDepthMetric{X}_2=(-vertexOutputs.vPositionFromLight{X}_2.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1050
+ #else
1051
+ vertexOutputs.vDepthMetric{X}_2= (vertexOutputs.vPositionFromLight{X}_2.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1052
+ #endif
1053
+ #endif
1054
+ #if SHADOWCSMNUM_CASCADES{X}>3
1055
+ vertexOutputs.vPositionFromLight{X}_3=uniforms.lightMatrix{X}[3]*worldPos;
1056
+ #ifdef USE_REVERSE_DEPTHBUFFER
1057
+ vertexOutputs.vDepthMetric{X}_3=(-vertexOutputs.vPositionFromLight{X}_3.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1058
+ #else
1059
+ vertexOutputs.vDepthMetric{X}_3= (vertexOutputs.vPositionFromLight{X}_3.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1060
+ #endif
1061
+ #endif
1062
+ #elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})
1063
+ vertexOutputs.vPositionFromLight{X}=uniforms.lightMatrix{X}*worldPos;
1064
+ #ifdef USE_REVERSE_DEPTHBUFFER
1065
+ vertexOutputs.vDepthMetric{X}=(-vertexOutputs.vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1066
+ #else
1067
+ vertexOutputs.vDepthMetric{X}=(vertexOutputs.vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
1068
+ #endif
1069
+ #endif
1070
+ #endif
1071
+ `;t.ShaderStore.IncludesShadersStoreWGSL[x]||(t.ShaderStore.IncludesShadersStoreWGSL[x]=N),e.s(["shadowsVertexWGSL",0,{name:x,shader:N}],6275);let T="logDepthVertex",A=`#ifdef LOGARITHMICDEPTH
1072
+ vertexOutputs.vFragmentDepth=1.0+vertexOutputs.position.w;vertexOutputs.position.z=log2(max(0.000001,vertexOutputs.vFragmentDepth))*uniforms.logarithmicDepthConstant;
1073
+ #endif
1074
+ `;t.ShaderStore.IncludesShadersStoreWGSL[T]||(t.ShaderStore.IncludesShadersStoreWGSL[T]=A),e.s(["logDepthVertexWGSL",0,{name:T,shader:A}],47167)},40664,e=>{"use strict";var t=e.i(12423);e.i(60106),e.i(50008);let r="openpbrUboDeclaration",i=`uniform vTangentSpaceParams: vec2f;uniform vLightingIntensity: vec4f;uniform pointSize: f32;uniform vDebugMode: vec2f;uniform renderTargetSize: vec2f;uniform cameraInfo: vec4f;uniform vTextureRepetitionHexTilingParams: vec4f;uniform backgroundRefractionMatrix: mat4x4f;uniform vBackgroundRefractionInfos: vec3f;uniform vReflectionInfos: vec2f;uniform reflectionMatrix: mat4x4f;uniform vReflectionMicrosurfaceInfos: vec3f;uniform vReflectionPosition: vec3f;uniform vReflectionSize: vec3f;uniform vReflectionFilteringInfo: vec2f;uniform vReflectionDominantDirection: vec3f;uniform vReflectionColor: vec3f;uniform vSphericalL00: vec3f;uniform vSphericalL1_1: vec3f;uniform vSphericalL10: vec3f;uniform vSphericalL11: vec3f;uniform vSphericalL2_2: vec3f;uniform vSphericalL2_1: vec3f;uniform vSphericalL20: vec3f;uniform vSphericalL21: vec3f;uniform vSphericalL22: vec3f;uniform vSphericalX: vec3f;uniform vSphericalY: vec3f;uniform vSphericalZ: vec3f;uniform vSphericalXX_ZZ: vec3f;uniform vSphericalYY_ZZ: vec3f;uniform vSphericalZZ: vec3f;uniform vSphericalXY: vec3f;uniform vSphericalYZ: vec3f;uniform vSphericalZX: vec3f;uniform vBaseWeight: f32;uniform vBaseColor: vec4f;uniform vBaseDiffuseRoughness: f32;uniform vReflectanceInfo: vec4f;uniform vSpecularColor: vec4f;uniform vSpecularAnisotropy: vec3f;uniform vTransmissionWeight : f32;uniform vTransmissionColor : vec3f;uniform vTransmissionDepth : f32;uniform vTransmissionScatter : vec3f;uniform vTransmissionScatterAnisotropy : f32;uniform vTransmissionDispersionScale : f32;uniform vTransmissionDispersionAbbeNumber : f32;uniform vSubsurfaceWeight: f32;uniform vSubsurfaceColor: vec3f;uniform vSubsurfaceRadius: f32;uniform vSubsurfaceRadiusScale: vec3f;uniform vSubsurfaceScatterAnisotropy: f32;uniform vCoatWeight: f32;uniform vCoatColor: vec3f;uniform vCoatRoughness: f32;uniform vCoatRoughnessAnisotropy: f32;uniform vCoatIor: f32;uniform vCoatDarkening : f32;uniform vFuzzWeight: f32;uniform vFuzzColor: vec3f;uniform vFuzzRoughness: f32;uniform vGeometryThinWalled: f32;uniform vGeometryCoatTangent: vec2f;uniform vGeometryThickness: f32;uniform vEmissionColor: vec3f;uniform vThinFilmWeight: f32;uniform vThinFilmThickness: vec2f;uniform vThinFilmIor: f32;uniform vBaseWeightInfos: vec2f;uniform baseWeightMatrix: mat4x4f;uniform vBaseColorInfos: vec2f;uniform baseColorMatrix: mat4x4f;uniform vBaseDiffuseRoughnessInfos: vec2f;uniform baseDiffuseRoughnessMatrix: mat4x4f;uniform vBaseMetalnessInfos: vec2f;uniform baseMetalnessMatrix: mat4x4f;uniform vSpecularWeightInfos: vec2f;uniform specularWeightMatrix: mat4x4f;uniform vSpecularColorInfos: vec2f;uniform specularColorMatrix: mat4x4f;uniform vSpecularRoughnessInfos: vec2f;uniform specularRoughnessMatrix: mat4x4f;uniform vSpecularRoughnessAnisotropyInfos: vec2f;uniform specularRoughnessAnisotropyMatrix: mat4x4f;uniform vTransmissionWeightInfos : vec2f;uniform transmissionWeightMatrix : mat4x4f;uniform vTransmissionColorInfos : vec2f;uniform transmissionColorMatrix : mat4x4f;uniform vTransmissionDepthInfos : vec2f;uniform transmissionDepthMatrix : mat4x4f;uniform vTransmissionScatterInfos : vec2f;uniform transmissionScatterMatrix : mat4x4f;uniform vTransmissionDispersionScaleInfos : vec2f;uniform transmissionDispersionScaleMatrix : mat4x4f;uniform vSubsurfaceWeightInfos: vec2f;uniform subsurfaceWeightMatrix: mat4x4f;uniform vSubsurfaceColorInfos: vec2f;uniform subsurfaceColorMatrix: mat4x4f;uniform vSubsurfaceRadiusScaleInfos: vec2f;uniform subsurfaceRadiusScaleMatrix: mat4x4f;uniform vCoatWeightInfos: vec2f;uniform coatWeightMatrix: mat4x4f;uniform vCoatColorInfos: vec2f;uniform coatColorMatrix: mat4x4f;uniform vCoatRoughnessInfos: vec2f;uniform coatRoughnessMatrix: mat4x4f;uniform vCoatRoughnessAnisotropyInfos: vec2f;uniform coatRoughnessAnisotropyMatrix: mat4x4f;uniform vCoatDarkeningInfos : vec2f;uniform coatDarkeningMatrix : mat4x4f;uniform vFuzzWeightInfos: vec2f;uniform fuzzWeightMatrix: mat4x4f;uniform vFuzzColorInfos: vec2f;uniform fuzzColorMatrix: mat4x4f;uniform vFuzzRoughnessInfos: vec2f;uniform fuzzRoughnessMatrix: mat4x4f;uniform vGeometryNormalInfos: vec2f;uniform geometryNormalMatrix: mat4x4f;uniform vGeometryTangentInfos: vec2f;uniform geometryTangentMatrix: mat4x4f;uniform vGeometryCoatNormalInfos: vec2f;uniform geometryCoatNormalMatrix: mat4x4f;uniform vGeometryCoatTangentInfos: vec2f;uniform geometryCoatTangentMatrix: mat4x4f;uniform vGeometryOpacityInfos: vec2f;uniform geometryOpacityMatrix: mat4x4f;uniform vGeometryThicknessInfos: vec2f;uniform geometryThicknessMatrix: mat4x4f;uniform vEmissionColorInfos: vec2f;uniform emissionColorMatrix: mat4x4f;uniform vThinFilmWeightInfos: vec2f;uniform thinFilmWeightMatrix: mat4x4f;uniform vThinFilmThicknessInfos: vec2f;uniform thinFilmThicknessMatrix: mat4x4f;uniform vAmbientOcclusionInfos: vec2f;uniform ambientOcclusionMatrix: mat4x4f;
1075
+ #define ADDITIONAL_UBO_DECLARATION
1076
+ #include<sceneUboDeclaration>
1077
+ #include<meshUboDeclaration>
1078
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["openpbrUboDeclarationWGSL",0,{name:r,shader:i}])},51455,e=>{"use strict";var t=e.i(12423),r=e.i(60106),i=e.i(50008),n=e.i(40664),a=e.i(71822),f=e.i(39780),o=e.i(4357),s=e.i(61202),d=e.i(45329),l=e.i(35011),c=e.i(18062),u=e.i(39359),v=e.i(19376),m=e.i(99452);let p="openpbrNormalMapVertexDeclaration",E=`#if defined(GEOMETRY_NORMAL) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) || defined(FUZZ)
1079
+ #if defined(TANGENT) && defined(NORMAL)
1080
+ varying vTBN0: vec3f;varying vTBN1: vec3f;varying vTBN2: vec3f;
1081
+ #endif
1082
+ #endif
1083
+ `;t.ShaderStore.IncludesShadersStoreWGSL[p]||(t.ShaderStore.IncludesShadersStoreWGSL[p]=E);var _=e.i(77785),I=e.i(75234),S=e.i(90742),x=e.i(89340),N=e.i(5122),T=e.i(54758),A=e.i(45012),R=e.i(20958),h=e.i(49853),V=e.i(62077),O=e.i(50331),M=e.i(3350),L=e.i(35845),g=e.i(80255),F=e.i(25716),U=e.i(86752);let C="openpbrNormalMapVertex",G=`#if defined(GEOMETRY_NORMAL) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) || defined(FUZZ)
1084
+ #if defined(TANGENT) && defined(NORMAL)
1085
+ var tbnNormal: vec3f=normalize(normalUpdated);var tbnTangent: vec3f=normalize(tangentUpdated.xyz);var tbnBitangent: vec3f=cross(tbnNormal,tbnTangent)*tangentUpdated.w;var matTemp= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz)* mat3x3f(tbnTangent,tbnBitangent,tbnNormal);vertexOutputs.vTBN0=matTemp[0];vertexOutputs.vTBN1=matTemp[1];vertexOutputs.vTBN2=matTemp[2];
1086
+ #endif
1087
+ #endif
1088
+ `;t.ShaderStore.IncludesShadersStoreWGSL[C]||(t.ShaderStore.IncludesShadersStoreWGSL[C]=G);var D=e.i(3878),P=e.i(42893),b=e.i(6275),y=e.i(8154),W=e.i(47167);let X="openpbrVertexShader",z=`#define OPENPBR_VERTEX_SHADER
1089
+ #include<openpbrUboDeclaration>
1090
+ #define CUSTOM_VERTEX_BEGIN
1091
+ #ifndef USE_VERTEX_PULLING
1092
+ attribute position: vec3f;
1093
+ #ifdef NORMAL
1094
+ attribute normal: vec3f;
1095
+ #endif
1096
+ #ifdef TANGENT
1097
+ attribute tangent: vec4f;
1098
+ #endif
1099
+ #ifdef UV1
1100
+ attribute uv: vec2f;
1101
+ #endif
1102
+ #include<uvAttributeDeclaration>[2..7]
1103
+ #ifdef VERTEXCOLOR
1104
+ attribute color: vec4f;
1105
+ #endif
1106
+ #endif
1107
+ #include<mainUVVaryingDeclaration>[1..7]
1108
+ #include<helperFunctions>
1109
+ #include<pbrBRDFFunctions>
1110
+ #include<bonesDeclaration>
1111
+ #include<bakedVertexAnimationDeclaration>
1112
+ #include<instancesDeclaration>
1113
+ #include<prePassVertexDeclaration>
1114
+ #include<samplerVertexDeclaration>(_DEFINENAME_,BASE_COLOR,_VARYINGNAME_,BaseColor)
1115
+ #include<samplerVertexDeclaration>(_DEFINENAME_,BASE_WEIGHT,_VARYINGNAME_,BaseWeight)
1116
+ #include<samplerVertexDeclaration>(_DEFINENAME_,BASE_DIFFUSE_ROUGHNESS,_VARYINGNAME_,BaseDiffuseRoughness)
1117
+ #include<samplerVertexDeclaration>(_DEFINENAME_,BASE_METALNESS,_VARYINGNAME_,BaseMetalness)
1118
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR_WEIGHT,_VARYINGNAME_,SpecularWeight)
1119
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR_COLOR,_VARYINGNAME_,SpecularColor)
1120
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR_ROUGHNESS,_VARYINGNAME_,SpecularRoughness)
1121
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR_ROUGHNESS_ANISOTROPY,_VARYINGNAME_,SpecularRoughnessAnisotropy)
1122
+ #include<samplerVertexDeclaration>(_DEFINENAME_,TRANSMISSION_WEIGHT,_VARYINGNAME_,TransmissionWeight)
1123
+ #include<samplerVertexDeclaration>(_DEFINENAME_,TRANSMISSION_COLOR,_VARYINGNAME_,TransmissionColor)
1124
+ #include<samplerVertexDeclaration>(_DEFINENAME_,TRANSMISSION_DEPTH,_VARYINGNAME_,TransmissionDepth)
1125
+ #include<samplerVertexDeclaration>(_DEFINENAME_,TRANSMISSION_SCATTER,_VARYINGNAME_,TransmissionScatter)
1126
+ #include<samplerVertexDeclaration>(_DEFINENAME_,TRANSMISSION_DISPERSION_SCALE,_VARYINGNAME_,TransmissionDispersionScale)
1127
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SUBSURFACE_WEIGHT,_VARYINGNAME_,SubsurfaceWeight)
1128
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SUBSURFACE_COLOR,_VARYINGNAME_,SubsurfaceColor)
1129
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SUBSURFACE_RADIUS_SCALE,_VARYINGNAME_,SubsurfaceRadiusScale)
1130
+ #include<samplerVertexDeclaration>(_DEFINENAME_,COAT_WEIGHT,_VARYINGNAME_,CoatWeight)
1131
+ #include<samplerVertexDeclaration>(_DEFINENAME_,COAT_COLOR,_VARYINGNAME_,CoatColor)
1132
+ #include<samplerVertexDeclaration>(_DEFINENAME_,COAT_ROUGHNESS,_VARYINGNAME_,CoatRoughness)
1133
+ #include<samplerVertexDeclaration>(_DEFINENAME_,COAT_ROUGHNESS_ANISOTROPY,_VARYINGNAME_,CoatRoughnessAnisotropy)
1134
+ #include<samplerVertexDeclaration>(_DEFINENAME_,COAT_DARKENING,_VARYINGNAME_,CoatDarkening)
1135
+ #include<samplerVertexDeclaration>(_DEFINENAME_,FUZZ_WEIGHT,_VARYINGNAME_,FuzzWeight)
1136
+ #include<samplerVertexDeclaration>(_DEFINENAME_,FUZZ_COLOR,_VARYINGNAME_,FuzzColor)
1137
+ #include<samplerVertexDeclaration>(_DEFINENAME_,FUZZ_ROUGHNESS,_VARYINGNAME_,FuzzRoughness)
1138
+ #include<samplerVertexDeclaration>(_DEFINENAME_,GEOMETRY_NORMAL,_VARYINGNAME_,GeometryNormal)
1139
+ #include<samplerVertexDeclaration>(_DEFINENAME_,GEOMETRY_TANGENT,_VARYINGNAME_,GeometryTangent)
1140
+ #include<samplerVertexDeclaration>(_DEFINENAME_,GEOMETRY_COAT_NORMAL,_VARYINGNAME_,GeometryCoatNormal)
1141
+ #include<samplerVertexDeclaration>(_DEFINENAME_,GEOMETRY_OPACITY,_VARYINGNAME_,GeometryOpacity)
1142
+ #include<samplerVertexDeclaration>(_DEFINENAME_,GEOMETRY_THICKNESS,_VARYINGNAME_,GeometryThickness)
1143
+ #include<samplerVertexDeclaration>(_DEFINENAME_,EMISSION_COLOR,_VARYINGNAME_,EmissionColor)
1144
+ #include<samplerVertexDeclaration>(_DEFINENAME_,THIN_FILM_WEIGHT,_VARYINGNAME_,ThinFilmWeight)
1145
+ #include<samplerVertexDeclaration>(_DEFINENAME_,THIN_FILM_THICKNESS,_VARYINGNAME_,ThinFilmThickness)
1146
+ #include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT_OCCLUSION,_VARYINGNAME_,AmbientOcclusion)
1147
+ #include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)
1148
+ #include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)
1149
+ varying vPositionW: vec3f;
1150
+ #if DEBUGMODE>0
1151
+ varying vClipSpacePosition: vec4f;
1152
+ #endif
1153
+ #ifdef NORMAL
1154
+ varying vNormalW: vec3f;
1155
+ #if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)
1156
+ varying vEnvironmentIrradiance: vec3f;
1157
+ #include<harmonicsFunctions>
1158
+ #endif
1159
+ #endif
1160
+ #if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
1161
+ varying vColor: vec4f;
1162
+ #endif
1163
+ #include<openpbrNormalMapVertexDeclaration>
1164
+ #include<clipPlaneVertexDeclaration>
1165
+ #include<fogVertexDeclaration>
1166
+ #include<lightVxUboDeclaration>[0..maxSimultaneousLights]
1167
+ #include<morphTargetsVertexGlobalDeclaration>
1168
+ #include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]
1169
+ #ifdef REFLECTIONMAP_SKYBOX
1170
+ varying vPositionUVW: vec3f;
1171
+ #endif
1172
+ #if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
1173
+ varying vDirectionW: vec3f;
1174
+ #endif
1175
+ #include<logDepthDeclaration>
1176
+ #include<vertexPullingDeclaration>
1177
+ #define CUSTOM_VERTEX_DEFINITIONS
1178
+ @vertex
1179
+ fn main(input : VertexInputs)->FragmentInputs {
1180
+ #define CUSTOM_VERTEX_MAIN_BEGIN
1181
+ #ifdef USE_VERTEX_PULLING
1182
+ var positionUpdated: vec3f=vec3f(0.0);
1183
+ #ifdef NORMAL
1184
+ var normalUpdated: vec3f=vec3f(0.0);
1185
+ #endif
1186
+ #ifdef TANGENT
1187
+ var tangentUpdated: vec4f=vec4f(0.0);
1188
+ #endif
1189
+ #ifdef UV1
1190
+ var uvUpdated: vec2f=vec2f(0.0);
1191
+ #endif
1192
+ #ifdef UV2
1193
+ var uv2Updated: vec2f=vec2f(0.0);
1194
+ #endif
1195
+ #ifdef VERTEXCOLOR
1196
+ var colorUpdated: vec4f=vec4f(0.0);
1197
+ #endif
1198
+ #else
1199
+ var positionUpdated: vec3f=vertexInputs.position;
1200
+ #ifdef NORMAL
1201
+ var normalUpdated: vec3f=vertexInputs.normal;
1202
+ #endif
1203
+ #ifdef TANGENT
1204
+ var tangentUpdated: vec4f=vertexInputs.tangent;
1205
+ #endif
1206
+ #ifdef UV1
1207
+ var uvUpdated: vec2f=vertexInputs.uv;
1208
+ #endif
1209
+ #ifdef UV2
1210
+ var uv2Updated: vec2f=vertexInputs.uv2;
1211
+ #endif
1212
+ #ifdef VERTEXCOLOR
1213
+ var colorUpdated: vec4f=vertexInputs.color;
1214
+ #endif
1215
+ #endif
1216
+ #include<vertexPullingVertex>
1217
+ #include<morphTargetsVertexGlobal>
1218
+ #include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]
1219
+ #ifdef REFLECTIONMAP_SKYBOX
1220
+ vertexOutputs.vPositionUVW=positionUpdated;
1221
+ #endif
1222
+ #define CUSTOM_VERTEX_UPDATE_POSITION
1223
+ #define CUSTOM_VERTEX_UPDATE_NORMAL
1224
+ #include<instancesVertex>
1225
+ #if defined(PREPASS) && ((defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED)
1226
+ vertexOutputs.vCurrentPosition=scene.viewProjection*finalWorld*vec4f(positionUpdated,1.0);vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*vec4f(positionUpdated,1.0);
1227
+ #endif
1228
+ #ifdef USE_VERTEX_PULLING
1229
+ #include<bonesVertex>(vertexInputs.matricesIndices,vp_matricesIndices,vertexInputs.matricesWeights,vp_matricesWeights,vertexInputs.matricesIndicesExtra,vp_matricesIndicesExtra,vertexInputs.matricesWeightsExtra,vp_matricesWeightsExtra)
1230
+ #include<bakedVertexAnimation>(vertexInputs.matricesIndices,vp_matricesIndices,vertexInputs.matricesWeights,vp_matricesWeights,vertexInputs.matricesIndicesExtra,vp_matricesIndicesExtra,vertexInputs.matricesWeightsExtra,vp_matricesWeightsExtra)
1231
+ #else
1232
+ #include<bonesVertex>
1233
+ #include<bakedVertexAnimation>
1234
+ #endif
1235
+ var worldPos: vec4f=finalWorld* vec4f(positionUpdated,1.0);vertexOutputs.vPositionW= worldPos.xyz;
1236
+ #ifdef PREPASS
1237
+ #include<prePassVertex>
1238
+ #endif
1239
+ #ifdef NORMAL
1240
+ var normalWorld: mat3x3f= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz);
1241
+ #if defined(INSTANCES) && defined(THIN_INSTANCES)
1242
+ vertexOutputs.vNormalW=normalUpdated/ vec3f(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vertexOutputs.vNormalW=normalize(normalWorld*vertexOutputs.vNormalW);
1243
+ #else
1244
+ #ifdef NONUNIFORMSCALING
1245
+ normalWorld=transposeMat3(inverseMat3(normalWorld));
1246
+ #endif
1247
+ vertexOutputs.vNormalW=normalize(normalWorld*normalUpdated);
1248
+ #endif
1249
+ #if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)
1250
+ #if BASE_DIFFUSE_MODEL != BRDF_DIFFUSE_MODEL_LAMBERT && BASE_DIFFUSE_MODEL != BRDF_DIFFUSE_MODEL_LEGACY
1251
+ var viewDirectionW: vec3f=normalize(scene.vEyePosition.xyz-vertexOutputs.vPositionW);var NdotV: f32=max(dot(vertexOutputs.vNormalW,viewDirectionW),0.0);var roughNormal: vec3f=mix(vertexOutputs.vNormalW,viewDirectionW,(0.5*(1.0-NdotV))*uniforms.vBaseDiffuseRoughness);var reflectionVector: vec3f= (uniforms.reflectionMatrix* vec4f(roughNormal,0)).xyz;
1252
+ #else
1253
+ var reflectionVector: vec3f= (uniforms.reflectionMatrix* vec4f(vertexOutputs.vNormalW,0)).xyz;
1254
+ #endif
1255
+ #ifdef REFLECTIONMAP_OPPOSITEZ
1256
+ reflectionVector.z*=-1.0;
1257
+ #endif
1258
+ vertexOutputs.vEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);
1259
+ #endif
1260
+ #endif
1261
+ #define CUSTOM_VERTEX_UPDATE_WORLDPOS
1262
+ #ifdef MULTIVIEW
1263
+ if (gl_ViewID_OVR==0u) {vertexOutputs.position=scene.viewProjection*worldPos;} else {vertexOutputs.position=scene.viewProjectionR*worldPos;}
1264
+ #else
1265
+ vertexOutputs.position=scene.viewProjection*worldPos;
1266
+ #endif
1267
+ #if DEBUGMODE>0
1268
+ vertexOutputs.vClipSpacePosition=vertexOutputs.position;
1269
+ #endif
1270
+ #if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
1271
+ vertexOutputs.vDirectionW=normalize((finalWorld*vec4f(positionUpdated,0.0)).xyz);
1272
+ #endif
1273
+ #ifndef UV1
1274
+ var uvUpdated: vec2f= vec2f(0.,0.);
1275
+ #endif
1276
+ #ifdef MAINUV1
1277
+ vertexOutputs.vMainUV1=uvUpdated;
1278
+ #endif
1279
+ #ifndef UV2
1280
+ var uv2Updated: vec2f= vec2f(0.,0.);
1281
+ #endif
1282
+ #ifdef MAINUV2
1283
+ vertexOutputs.vMainUV2=uv2Updated;
1284
+ #endif
1285
+ #include<uvVariableDeclaration>[3..7]
1286
+ #include<samplerVertexImplementation>(_DEFINENAME_,BASE_COLOR,_VARYINGNAME_,BaseColor,_MATRIXNAME_,baseColor,_INFONAME_,BaseColorInfos.x)
1287
+ #include<samplerVertexImplementation>(_DEFINENAME_,BASE_WEIGHT,_VARYINGNAME_,BaseWeight,_MATRIXNAME_,baseWeight,_INFONAME_,BaseWeightInfos.x)
1288
+ #include<samplerVertexImplementation>(_DEFINENAME_,BASE_DIFFUSE_ROUGHNESS,_VARYINGNAME_,BaseDiffuseRoughness,_MATRIXNAME_,baseDiffuseRoughness,_INFONAME_,BaseDiffuseRoughnessInfos.x)
1289
+ #include<samplerVertexImplementation>(_DEFINENAME_,BASE_METALNESS,_VARYINGNAME_,BaseMetalness,_MATRIXNAME_,baseMetalness,_INFONAME_,BaseMetalnessInfos.x)
1290
+ #include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR_WEIGHT,_VARYINGNAME_,SpecularWeight,_MATRIXNAME_,specularWeight,_INFONAME_,SpecularWeightInfos.x)
1291
+ #include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR_COLOR,_VARYINGNAME_,SpecularColor,_MATRIXNAME_,specularColor,_INFONAME_,SpecularColorInfos.x)
1292
+ #include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR_ROUGHNESS,_VARYINGNAME_,SpecularRoughness,_MATRIXNAME_,specularRoughness,_INFONAME_,SpecularRoughnessInfos.x)
1293
+ #include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR_ROUGHNESS_ANISOTROPY,_VARYINGNAME_,SpecularRoughnessAnisotropy,_MATRIXNAME_,specularRoughnessAnisotropy,_INFONAME_,SpecularRoughnessAnisotropyInfos.x)
1294
+ #include<samplerVertexImplementation>(_DEFINENAME_,TRANSMISSION_WEIGHT,_VARYINGNAME_,TransmissionWeight,_MATRIXNAME_,transmissionWeight,_INFONAME_,TransmissionWeightInfos.x)
1295
+ #include<samplerVertexImplementation>(_DEFINENAME_,TRANSMISSION_COLOR,_VARYINGNAME_,TransmissionColor,_MATRIXNAME_,transmissionColor,_INFONAME_,TransmissionColorInfos.x)
1296
+ #include<samplerVertexImplementation>(_DEFINENAME_,TRANSMISSION_DEPTH,_VARYINGNAME_,TransmissionDepth,_MATRIXNAME_,transmissionDepth,_INFONAME_,TransmissionDepthInfos.x)
1297
+ #include<samplerVertexImplementation>(_DEFINENAME_,TRANSMISSION_SCATTER,_VARYINGNAME_,TransmissionScatter,_MATRIXNAME_,transmissionScatter,_INFONAME_,TransmissionScatterInfos.x)
1298
+ #include<samplerVertexImplementation>(_DEFINENAME_,TRANSMISSION_DISPERSION_SCALE,_VARYINGNAME_,TransmissionDispersionScale,_MATRIXNAME_,transmissionDispersionScale,_INFONAME_,TransmissionDispersionScaleInfos.x)
1299
+ #include<samplerVertexImplementation>(_DEFINENAME_,SUBSURFACE_WEIGHT,_VARYINGNAME_,SubsurfaceWeight,_MATRIXNAME_,subsurfaceWeight,_INFONAME_,SubsurfaceWeightInfos.x)
1300
+ #include<samplerVertexImplementation>(_DEFINENAME_,SUBSURFACE_COLOR,_VARYINGNAME_,SubsurfaceColor,_MATRIXNAME_,subsurfaceColor,_INFONAME_,SubsurfaceColorInfos.x)
1301
+ #include<samplerVertexImplementation>(_DEFINENAME_,SUBSURFACE_RADIUS_SCALE,_VARYINGNAME_,SubsurfaceRadiusScale,_MATRIXNAME_,subsurfaceRadiusScale,_INFONAME_,SubsurfaceRadiusScaleInfos.x)
1302
+ #include<samplerVertexImplementation>(_DEFINENAME_,COAT_WEIGHT,_VARYINGNAME_,CoatWeight,_MATRIXNAME_,coatWeight,_INFONAME_,CoatWeightInfos.x)
1303
+ #include<samplerVertexImplementation>(_DEFINENAME_,COAT_COLOR,_VARYINGNAME_,CoatColor,_MATRIXNAME_,coatColor,_INFONAME_,CoatColorInfos.x)
1304
+ #include<samplerVertexImplementation>(_DEFINENAME_,COAT_ROUGHNESS,_VARYINGNAME_,CoatRoughness,_MATRIXNAME_,coatRoughness,_INFONAME_,CoatRoughnessInfos.x)
1305
+ #include<samplerVertexImplementation>(_DEFINENAME_,COAT_ROUGHNESS_ANISOTROPY,_VARYINGNAME_,CoatRoughnessAnisotropy,_MATRIXNAME_,coatRoughnessAnisotropy,_INFONAME_,CoatRoughnessAnisotropyInfos.x)
1306
+ #include<samplerVertexImplementation>(_DEFINENAME_,COAT_DARKENING,_VARYINGNAME_,CoatDarkening,_MATRIXNAME_,coatDarkening,_INFONAME_,CoatDarkeningInfos.x)
1307
+ #include<samplerVertexImplementation>(_DEFINENAME_,FUZZ_WEIGHT,_VARYINGNAME_,FuzzWeight,_MATRIXNAME_,fuzzWeight,_INFONAME_,FuzzWeightInfos.x)
1308
+ #include<samplerVertexImplementation>(_DEFINENAME_,FUZZ_COLOR,_VARYINGNAME_,FuzzColor,_MATRIXNAME_,fuzzColor,_INFONAME_,FuzzColorInfos.x)
1309
+ #include<samplerVertexImplementation>(_DEFINENAME_,FUZZ_ROUGHNESS,_VARYINGNAME_,FuzzRoughness,_MATRIXNAME_,fuzzRoughness,_INFONAME_,FuzzRoughnessInfos.x)
1310
+ #include<samplerVertexImplementation>(_DEFINENAME_,GEOMETRY_NORMAL,_VARYINGNAME_,GeometryNormal,_MATRIXNAME_,geometryNormal,_INFONAME_,GeometryNormalInfos.x)
1311
+ #include<samplerVertexImplementation>(_DEFINENAME_,GEOMETRY_TANGENT,_VARYINGNAME_,GeometryTangent,_MATRIXNAME_,geometryTangent,_INFONAME_,GeometryTangentInfos.x)
1312
+ #include<samplerVertexImplementation>(_DEFINENAME_,GEOMETRY_COAT_NORMAL,_VARYINGNAME_,GeometryCoatNormal,_MATRIXNAME_,geometryCoatNormal,_INFONAME_,GeometryCoatNormalInfos.x)
1313
+ #include<samplerVertexImplementation>(_DEFINENAME_,GEOMETRY_OPACITY,_VARYINGNAME_,GeometryOpacity,_MATRIXNAME_,geometryOpacity,_INFONAME_,GeometryOpacityInfos.x)
1314
+ #include<samplerVertexImplementation>(_DEFINENAME_,GEOMETRY_THICKNESS,_VARYINGNAME_,GeometryThickness,_MATRIXNAME_,geometryThickness,_INFONAME_,GeometryThicknessInfos.x)
1315
+ #include<samplerVertexImplementation>(_DEFINENAME_,EMISSION_COLOR,_VARYINGNAME_,EmissionColor,_MATRIXNAME_,emissionColor,_INFONAME_,EmissionColorInfos.x)
1316
+ #include<samplerVertexImplementation>(_DEFINENAME_,THIN_FILM_WEIGHT,_VARYINGNAME_,ThinFilmWeight,_MATRIXNAME_,thinFilmWeight,_INFONAME_,ThinFilmWeightInfos.x)
1317
+ #include<samplerVertexImplementation>(_DEFINENAME_,THIN_FILM_THICKNESS,_VARYINGNAME_,ThinFilmThickness,_MATRIXNAME_,thinFilmThickness,_INFONAME_,ThinFilmThicknessInfos.x)
1318
+ #include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT_OCCLUSION,_VARYINGNAME_,AmbientOcclusion,_MATRIXNAME_,ambientOcclusion,_INFONAME_,AmbientOcclusionInfos.x)
1319
+ #include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)
1320
+ #include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)
1321
+ #include<openpbrNormalMapVertex>
1322
+ #include<clipPlaneVertex>
1323
+ #include<fogVertex>
1324
+ #include<shadowsVertex>[0..maxSimultaneousLights]
1325
+ #include<vertexColorMixing>
1326
+ #include<logDepthVertex>
1327
+ #define CUSTOM_VERTEX_MAIN_END
1328
+ }`;for(let e of(t.ShaderStore.ShadersStoreWGSL[X]||(t.ShaderStore.ShadersStoreWGSL[X]=z),[r.sceneUboDeclarationWGSL,i.meshUboDeclarationWGSL,n.openpbrUboDeclarationWGSL,a.uvAttributeDeclarationWGSL,f.mainUVVaryingDeclarationWGSL,o.helperFunctionsWGSL,s.pbrBRDFFunctionsWGSL,d.bonesDeclarationWGSL,l.bakedVertexAnimationDeclarationWGSL,c.instancesDeclarationWGSL,u.prePassVertexDeclarationWGSL,v.samplerVertexDeclarationWGSL,m.harmonicsFunctionsWGSL,{name:p,shader:E},_.clipPlaneVertexDeclarationWGSL,I.fogVertexDeclarationWGSL,S.lightVxUboDeclarationWGSL,x.morphTargetsVertexGlobalDeclarationWGSL,N.morphTargetsVertexDeclarationWGSL,T.logDepthDeclarationWGSL,A.vertexPullingDeclarationWGSL,R.vertexPullingVertexWGSL,h.morphTargetsVertexGlobalWGSL,V.morphTargetsVertexWGSL,O.instancesVertexWGSL,M.bonesVertexWGSL,L.bakedVertexAnimationWGSL,g.prePassVertexWGSL,F.uvVariableDeclarationWGSL,U.samplerVertexImplementationWGSL,{name:C,shader:G},D.clipPlaneVertexWGSL,P.fogVertexWGSL,b.shadowsVertexWGSL,y.vertexColorMixingWGSL,W.logDepthVertexWGSL]))t.ShaderStore.IncludesShadersStoreWGSL[e.name]||(t.ShaderStore.IncludesShadersStoreWGSL[e.name]=e.shader);e.s(["openpbrVertexShaderWGSL",0,{name:X,shader:z}],51455)}]);