@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,1342 @@
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}])},66854,e=>{"use strict";var t=e.i(12423);e.i(60106),e.i(50008);let r="pbrUboDeclaration",i=`uniform vAlbedoInfos: vec2f;uniform vBaseWeightInfos: vec2f;uniform vBaseDiffuseRoughnessInfos: vec2f;uniform vAmbientInfos: vec4f;uniform vOpacityInfos: vec2f;uniform vEmissiveInfos: vec2f;uniform vLightmapInfos: vec2f;uniform vReflectivityInfos: vec3f;uniform vMicroSurfaceSamplerInfos: vec2f;uniform vBumpInfos: vec3f;uniform albedoMatrix: mat4x4f;uniform baseWeightMatrix: mat4x4f;uniform baseDiffuseRoughnessMatrix: mat4x4f;uniform ambientMatrix: mat4x4f;uniform opacityMatrix: mat4x4f;uniform emissiveMatrix: mat4x4f;uniform lightmapMatrix: mat4x4f;uniform reflectivityMatrix: mat4x4f;uniform microSurfaceSamplerMatrix: mat4x4f;uniform bumpMatrix: mat4x4f;uniform vTangentSpaceParams: vec2f;uniform vAlbedoColor: vec4f;uniform baseWeight: f32;uniform baseDiffuseRoughness: f32;uniform vLightingIntensity: vec4f;uniform pointSize: f32;uniform vReflectivityColor: vec4f;uniform vEmissiveColor: vec3f;uniform vAmbientColor: vec3f;uniform vDebugMode: vec2f;uniform vMetallicReflectanceFactors: vec4f;uniform vMetallicReflectanceInfos: vec2f;uniform metallicReflectanceMatrix: mat4x4f;uniform vReflectanceInfos: vec2f;uniform reflectanceMatrix: mat4x4f;uniform cameraInfo: vec4f;uniform vTextureRepetitionHexTilingParams: vec4f;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;
294
+ #define ADDITIONAL_UBO_DECLARATION
295
+ #include<sceneUboDeclaration>
296
+ #include<meshUboDeclaration>
297
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["pbrUboDeclarationWGSL",0,{name:r,shader:i}])},45329,35011,e=>{"use strict";var t=e.i(12423);let r="bonesDeclaration",i=`#if NUM_BONE_INFLUENCERS>0
298
+ #ifndef USE_VERTEX_PULLING
299
+ attribute matricesIndices : vec4f;attribute matricesWeights : vec4f;
300
+ #if NUM_BONE_INFLUENCERS>4
301
+ attribute matricesIndicesExtra : vec4f;attribute matricesWeightsExtra : vec4f;
302
+ #endif
303
+ #endif
304
+ #ifndef BAKED_VERTEX_ANIMATION_TEXTURE
305
+ #ifdef BONETEXTURE
306
+ var boneSampler : texture_2d<f32>;uniform boneTextureInfo : vec2f;
307
+ #else
308
+ uniform mBones : array<mat4x4f,BonesPerMesh>;
309
+ #endif
310
+ #ifdef BONES_VELOCITY_ENABLED
311
+ uniform mPreviousBones : array<mat4x4f,BonesPerMesh>;
312
+ #endif
313
+ #ifdef BONETEXTURE
314
+ fn readMatrixFromRawSampler(smp : texture_2d<f32>,index : f32)->mat4x4f
315
+ {let offset=i32(index)*4;
316
+ 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);}
317
+ #endif
318
+ #endif
319
+ #endif
320
+ `;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
321
+ uniform bakedVertexAnimationTime: f32;uniform bakedVertexAnimationSettings: vec4<f32>;var bakedVertexAnimationTexture : texture_2d<f32>;
322
+ #ifdef INSTANCES
323
+ attribute bakedVertexAnimationSettingsInstanced : vec4<f32>;
324
+ #endif
325
+ fn readMatrixFromRawSamplerVAT(smp : texture_2d<f32>,index : f32,frame : f32)->mat4x4<f32>
326
+ {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);}
327
+ #endif
328
+ `;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
329
+ attribute world0 : vec4<f32>;attribute world1 : vec4<f32>;attribute world2 : vec4<f32>;attribute world3 : vec4<f32>;
330
+ #ifdef INSTANCESCOLOR
331
+ attribute instanceColor : vec4<f32>;
332
+ #endif
333
+ #if defined(THIN_INSTANCES) && !defined(WORLD_UBO)
334
+ uniform world : mat4x4<f32>;
335
+ #endif
336
+ #if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
337
+ attribute previousWorld0 : vec4<f32>;attribute previousWorld1 : vec4<f32>;attribute previousWorld2 : vec4<f32>;attribute previousWorld3 : vec4<f32>;
338
+ #ifdef THIN_INSTANCES
339
+ uniform previousWorld : mat4x4<f32>;
340
+ #endif
341
+ #endif
342
+ #else
343
+ #if !defined(WORLD_UBO)
344
+ uniform world : mat4x4<f32>;
345
+ #endif
346
+ #if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
347
+ uniform previousWorld : mat4x4<f32>;
348
+ #endif
349
+ #endif
350
+ `;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
351
+ uniform vClipPlane: vec4<f32>;varying fClipDistance: f32;
352
+ #endif
353
+ #ifdef CLIPPLANE2
354
+ uniform vClipPlane2: vec4<f32>;varying fClipDistance2: f32;
355
+ #endif
356
+ #ifdef CLIPPLANE3
357
+ uniform vClipPlane3: vec4<f32>;varying fClipDistance3: f32;
358
+ #endif
359
+ #ifdef CLIPPLANE4
360
+ uniform vClipPlane4: vec4<f32>;varying fClipDistance4: f32;
361
+ #endif
362
+ #ifdef CLIPPLANE5
363
+ uniform vClipPlane5: vec4<f32>;varying fClipDistance5: f32;
364
+ #endif
365
+ #ifdef CLIPPLANE6
366
+ uniform vClipPlane6: vec4<f32>;varying fClipDistance6: f32;
367
+ #endif
368
+ `;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
369
+ var finalWorld=mat4x4<f32>(vertexInputs.world0,vertexInputs.world1,vertexInputs.world2,vertexInputs.world3);
370
+ #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
371
+ var finalPreviousWorld=mat4x4<f32>(
372
+ vertexInputs.previousWorld0,vertexInputs.previousWorld1,
373
+ vertexInputs.previousWorld2,vertexInputs.previousWorld3);
374
+ #endif
375
+ #ifdef THIN_INSTANCES
376
+ #if !defined(WORLD_UBO)
377
+ finalWorld=uniforms.world*finalWorld;
378
+ #else
379
+ finalWorld=mesh.world*finalWorld;
380
+ #endif
381
+ #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
382
+ finalPreviousWorld=uniforms.previousWorld*finalPreviousWorld;
383
+ #endif
384
+ #endif
385
+ #else
386
+ #if !defined(WORLD_UBO)
387
+ var finalWorld=uniforms.world;
388
+ #else
389
+ var finalWorld=mesh.world;
390
+ #endif
391
+ #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
392
+ var finalPreviousWorld=uniforms.previousWorld;
393
+ #endif
394
+ #endif
395
+ `;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
396
+ #if NUM_BONE_INFLUENCERS>0
397
+ var influence : mat4x4<f32>;
398
+ #ifdef BONETEXTURE
399
+ influence=readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[0])*vertexInputs.matricesWeights[0];
400
+ #if NUM_BONE_INFLUENCERS>1
401
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[1])*vertexInputs.matricesWeights[1];
402
+ #endif
403
+ #if NUM_BONE_INFLUENCERS>2
404
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[2])*vertexInputs.matricesWeights[2];
405
+ #endif
406
+ #if NUM_BONE_INFLUENCERS>3
407
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[3])*vertexInputs.matricesWeights[3];
408
+ #endif
409
+ #if NUM_BONE_INFLUENCERS>4
410
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[0])*vertexInputs.matricesWeightsExtra[0];
411
+ #endif
412
+ #if NUM_BONE_INFLUENCERS>5
413
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[1])*vertexInputs.matricesWeightsExtra[1];
414
+ #endif
415
+ #if NUM_BONE_INFLUENCERS>6
416
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[2])*vertexInputs.matricesWeightsExtra[2];
417
+ #endif
418
+ #if NUM_BONE_INFLUENCERS>7
419
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[3])*vertexInputs.matricesWeightsExtra[3];
420
+ #endif
421
+ #else
422
+ influence=uniforms.mBones[i32(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];
423
+ #if NUM_BONE_INFLUENCERS>1
424
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];
425
+ #endif
426
+ #if NUM_BONE_INFLUENCERS>2
427
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];
428
+ #endif
429
+ #if NUM_BONE_INFLUENCERS>3
430
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];
431
+ #endif
432
+ #if NUM_BONE_INFLUENCERS>4
433
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];
434
+ #endif
435
+ #if NUM_BONE_INFLUENCERS>5
436
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];
437
+ #endif
438
+ #if NUM_BONE_INFLUENCERS>6
439
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];
440
+ #endif
441
+ #if NUM_BONE_INFLUENCERS>7
442
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];
443
+ #endif
444
+ #endif
445
+ finalWorld=finalWorld*influence;
446
+ #endif
447
+ #endif
448
+ `;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
449
+ {
450
+ #ifdef INSTANCES
451
+ let VATStartFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.x;let VATEndFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.y;let VATOffsetFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.z;let VATSpeed: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.w;
452
+ #else
453
+ let VATStartFrame: f32=uniforms.bakedVertexAnimationSettings.x;let VATEndFrame: f32=uniforms.bakedVertexAnimationSettings.y;let VATOffsetFrame: f32=uniforms.bakedVertexAnimationSettings.z;let VATSpeed: f32=uniforms.bakedVertexAnimationSettings.w;
454
+ #endif
455
+ 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];
456
+ #if NUM_BONE_INFLUENCERS>1
457
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[1],VATFrameNum)*vertexInputs.matricesWeights[1];
458
+ #endif
459
+ #if NUM_BONE_INFLUENCERS>2
460
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[2],VATFrameNum)*vertexInputs.matricesWeights[2];
461
+ #endif
462
+ #if NUM_BONE_INFLUENCERS>3
463
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[3],VATFrameNum)*vertexInputs.matricesWeights[3];
464
+ #endif
465
+ #if NUM_BONE_INFLUENCERS>4
466
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[0],VATFrameNum)*vertexInputs.matricesWeightsExtra[0];
467
+ #endif
468
+ #if NUM_BONE_INFLUENCERS>5
469
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[1],VATFrameNum)*vertexInputs.matricesWeightsExtra[1];
470
+ #endif
471
+ #if NUM_BONE_INFLUENCERS>6
472
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[2],VATFrameNum)*vertexInputs.matricesWeightsExtra[2];
473
+ #endif
474
+ #if NUM_BONE_INFLUENCERS>7
475
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[3],VATFrameNum)*vertexInputs.matricesWeightsExtra[3];
476
+ #endif
477
+ finalWorld=finalWorld*VATInfluence;}
478
+ #endif
479
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["bakedVertexAnimationWGSL",0,{name:f,shader:o}],35845);let d="clipPlaneVertex",s=`#ifdef CLIPPLANE
480
+ vertexOutputs.fClipDistance=dot(worldPos,uniforms.vClipPlane);
481
+ #endif
482
+ #ifdef CLIPPLANE2
483
+ vertexOutputs.fClipDistance2=dot(worldPos,uniforms.vClipPlane2);
484
+ #endif
485
+ #ifdef CLIPPLANE3
486
+ vertexOutputs.fClipDistance3=dot(worldPos,uniforms.vClipPlane3);
487
+ #endif
488
+ #ifdef CLIPPLANE4
489
+ vertexOutputs.fClipDistance4=dot(worldPos,uniforms.vClipPlane4);
490
+ #endif
491
+ #ifdef CLIPPLANE5
492
+ vertexOutputs.fClipDistance5=dot(worldPos,uniforms.vClipPlane5);
493
+ #endif
494
+ #ifdef CLIPPLANE6
495
+ vertexOutputs.fClipDistance6=dot(worldPos,uniforms.vClipPlane6);
496
+ #endif
497
+ `;t.ShaderStore.IncludesShadersStoreWGSL[d]||(t.ShaderStore.IncludesShadersStoreWGSL[d]=s),e.s(["clipPlaneVertexWGSL",0,{name:d,shader:s}],3878)},75234,42893,8154,e=>{"use strict";var t=e.i(12423);let r="fogVertexDeclaration",i=`#ifdef FOG
498
+ varying vFogDistance: vec3f;
499
+ #endif
500
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["fogVertexDeclarationWGSL",0,{name:r,shader:i}],75234);let n="fogVertex",a=`#ifdef FOG
501
+ #ifdef SCENE_UBO
502
+ vertexOutputs.vFogDistance=(scene.view*worldPos).xyz;
503
+ #else
504
+ vertexOutputs.vFogDistance=(uniforms.view*worldPos).xyz;
505
+ #endif
506
+ #endif
507
+ `;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)
508
+ vertexOutputs.vColor=vec4f(1.0);
509
+ #ifdef VERTEXCOLOR
510
+ #ifdef VERTEXALPHA
511
+ vertexOutputs.vColor*=colorUpdated;
512
+ #else
513
+ vertexOutputs.vColor=vec4f(vertexOutputs.vColor.rgb*colorUpdated.rgb,vertexOutputs.vColor.a);
514
+ #endif
515
+ #endif
516
+ #ifdef INSTANCESCOLOR
517
+ vertexOutputs.vColor*=vertexInputs.instanceColor;
518
+ #endif
519
+ #endif
520
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["vertexColorMixingWGSL",0,{name:f,shader:o}],8154)},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)
521
+ attribute uv{X}: vec2f;
522
+ #endif
523
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["uvAttributeDeclarationWGSL",0,{name:r,shader:i}],71822);let n="prePassVertexDeclaration",a=`#ifdef PREPASS
524
+ #ifdef PREPASS_LOCAL_POSITION
525
+ varying vPosition : vec3f;
526
+ #endif
527
+ #ifdef PREPASS_DEPTH
528
+ varying vViewPos: vec3f;
529
+ #endif
530
+ #ifdef PREPASS_NORMALIZED_VIEW_DEPTH
531
+ varying vNormViewDepth: f32;
532
+ #endif
533
+ #if defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)
534
+ uniform previousViewProjection: mat4x4f;varying vCurrentPosition: vec4f;varying vPreviousPosition: vec4f;
535
+ #endif
536
+ #endif
537
+ `;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
538
+ varying v_VARYINGNAME_UV: vec2f;
539
+ #endif
540
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["samplerVertexDeclarationWGSL",0,{name:f,shader:o}],19376);let d="lightVxUboDeclaration",s=`#ifdef LIGHT{X}
541
+ struct Light{X}
542
+ {vLightData: vec4f,
543
+ vLightDiffuse: vec4f,
544
+ vLightSpecular: vec4f,
545
+ #ifdef SPOTLIGHT{X}
546
+ vLightDirection: vec4f,
547
+ vLightFalloff: vec4f,
548
+ #elif defined(POINTLIGHT{X})
549
+ vLightFalloff: vec4f,
550
+ #elif defined(HEMILIGHT{X})
551
+ vLightGround: vec3f,
552
+ #elif defined(CLUSTLIGHT{X})
553
+ vSliceData: vec2f,
554
+ vSliceRanges: array<vec4f,CLUSTLIGHT_SLICES>,
555
+ #endif
556
+ #if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
557
+ vLightWidth: vec4f,
558
+ vLightHeight: vec4f,
559
+ #endif
560
+ shadowsInfo: vec4f,
561
+ depthValues: vec2f} ;var<uniform> light{X} : Light{X};
562
+ #ifdef SHADOW{X}
563
+ #ifdef SHADOWCSM{X}
564
+ 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;
565
+ #elif defined(SHADOWCUBE{X})
566
+ #else
567
+ varying vPositionFromLight{X}: vec4f;varying vDepthMetric{X}: f32;uniform lightMatrix{X}: mat4x4f;
568
+ #endif
569
+ #endif
570
+ #endif
571
+ `;t.ShaderStore.IncludesShadersStoreWGSL[d]||(t.ShaderStore.IncludesShadersStoreWGSL[d]=s),e.s(["lightVxUboDeclarationWGSL",0,{name:d,shader:s}],90742);let c="vertexPullingDeclaration",l=`#ifdef USE_VERTEX_PULLING
572
+ #ifdef VERTEX_PULLING_USE_INDEX_BUFFER
573
+ var<storage,read> indices : array<u32>;
574
+ #endif
575
+ var<storage,read> position : array<f32>;uniform vp_position_info : vec4f;
576
+ #ifdef NORMAL
577
+ var<storage,read> normal : array<f32>;uniform vp_normal_info : vec4f;
578
+ #endif
579
+ #ifdef TANGENT
580
+ var<storage,read> tangent : array<f32>;uniform vp_tangent_info : vec4f;
581
+ #endif
582
+ #ifdef UV1
583
+ var<storage,read> uv : array<f32>;uniform vp_uv_info : vec4f;
584
+ #define VP_UV1_SUPPORTED
585
+ #endif
586
+ #ifdef UV2
587
+ var<storage,read> uv2 : array<f32>;uniform vp_uv2_info : vec4f;
588
+ #define VP_UV2_SUPPORTED
589
+ #endif
590
+ #ifdef UV3
591
+ var<storage,read> uv3 : array<f32>;uniform vp_uv3_info : vec4f;
592
+ #define VP_UV3_SUPPORTED
593
+ #endif
594
+ #ifdef UV4
595
+ var<storage,read> uv4 : array<f32>;uniform vp_uv4_info : vec4f;
596
+ #define VP_UV4_SUPPORTED
597
+ #endif
598
+ #ifdef UV5
599
+ var<storage,read> uv5 : array<f32>;uniform vp_uv5_info : vec4f;
600
+ #define VP_UV5_SUPPORTED
601
+ #endif
602
+ #ifdef UV6
603
+ var<storage,read> uv6 : array<f32>;uniform vp_uv6_info : vec4f;
604
+ #define VP_UV6_SUPPORTED
605
+ #endif
606
+ #ifdef VERTEXCOLOR
607
+ var<storage,read> color : array<f32>;uniform vp_color_info : vec4f;
608
+ #endif
609
+ #if NUM_BONE_INFLUENCERS>0
610
+ var<storage,read> matricesIndices : array<u32>;var<storage,read> matricesWeights : array<f32>;uniform vp_matricesIndices_info : vec4f;uniform vp_matricesWeights_info : vec4f;
611
+ #if NUM_BONE_INFLUENCERS>4
612
+ var<storage,read> matricesIndicesExtra : array<u32>;var<storage,read> matricesWeightsExtra : array<f32>;uniform vp_matricesIndicesExtra_info : vec4f;uniform vp_matricesWeightsExtra_info : vec4f;
613
+ #endif
614
+ #endif
615
+ fn vp_convertToFloat(word : u32,byteInWord : u32,dataType : u32,normalized : bool)->f32 {switch (dataType) {case 5120u: {
616
+ let shift=byteInWord*8u;let value=(word>>shift) & 0xFFu;let signedValue=f32(i32(value<<24u)>>24u);if (normalized) { return signedValue/127.0; }
617
+ return signedValue;}
618
+ case 5121u: {
619
+ let shift=byteInWord*8u;let value=(word>>shift) & 0xFFu;if (normalized) { return f32(value)/255.0; }
620
+ return f32(value);}
621
+ case 5122u: {
622
+ let shift=(byteInWord & 0xFFFFFFFEu)*8u;let value=(word>>shift) & 0xFFFFu;let signedValue=f32(i32(value<<16u)>>16u);if (normalized) { return signedValue/32767.0; }
623
+ return signedValue;}
624
+ case 5123u: {
625
+ let shift=(byteInWord & 0xFFFFFFFEu)*8u;let value=(word>>shift) & 0xFFFFu;if (normalized) { return f32(value)/65535.0; }
626
+ return f32(value);}
627
+ case 5126u: {
628
+ return bitcast<f32>(word);}
629
+ default: { return 0.0; }}}
630
+ fn vp_componentSize(dataType : u32)->u32 {return select(select(2u,1u,dataType==5120u || dataType==5121u),4u,dataType==5126u);}
631
+ fn vp_readVertexIndex(index : u32)->u32 {
632
+ #ifndef VERTEX_PULLING_USE_INDEX_BUFFER
633
+ return index;
634
+ #else
635
+ #ifdef VERTEX_PULLING_INDEX_BUFFER_32BITS
636
+ return indices[index];
637
+ #else
638
+ let u32_index=index/2u;let bit_offset=(index & 1u)*16u;return (indices[u32_index]>>bit_offset) & 0xFFFFu;
639
+ #endif
640
+ #endif
641
+ }
642
+ fn vp_readPositionValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(position[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
643
+ 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(
644
+ vp_readPositionValue(offset,dataType,normalized),
645
+ vp_readPositionValue(offset+cs,dataType,normalized),
646
+ vp_readPositionValue(offset+cs*2u,dataType,normalized)
647
+ );}
648
+ #ifdef NORMAL
649
+ fn vp_readNormalValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(normal[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
650
+ 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(
651
+ vp_readNormalValue(offset,dataType,normalized),
652
+ vp_readNormalValue(offset+cs,dataType,normalized),
653
+ vp_readNormalValue(offset+cs*2u,dataType,normalized)
654
+ );}
655
+ #endif
656
+ #ifdef TANGENT
657
+ fn vp_readTangentValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(tangent[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
658
+ 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(
659
+ vp_readTangentValue(offset,dataType,normalized),
660
+ vp_readTangentValue(offset+cs,dataType,normalized),
661
+ vp_readTangentValue(offset+cs*2u,dataType,normalized),
662
+ vp_readTangentValue(offset+cs*3u,dataType,normalized)
663
+ );}
664
+ #endif
665
+ #ifdef UV1
666
+ fn vp_readUVValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
667
+ 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(
668
+ vp_readUVValue(offset,dataType,normalized),
669
+ vp_readUVValue(offset+cs,dataType,normalized)
670
+ );}
671
+ #endif
672
+ #ifdef UV2
673
+ fn vp_readUV2Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv2[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
674
+ 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(
675
+ vp_readUV2Value(offset,dataType,normalized),
676
+ vp_readUV2Value(offset+cs,dataType,normalized)
677
+ );}
678
+ #endif
679
+ #ifdef UV3
680
+ fn vp_readUV3Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv3[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
681
+ 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(
682
+ vp_readUV3Value(offset,dataType,normalized),
683
+ vp_readUV3Value(offset+cs,dataType,normalized)
684
+ );}
685
+ #endif
686
+ #ifdef UV4
687
+ fn vp_readUV4Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv4[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
688
+ 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(
689
+ vp_readUV4Value(offset,dataType,normalized),
690
+ vp_readUV4Value(offset+cs,dataType,normalized)
691
+ );}
692
+ #endif
693
+ #ifdef UV5
694
+ fn vp_readUV5Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv5[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
695
+ 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(
696
+ vp_readUV5Value(offset,dataType,normalized),
697
+ vp_readUV5Value(offset+cs,dataType,normalized)
698
+ );}
699
+ #endif
700
+ #ifdef UV6
701
+ fn vp_readUV6Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv6[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
702
+ 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(
703
+ vp_readUV6Value(offset,dataType,normalized),
704
+ vp_readUV6Value(offset+cs,dataType,normalized)
705
+ );}
706
+ #endif
707
+ #ifdef VERTEXCOLOR
708
+ fn vp_readColorValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(color[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
709
+ 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(
710
+ vp_readColorValue(offset,dataType,normalized),
711
+ vp_readColorValue(offset+cs,dataType,normalized),
712
+ vp_readColorValue(offset+cs*2u,dataType,normalized),
713
+ vp_readColorValue(offset+cs*3u,dataType,normalized)
714
+ );}
715
+ #endif
716
+ #if NUM_BONE_INFLUENCERS>0
717
+ fn vp_readMatrixIndexValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(matricesIndices[byteOffset/4u],byteOffset % 4u,dataType,normalized);}
718
+ 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(
719
+ vp_readMatrixIndexValue(offset,dataType,normalized),
720
+ vp_readMatrixIndexValue(offset+cs,dataType,normalized),
721
+ vp_readMatrixIndexValue(offset+cs*2u,dataType,normalized),
722
+ vp_readMatrixIndexValue(offset+cs*3u,dataType,normalized)
723
+ );}
724
+ fn vp_readMatrixWeightValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(matricesWeights[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
725
+ 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(
726
+ vp_readMatrixWeightValue(offset,dataType,normalized),
727
+ vp_readMatrixWeightValue(offset+cs,dataType,normalized),
728
+ vp_readMatrixWeightValue(offset+cs*2u,dataType,normalized),
729
+ vp_readMatrixWeightValue(offset+cs*3u,dataType,normalized)
730
+ );}
731
+ #if NUM_BONE_INFLUENCERS>4
732
+ fn vp_readMatrixIndexExtraValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(matricesIndicesExtra[byteOffset/4u],byteOffset % 4u,dataType,normalized);}
733
+ 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(
734
+ vp_readMatrixIndexExtraValue(offset,dataType,normalized),
735
+ vp_readMatrixIndexExtraValue(offset+cs,dataType,normalized),
736
+ vp_readMatrixIndexExtraValue(offset+cs*2u,dataType,normalized),
737
+ vp_readMatrixIndexExtraValue(offset+cs*3u,dataType,normalized)
738
+ );}
739
+ fn vp_readMatrixWeightExtraValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(matricesWeightsExtra[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
740
+ 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(
741
+ vp_readMatrixWeightExtraValue(offset,dataType,normalized),
742
+ vp_readMatrixWeightExtraValue(offset+cs,dataType,normalized),
743
+ vp_readMatrixWeightExtraValue(offset+cs*2u,dataType,normalized),
744
+ vp_readMatrixWeightExtraValue(offset+cs*3u,dataType,normalized)
745
+ );}
746
+ #endif
747
+ #endif
748
+ #endif
749
+ `;t.ShaderStore.IncludesShadersStoreWGSL[c]||(t.ShaderStore.IncludesShadersStoreWGSL[c]=l),e.s(["vertexPullingDeclarationWGSL",0,{name:c,shader:l}],45012);let v="vertexPullingVertex",u=`#ifdef USE_VERTEX_PULLING
750
+ let vpVertexIndex: u32=vp_readVertexIndex(vertexInputs.vertexIndex);positionUpdated=vp_readPosition(uniforms.vp_position_info,vpVertexIndex);
751
+ #ifdef NORMAL
752
+ normalUpdated=vp_readNormal(uniforms.vp_normal_info,vpVertexIndex);
753
+ #endif
754
+ #ifdef TANGENT
755
+ tangentUpdated=vp_readTangent(uniforms.vp_tangent_info,vpVertexIndex);
756
+ #endif
757
+ #ifdef UV1
758
+ uvUpdated=vp_readUV(uniforms.vp_uv_info,vpVertexIndex);
759
+ #endif
760
+ #ifdef UV2
761
+ uv2Updated=vp_readUV2(uniforms.vp_uv2_info,vpVertexIndex);
762
+ #endif
763
+ #ifdef UV3
764
+ var uv3Updated: vec2f=vp_readUV3(uniforms.vp_uv3_info,vpVertexIndex);
765
+ #endif
766
+ #ifdef UV4
767
+ var uv4Updated: vec2f=vp_readUV4(uniforms.vp_uv4_info,vpVertexIndex);
768
+ #endif
769
+ #ifdef UV5
770
+ var uv5Updated: vec2f=vp_readUV5(uniforms.vp_uv5_info,vpVertexIndex);
771
+ #endif
772
+ #ifdef UV6
773
+ var uv6Updated: vec2f=vp_readUV6(uniforms.vp_uv6_info,vpVertexIndex);
774
+ #endif
775
+ #ifdef VERTEXCOLOR
776
+ colorUpdated=vp_readColor(uniforms.vp_color_info,vpVertexIndex);
777
+ #endif
778
+ #ifdef MORPHTARGETS
779
+ let vp_basePosition: vec3f=positionUpdated;
780
+ #ifdef NORMAL
781
+ let vp_baseNormal: vec3f=normalUpdated;
782
+ #endif
783
+ #ifdef TANGENT
784
+ let vp_baseTangent: vec4f=tangentUpdated;
785
+ #endif
786
+ #ifdef UV1
787
+ let vp_baseUV: vec2f=uvUpdated;
788
+ #endif
789
+ #ifdef UV2
790
+ let vp_baseUV2: vec2f=uv2Updated;
791
+ #endif
792
+ #ifdef VERTEXCOLOR
793
+ let vp_baseColor: vec4f=colorUpdated;
794
+ #endif
795
+ #endif
796
+ #if NUM_BONE_INFLUENCERS>0
797
+ var vp_matricesIndices: vec4f=vp_readBoneIndices(uniforms.vp_matricesIndices_info,vpVertexIndex);var vp_matricesWeights: vec4f=vp_readBoneWeights(uniforms.vp_matricesWeights_info,vpVertexIndex);
798
+ #if NUM_BONE_INFLUENCERS>4
799
+ var vp_matricesIndicesExtra: vec4f=vp_readBoneIndicesExtra(uniforms.vp_matricesIndicesExtra_info,vpVertexIndex);var vp_matricesWeightsExtra: vec4f=vp_readBoneWeightsExtra(uniforms.vp_matricesWeightsExtra_info,vpVertexIndex);
800
+ #endif
801
+ #endif
802
+ #endif
803
+ `;t.ShaderStore.IncludesShadersStoreWGSL[v]||(t.ShaderStore.IncludesShadersStoreWGSL[v]=u),e.s(["vertexPullingVertexWGSL",0,{name:v,shader:u}],20958);let m="prePassVertex",p=`#ifdef PREPASS_DEPTH
804
+ vertexOutputs.vViewPos=(scene.view*worldPos).rgb;
805
+ #endif
806
+ #ifdef PREPASS_NORMALIZED_VIEW_DEPTH
807
+ vertexOutputs.vNormViewDepth=((scene.view*worldPos).z-uniforms.cameraInfo.x)/(uniforms.cameraInfo.y-uniforms.cameraInfo.x);
808
+ #endif
809
+ #ifdef PREPASS_LOCAL_POSITION
810
+ vertexOutputs.vPosition=positionUpdated.xyz;
811
+ #endif
812
+ #if (defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && defined(BONES_VELOCITY_ENABLED)
813
+ vertexOutputs.vCurrentPosition=scene.viewProjection*worldPos;
814
+ #if NUM_BONE_INFLUENCERS>0
815
+ var previousInfluence: mat4x4f;previousInfluence=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];
816
+ #if NUM_BONE_INFLUENCERS>1
817
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];
818
+ #endif
819
+ #if NUM_BONE_INFLUENCERS>2
820
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];
821
+ #endif
822
+ #if NUM_BONE_INFLUENCERS>3
823
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];
824
+ #endif
825
+ #if NUM_BONE_INFLUENCERS>4
826
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];
827
+ #endif
828
+ #if NUM_BONE_INFLUENCERS>5
829
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];
830
+ #endif
831
+ #if NUM_BONE_INFLUENCERS>6
832
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];
833
+ #endif
834
+ #if NUM_BONE_INFLUENCERS>7
835
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];
836
+ #endif
837
+ vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*previousInfluence* vec4f(positionUpdated,1.0);
838
+ #else
839
+ vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld* vec4f(positionUpdated,1.0);
840
+ #endif
841
+ #endif
842
+ `;t.ShaderStore.IncludesShadersStoreWGSL[m]||(t.ShaderStore.IncludesShadersStoreWGSL[m]=p),e.s(["prePassVertexWGSL",0,{name:m,shader:p}],80255);let E="uvVariableDeclaration",_=`#ifdef MAINUV{X}
843
+ #if !defined(UV{X})
844
+ var uv{X}: vec2f=vec2f(0.,0.);
845
+ #elif defined(USE_VERTEX_PULLING)
846
+ var uv{X}: vec2f=uv{X}Updated;
847
+ #else
848
+ var uv{X}: vec2f=vertexInputs.uv{X};
849
+ #endif
850
+ vertexOutputs.vMainUV{X}=uv{X};
851
+ #endif
852
+ `;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
853
+ if (uniforms.v_INFONAME_==0.)
854
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(uvUpdated,1.0,0.0)).xy;}
855
+ #ifdef UV2
856
+ else if (uniforms.v_INFONAME_==1.)
857
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(uv2Updated,1.0,0.0)).xy;}
858
+ #endif
859
+ #ifdef UV3
860
+ else if (uniforms.v_INFONAME_==2.)
861
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv3,1.0,0.0)).xy;}
862
+ #endif
863
+ #ifdef UV4
864
+ else if (uniforms.v_INFONAME_==3.)
865
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv4,1.0,0.0)).xy;}
866
+ #endif
867
+ #ifdef UV5
868
+ else if (uniforms.v_INFONAME_==4.)
869
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv5,1.0,0.0)).xy;}
870
+ #endif
871
+ #ifdef UV6
872
+ else if (uniforms.v_INFONAME_==5.)
873
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv6,1.0,0.0)).xy;}
874
+ #endif
875
+ #endif
876
+ `;t.ShaderStore.IncludesShadersStoreWGSL[I]||(t.ShaderStore.IncludesShadersStoreWGSL[I]=S),e.s(["samplerVertexImplementationWGSL",0,{name:I,shader:S}],86752);let x="shadowsVertex",N=`#ifdef SHADOWS
877
+ #if defined(SHADOWCSM{X})
878
+ #ifdef SCENE_UBO
879
+ vertexOutputs.vPositionFromCamera{X}=scene.view*worldPos;
880
+ #else
881
+ vertexOutputs.vPositionFromCamera{X}=uniforms.view*worldPos;
882
+ #endif
883
+ #if SHADOWCSMNUM_CASCADES{X}>0
884
+ vertexOutputs.vPositionFromLight{X}_0=uniforms.lightMatrix{X}[0]*worldPos;
885
+ #ifdef USE_REVERSE_DEPTHBUFFER
886
+ vertexOutputs.vDepthMetric{X}_0=(-vertexOutputs.vPositionFromLight{X}_0.z+light{X}.depthValues.x)/light{X}.depthValues.y;
887
+ #else
888
+ vertexOutputs.vDepthMetric{X}_0= (vertexOutputs.vPositionFromLight{X}_0.z+light{X}.depthValues.x)/light{X}.depthValues.y;
889
+ #endif
890
+ #endif
891
+ #if SHADOWCSMNUM_CASCADES{X}>1
892
+ vertexOutputs.vPositionFromLight{X}_1=uniforms.lightMatrix{X}[1]*worldPos;
893
+ #ifdef USE_REVERSE_DEPTHBUFFER
894
+ vertexOutputs.vDepthMetric{X}_1=(-vertexOutputs.vPositionFromLight{X}_1.z+light{X}.depthValues.x)/light{X}.depthValues.y;
895
+ #else
896
+ vertexOutputs.vDepthMetric{X}_1= (vertexOutputs.vPositionFromLight{X}_1.z+light{X}.depthValues.x)/light{X}.depthValues.y;
897
+ #endif
898
+ #endif
899
+ #if SHADOWCSMNUM_CASCADES{X}>2
900
+ vertexOutputs.vPositionFromLight{X}_2=uniforms.lightMatrix{X}[2]*worldPos;
901
+ #ifdef USE_REVERSE_DEPTHBUFFER
902
+ vertexOutputs.vDepthMetric{X}_2=(-vertexOutputs.vPositionFromLight{X}_2.z+light{X}.depthValues.x)/light{X}.depthValues.y;
903
+ #else
904
+ vertexOutputs.vDepthMetric{X}_2= (vertexOutputs.vPositionFromLight{X}_2.z+light{X}.depthValues.x)/light{X}.depthValues.y;
905
+ #endif
906
+ #endif
907
+ #if SHADOWCSMNUM_CASCADES{X}>3
908
+ vertexOutputs.vPositionFromLight{X}_3=uniforms.lightMatrix{X}[3]*worldPos;
909
+ #ifdef USE_REVERSE_DEPTHBUFFER
910
+ vertexOutputs.vDepthMetric{X}_3=(-vertexOutputs.vPositionFromLight{X}_3.z+light{X}.depthValues.x)/light{X}.depthValues.y;
911
+ #else
912
+ vertexOutputs.vDepthMetric{X}_3= (vertexOutputs.vPositionFromLight{X}_3.z+light{X}.depthValues.x)/light{X}.depthValues.y;
913
+ #endif
914
+ #endif
915
+ #elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})
916
+ vertexOutputs.vPositionFromLight{X}=uniforms.lightMatrix{X}*worldPos;
917
+ #ifdef USE_REVERSE_DEPTHBUFFER
918
+ vertexOutputs.vDepthMetric{X}=(-vertexOutputs.vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
919
+ #else
920
+ vertexOutputs.vDepthMetric{X}=(vertexOutputs.vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
921
+ #endif
922
+ #endif
923
+ #endif
924
+ `;t.ShaderStore.IncludesShadersStoreWGSL[x]||(t.ShaderStore.IncludesShadersStoreWGSL[x]=N),e.s(["shadowsVertexWGSL",0,{name:x,shader:N}],6275);let T="logDepthVertex",R=`#ifdef LOGARITHMICDEPTH
925
+ vertexOutputs.vFragmentDepth=1.0+vertexOutputs.position.w;vertexOutputs.position.z=log2(max(0.000001,vertexOutputs.vFragmentDepth))*uniforms.logarithmicDepthConstant;
926
+ #endif
927
+ `;t.ShaderStore.IncludesShadersStoreWGSL[T]||(t.ShaderStore.IncludesShadersStoreWGSL[T]=R),e.s(["logDepthVertexWGSL",0,{name:T,shader:R}],47167)},89340,5122,49853,62077,e=>{"use strict";var t=e.i(12423);let r="morphTargetsVertexGlobalDeclaration",i=`#ifdef MORPHTARGETS
928
+ uniform morphTargetInfluences : array<f32,NUM_MORPH_INFLUENCERS>;
929
+ #ifdef MORPHTARGETS_TEXTURE
930
+ 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>
931
+ {
932
+ 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;}
933
+ fn readVector4FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec4<f32>
934
+ {
935
+ let textureWidth: i32=i32(uniforms.morphTargetTextureInfo.y);
936
+ let y: i32=i32(vertexIndex)/textureWidth;let x: i32=i32(vertexIndex) % textureWidth;return textureLoad(morphTargets,vec2i(x,y),i32(uniforms.morphTargetTextureIndices[targetIndex]),0);}
937
+ #endif
938
+ #endif
939
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["morphTargetsVertexGlobalDeclarationWGSL",0,{name:r,shader:i}],89340);let n="morphTargetsVertexDeclaration",a=`#ifdef MORPHTARGETS
940
+ #ifndef MORPHTARGETS_TEXTURE
941
+ #ifdef MORPHTARGETS_POSITION
942
+ attribute position{X} : vec3<f32>;
943
+ #endif
944
+ #ifdef MORPHTARGETS_NORMAL
945
+ attribute normal{X} : vec3<f32>;
946
+ #endif
947
+ #ifdef MORPHTARGETS_TANGENT
948
+ attribute tangent{X} : vec3<f32>;
949
+ #endif
950
+ #ifdef MORPHTARGETS_UV
951
+ attribute uv_{X} : vec2<f32>;
952
+ #endif
953
+ #ifdef MORPHTARGETS_UV2
954
+ attribute uv2_{X} : vec2<f32>;
955
+ #endif
956
+ #ifdef MORPHTARGETS_COLOR
957
+ attribute color{X} : vec4<f32>;
958
+ #endif
959
+ #elif {X}==0
960
+ uniform morphTargetCount: f32;
961
+ #endif
962
+ #endif
963
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["morphTargetsVertexDeclarationWGSL",0,{name:n,shader:a}],5122);let f="morphTargetsVertexGlobal",o=`#ifdef MORPHTARGETS
964
+ #ifdef MORPHTARGETS_TEXTURE
965
+ var vertexID : f32;
966
+ #endif
967
+ #endif
968
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["morphTargetsVertexGlobalWGSL",0,{name:f,shader:o}],49853);let d="morphTargetsVertex",s=`#ifdef MORPHTARGETS
969
+ #ifdef MORPHTARGETS_TEXTURE
970
+ #if {X}==0
971
+ for (var i=0; i<NUM_MORPH_INFLUENCERS; i=i+1) {if (f32(i)>=uniforms.morphTargetCount) {break;}
972
+ #ifdef USE_VERTEX_PULLING
973
+ vertexID=f32(vpVertexIndex)*uniforms.morphTargetTextureInfo.x;
974
+ #else
975
+ vertexID=f32(vertexInputs.vertexIndex)*uniforms.morphTargetTextureInfo.x;
976
+ #endif
977
+ #ifdef MORPHTARGETS_POSITION
978
+ #ifdef USE_VERTEX_PULLING
979
+ positionUpdated=positionUpdated+(readVector3FromRawSampler(i,vertexID)-vp_basePosition)*uniforms.morphTargetInfluences[i];
980
+ #else
981
+ positionUpdated=positionUpdated+(readVector3FromRawSampler(i,vertexID)-vertexInputs.position)*uniforms.morphTargetInfluences[i];
982
+ #endif
983
+ #endif
984
+ #ifdef MORPHTARGETTEXTURE_HASPOSITIONS
985
+ vertexID=vertexID+1.0;
986
+ #endif
987
+ #ifdef MORPHTARGETS_NORMAL
988
+ #ifdef USE_VERTEX_PULLING
989
+ normalUpdated=normalUpdated+(readVector3FromRawSampler(i,vertexID) -vp_baseNormal)*uniforms.morphTargetInfluences[i];
990
+ #else
991
+ normalUpdated=normalUpdated+(readVector3FromRawSampler(i,vertexID) -vertexInputs.normal)*uniforms.morphTargetInfluences[i];
992
+ #endif
993
+ #endif
994
+ #ifdef MORPHTARGETTEXTURE_HASNORMALS
995
+ vertexID=vertexID+1.0;
996
+ #endif
997
+ #ifdef MORPHTARGETS_UV
998
+ #ifdef USE_VERTEX_PULLING
999
+ uvUpdated=uvUpdated+(readVector3FromRawSampler(i,vertexID).xy-vp_baseUV)*uniforms.morphTargetInfluences[i];
1000
+ #else
1001
+ uvUpdated=uvUpdated+(readVector3FromRawSampler(i,vertexID).xy-vertexInputs.uv)*uniforms.morphTargetInfluences[i];
1002
+ #endif
1003
+ #endif
1004
+ #ifdef MORPHTARGETTEXTURE_HASUVS
1005
+ vertexID=vertexID+1.0;
1006
+ #endif
1007
+ #ifdef MORPHTARGETS_TANGENT
1008
+ #ifdef USE_VERTEX_PULLING
1009
+ tangentUpdated=vec4f(tangentUpdated.xyz+(readVector3FromRawSampler(i,vertexID) -vp_baseTangent.xyz)*uniforms.morphTargetInfluences[i],tangentUpdated.a);
1010
+ #else
1011
+ tangentUpdated=vec4f(tangentUpdated.xyz+(readVector3FromRawSampler(i,vertexID) -vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[i],tangentUpdated.a);
1012
+ #endif
1013
+ #endif
1014
+ #ifdef MORPHTARGETTEXTURE_HASTANGENTS
1015
+ vertexID=vertexID+1.0;
1016
+ #endif
1017
+ #ifdef MORPHTARGETS_UV2
1018
+ #ifdef USE_VERTEX_PULLING
1019
+ uv2Updated=uv2Updated+(readVector3FromRawSampler(i,vertexID).xy-vp_baseUV2)*uniforms.morphTargetInfluences[i];
1020
+ #else
1021
+ uv2Updated=uv2Updated+(readVector3FromRawSampler(i,vertexID).xy-vertexInputs.uv2)*uniforms.morphTargetInfluences[i];
1022
+ #endif
1023
+ #endif
1024
+ #ifdef MORPHTARGETS_COLOR
1025
+ #ifdef USE_VERTEX_PULLING
1026
+ colorUpdated=colorUpdated+(readVector4FromRawSampler(i,vertexID)-vp_baseColor)*uniforms.morphTargetInfluences[i];
1027
+ #else
1028
+ colorUpdated=colorUpdated+(readVector4FromRawSampler(i,vertexID)-vertexInputs.color)*uniforms.morphTargetInfluences[i];
1029
+ #endif
1030
+ #endif
1031
+ }
1032
+ #endif
1033
+ #else
1034
+ #ifdef MORPHTARGETS_POSITION
1035
+ #ifdef USE_VERTEX_PULLING
1036
+ positionUpdated=positionUpdated+(vertexInputs.position{X}-vp_basePosition)*uniforms.morphTargetInfluences[{X}];
1037
+ #else
1038
+ positionUpdated=positionUpdated+(vertexInputs.position{X}-vertexInputs.position)*uniforms.morphTargetInfluences[{X}];
1039
+ #endif
1040
+ #endif
1041
+ #ifdef MORPHTARGETS_NORMAL
1042
+ #ifdef USE_VERTEX_PULLING
1043
+ normalUpdated=normalUpdated+(vertexInputs.normal{X}-vp_baseNormal)*uniforms.morphTargetInfluences[{X}];
1044
+ #else
1045
+ normalUpdated=normalUpdated+(vertexInputs.normal{X}-vertexInputs.normal)*uniforms.morphTargetInfluences[{X}];
1046
+ #endif
1047
+ #endif
1048
+ #ifdef MORPHTARGETS_TANGENT
1049
+ #ifdef USE_VERTEX_PULLING
1050
+ tangentUpdated=vec4f(tangentUpdated.xyz+(vertexInputs.tangent{X}-vp_baseTangent.xyz)*uniforms.morphTargetInfluences[{X}],tangentUpdated.a);
1051
+ #else
1052
+ tangentUpdated=vec4f(tangentUpdated.xyz+(vertexInputs.tangent{X}-vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[{X}],tangentUpdated.a);
1053
+ #endif
1054
+ #endif
1055
+ #ifdef MORPHTARGETS_UV
1056
+ #ifdef USE_VERTEX_PULLING
1057
+ uvUpdated=uvUpdated+(vertexInputs.uv_{X}-vp_baseUV)*uniforms.morphTargetInfluences[{X}];
1058
+ #else
1059
+ uvUpdated=uvUpdated+(vertexInputs.uv_{X}-vertexInputs.uv)*uniforms.morphTargetInfluences[{X}];
1060
+ #endif
1061
+ #endif
1062
+ #ifdef MORPHTARGETS_UV2
1063
+ #ifdef USE_VERTEX_PULLING
1064
+ uv2Updated=uv2Updated+(vertexInputs.uv2_{X}-vp_baseUV2)*uniforms.morphTargetInfluences[{X}];
1065
+ #else
1066
+ uv2Updated=uv2Updated+(vertexInputs.uv2_{X}-vertexInputs.uv2)*uniforms.morphTargetInfluences[{X}];
1067
+ #endif
1068
+ #endif
1069
+ #ifdef MORPHTARGETS_COLOR
1070
+ #ifdef USE_VERTEX_PULLING
1071
+ colorUpdated=colorUpdated+(vertexInputs.color{X}-vp_baseColor)*uniforms.morphTargetInfluences[{X}];
1072
+ #else
1073
+ colorUpdated=colorUpdated+(vertexInputs.color{X}-vertexInputs.color)*uniforms.morphTargetInfluences[{X}];
1074
+ #endif
1075
+ #endif
1076
+ #endif
1077
+ #endif
1078
+ `;t.ShaderStore.IncludesShadersStoreWGSL[d]||(t.ShaderStore.IncludesShadersStoreWGSL[d]=s),e.s(["morphTargetsVertexWGSL",0,{name:d,shader:s}],62077)},78916,e=>{"use strict";var t=e.i(12423);let r="bumpVertex",i=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
1079
+ #if defined(TANGENT) && defined(NORMAL)
1080
+ 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];
1081
+ #endif
1082
+ #endif
1083
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["bumpVertexWGSL",0,{name:r,shader:i}])},44925,e=>{"use strict";var t=e.i(12423);let r="bumpVertexDeclaration",i=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
1084
+ #if defined(TANGENT) && defined(NORMAL)
1085
+ varying vTBN0: vec3f;varying vTBN1: vec3f;varying vTBN2: vec3f;
1086
+ #endif
1087
+ #endif
1088
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["bumpVertexDeclarationWGSL",0,{name:r,shader:i}])},41153,e=>{"use strict";var t=e.i(12423),r=e.i(60106),i=e.i(50008),n=e.i(66854),a=e.i(71822),f=e.i(39780),o=e.i(4357),d=e.i(61202),s=e.i(45329),c=e.i(35011),l=e.i(18062),v=e.i(39359),u=e.i(19376),m=e.i(99452),p=e.i(44925),E=e.i(77785),_=e.i(75234),I=e.i(90742),S=e.i(89340),x=e.i(5122),N=e.i(54758),T=e.i(45012),R=e.i(20958),A=e.i(49853),V=e.i(62077),h=e.i(50331),L=e.i(3350),O=e.i(35845),M=e.i(80255),U=e.i(25716),g=e.i(86752),F=e.i(78916),C=e.i(3878),P=e.i(42893),D=e.i(6275),G=e.i(8154),b=e.i(47167);let y="pbrVertexShader",W=`#define PBR_VERTEX_SHADER
1089
+ #include<pbrUboDeclaration>
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_,ALBEDO,_VARYINGNAME_,Albedo)
1115
+ #include<samplerVertexDeclaration>(_DEFINENAME_,BASE_WEIGHT,_VARYINGNAME_,BaseWeight)
1116
+ #include<samplerVertexDeclaration>(_DEFINENAME_,BASE_DIFFUSE_ROUGHNESS,_VARYINGNAME_,BaseDiffuseRoughness)
1117
+ #include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)
1118
+ #include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)
1119
+ #include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)
1120
+ #include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)
1121
+ #include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)
1122
+ #include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity)
1123
+ #include<samplerVertexDeclaration>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler)
1124
+ #include<samplerVertexDeclaration>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance)
1125
+ #include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance)
1126
+ #include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)
1127
+ #include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)
1128
+ #ifdef CLEARCOAT
1129
+ #include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat)
1130
+ #include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness)
1131
+ #include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump)
1132
+ #include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint)
1133
+ #endif
1134
+ #ifdef IRIDESCENCE
1135
+ #include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence)
1136
+ #include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness)
1137
+ #endif
1138
+ #ifdef SHEEN
1139
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen)
1140
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness)
1141
+ #endif
1142
+ #ifdef ANISOTROPIC
1143
+ #include<samplerVertexDeclaration>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy)
1144
+ #endif
1145
+ #ifdef SUBSURFACE
1146
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness)
1147
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity)
1148
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity)
1149
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor)
1150
+ #endif
1151
+ varying vPositionW: vec3f;
1152
+ #if DEBUGMODE>0
1153
+ varying vClipSpacePosition: vec4f;
1154
+ #endif
1155
+ #ifdef NORMAL
1156
+ varying vNormalW: vec3f;
1157
+ #if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)
1158
+ varying vEnvironmentIrradiance: vec3f;
1159
+ #include<harmonicsFunctions>
1160
+ #endif
1161
+ #endif
1162
+ #if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
1163
+ varying vColor: vec4f;
1164
+ #endif
1165
+ #include<bumpVertexDeclaration>
1166
+ #include<clipPlaneVertexDeclaration>
1167
+ #include<fogVertexDeclaration>
1168
+ #include<lightVxUboDeclaration>[0..maxSimultaneousLights]
1169
+ #include<morphTargetsVertexGlobalDeclaration>
1170
+ #include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]
1171
+ #ifdef REFLECTIONMAP_SKYBOX
1172
+ varying vPositionUVW: vec3f;
1173
+ #endif
1174
+ #if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
1175
+ varying vDirectionW: vec3f;
1176
+ #endif
1177
+ #if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0
1178
+ varying vViewDepth: f32;
1179
+ #endif
1180
+ #include<logDepthDeclaration>
1181
+ #include<vertexPullingDeclaration>
1182
+ #define CUSTOM_VERTEX_DEFINITIONS
1183
+ @vertex
1184
+ fn main(input : VertexInputs)->FragmentInputs {
1185
+ #define CUSTOM_VERTEX_MAIN_BEGIN
1186
+ #ifdef USE_VERTEX_PULLING
1187
+ var positionUpdated: vec3f=vec3f(0.0);
1188
+ #ifdef NORMAL
1189
+ var normalUpdated: vec3f=vec3f(0.0);
1190
+ #endif
1191
+ #ifdef TANGENT
1192
+ var tangentUpdated: vec4f=vec4f(0.0);
1193
+ #endif
1194
+ #ifdef UV1
1195
+ var uvUpdated: vec2f=vec2f(0.0);
1196
+ #endif
1197
+ #ifdef UV2
1198
+ var uv2Updated: vec2f=vec2f(0.0);
1199
+ #endif
1200
+ #ifdef VERTEXCOLOR
1201
+ var colorUpdated: vec4f=vec4f(0.0);
1202
+ #endif
1203
+ #else
1204
+ var positionUpdated: vec3f=vertexInputs.position;
1205
+ #ifdef NORMAL
1206
+ var normalUpdated: vec3f=vertexInputs.normal;
1207
+ #endif
1208
+ #ifdef TANGENT
1209
+ var tangentUpdated: vec4f=vertexInputs.tangent;
1210
+ #endif
1211
+ #ifdef UV1
1212
+ var uvUpdated: vec2f=vertexInputs.uv;
1213
+ #endif
1214
+ #ifdef UV2
1215
+ var uv2Updated: vec2f=vertexInputs.uv2;
1216
+ #endif
1217
+ #ifdef VERTEXCOLOR
1218
+ var colorUpdated: vec4f=vertexInputs.color;
1219
+ #endif
1220
+ #endif
1221
+ #include<vertexPullingVertex>
1222
+ #include<morphTargetsVertexGlobal>
1223
+ #include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]
1224
+ #ifdef REFLECTIONMAP_SKYBOX
1225
+ vertexOutputs.vPositionUVW=positionUpdated;
1226
+ #endif
1227
+ #define CUSTOM_VERTEX_UPDATE_POSITION
1228
+ #define CUSTOM_VERTEX_UPDATE_NORMAL
1229
+ #include<instancesVertex>
1230
+ #if defined(PREPASS) && ((defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED)
1231
+ vertexOutputs.vCurrentPosition=scene.viewProjection*finalWorld*vec4f(positionUpdated,1.0);vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*vec4f(positionUpdated,1.0);
1232
+ #endif
1233
+ #ifdef USE_VERTEX_PULLING
1234
+ #include<bonesVertex>(vertexInputs.matricesIndices,vp_matricesIndices,vertexInputs.matricesWeights,vp_matricesWeights,vertexInputs.matricesIndicesExtra,vp_matricesIndicesExtra,vertexInputs.matricesWeightsExtra,vp_matricesWeightsExtra)
1235
+ #include<bakedVertexAnimation>(vertexInputs.matricesIndices,vp_matricesIndices,vertexInputs.matricesWeights,vp_matricesWeights,vertexInputs.matricesIndicesExtra,vp_matricesIndicesExtra,vertexInputs.matricesWeightsExtra,vp_matricesWeightsExtra)
1236
+ #else
1237
+ #include<bonesVertex>
1238
+ #include<bakedVertexAnimation>
1239
+ #endif
1240
+ var worldPos: vec4f=finalWorld* vec4f(positionUpdated,1.0);vertexOutputs.vPositionW= worldPos.xyz;
1241
+ #ifdef PREPASS
1242
+ #include<prePassVertex>
1243
+ #endif
1244
+ #ifdef NORMAL
1245
+ var normalWorld: mat3x3f= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz);
1246
+ #if defined(INSTANCES) && defined(THIN_INSTANCES)
1247
+ 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);
1248
+ #else
1249
+ #ifdef NONUNIFORMSCALING
1250
+ normalWorld=transposeMat3(inverseMat3(normalWorld));
1251
+ #endif
1252
+ vertexOutputs.vNormalW=normalize(normalWorld*normalUpdated);
1253
+ #endif
1254
+ #if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)
1255
+ #if BASE_DIFFUSE_MODEL != BRDF_DIFFUSE_MODEL_LAMBERT && BASE_DIFFUSE_MODEL != BRDF_DIFFUSE_MODEL_LEGACY
1256
+ 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.baseDiffuseRoughness);var reflectionVector: vec3f= (uniforms.reflectionMatrix* vec4f(roughNormal,0)).xyz;
1257
+ #else
1258
+ var reflectionVector: vec3f= (uniforms.reflectionMatrix* vec4f(vertexOutputs.vNormalW,0)).xyz;
1259
+ #endif
1260
+ #ifdef REFLECTIONMAP_OPPOSITEZ
1261
+ reflectionVector.z*=-1.0;
1262
+ #endif
1263
+ vertexOutputs.vEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);
1264
+ #endif
1265
+ #endif
1266
+ #define CUSTOM_VERTEX_UPDATE_WORLDPOS
1267
+ #ifdef MULTIVIEW
1268
+ if (gl_ViewID_OVR==0u) {vertexOutputs.position=scene.viewProjection*worldPos;} else {vertexOutputs.position=scene.viewProjectionR*worldPos;}
1269
+ #else
1270
+ vertexOutputs.position=scene.viewProjection*worldPos;
1271
+ #endif
1272
+ #if DEBUGMODE>0
1273
+ vertexOutputs.vClipSpacePosition=vertexOutputs.position;
1274
+ #endif
1275
+ #if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
1276
+ vertexOutputs.vDirectionW=normalize((finalWorld*vec4f(positionUpdated,0.0)).xyz);
1277
+ #endif
1278
+ #if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0
1279
+ #ifdef RIGHT_HANDED
1280
+ vertexOutputs.vViewDepth=-(scene.view*worldPos).z;
1281
+ #else
1282
+ vertexOutputs.vViewDepth=(scene.view*worldPos).z;
1283
+ #endif
1284
+ #endif
1285
+ #ifndef UV1
1286
+ var uvUpdated: vec2f= vec2f(0.,0.);
1287
+ #endif
1288
+ #ifdef MAINUV1
1289
+ vertexOutputs.vMainUV1=uvUpdated;
1290
+ #endif
1291
+ #ifndef UV2
1292
+ var uv2Updated: vec2f= vec2f(0.,0.);
1293
+ #endif
1294
+ #ifdef MAINUV2
1295
+ vertexOutputs.vMainUV2=uv2Updated;
1296
+ #endif
1297
+ #include<uvVariableDeclaration>[3..7]
1298
+ #include<samplerVertexImplementation>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo,_MATRIXNAME_,albedo,_INFONAME_,AlbedoInfos.x)
1299
+ #include<samplerVertexImplementation>(_DEFINENAME_,BASE_WEIGHT,_VARYINGNAME_,BaseWeight,_MATRIXNAME_,baseWeight,_INFONAME_,BaseWeightInfos.x)
1300
+ #include<samplerVertexImplementation>(_DEFINENAME_,BASE_DIFFUSE_ROUGHNESS,_VARYINGNAME_,BaseDiffuseRoughness,_MATRIXNAME_,baseDiffuseRoughness,_INFONAME_,BaseDiffuseRoughnessInfos.x)
1301
+ #include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)
1302
+ #include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)
1303
+ #include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)
1304
+ #include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)
1305
+ #include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)
1306
+ #include<samplerVertexImplementation>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity,_MATRIXNAME_,reflectivity,_INFONAME_,ReflectivityInfos.x)
1307
+ #include<samplerVertexImplementation>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler,_MATRIXNAME_,microSurfaceSampler,_INFONAME_,MicroSurfaceSamplerInfos.x)
1308
+ #include<samplerVertexImplementation>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance,_MATRIXNAME_,metallicReflectance,_INFONAME_,MetallicReflectanceInfos.x)
1309
+ #include<samplerVertexImplementation>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance,_MATRIXNAME_,reflectance,_INFONAME_,ReflectanceInfos.x)
1310
+ #include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)
1311
+ #include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)
1312
+ #ifdef CLEARCOAT
1313
+ #include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat,_MATRIXNAME_,clearCoat,_INFONAME_,ClearCoatInfos.x)
1314
+ #include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness,_MATRIXNAME_,clearCoatRoughness,_INFONAME_,ClearCoatInfos.z)
1315
+ #include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump,_MATRIXNAME_,clearCoatBump,_INFONAME_,ClearCoatBumpInfos.x)
1316
+ #include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint,_MATRIXNAME_,clearCoatTint,_INFONAME_,ClearCoatTintInfos.x)
1317
+ #endif
1318
+ #ifdef IRIDESCENCE
1319
+ #include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence,_MATRIXNAME_,iridescence,_INFONAME_,IridescenceInfos.x)
1320
+ #include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness,_MATRIXNAME_,iridescenceThickness,_INFONAME_,IridescenceInfos.z)
1321
+ #endif
1322
+ #ifdef SHEEN
1323
+ #include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen,_MATRIXNAME_,sheen,_INFONAME_,SheenInfos.x)
1324
+ #include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness,_MATRIXNAME_,sheenRoughness,_INFONAME_,SheenInfos.z)
1325
+ #endif
1326
+ #ifdef ANISOTROPIC
1327
+ #include<samplerVertexImplementation>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy,_MATRIXNAME_,anisotropy,_INFONAME_,AnisotropyInfos.x)
1328
+ #endif
1329
+ #ifdef SUBSURFACE
1330
+ #include<samplerVertexImplementation>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness,_MATRIXNAME_,thickness,_INFONAME_,ThicknessInfos.x)
1331
+ #include<samplerVertexImplementation>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity,_MATRIXNAME_,refractionIntensity,_INFONAME_,RefractionIntensityInfos.x)
1332
+ #include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity,_MATRIXNAME_,translucencyIntensity,_INFONAME_,TranslucencyIntensityInfos.x)
1333
+ #include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor,_MATRIXNAME_,translucencyColor,_INFONAME_,TranslucencyColorInfos.x)
1334
+ #endif
1335
+ #include<bumpVertex>
1336
+ #include<clipPlaneVertex>
1337
+ #include<fogVertex>
1338
+ #include<shadowsVertex>[0..maxSimultaneousLights]
1339
+ #include<vertexColorMixing>
1340
+ #include<logDepthVertex>
1341
+ #define CUSTOM_VERTEX_MAIN_END
1342
+ }`;for(let e of(t.ShaderStore.ShadersStoreWGSL[y]||(t.ShaderStore.ShadersStoreWGSL[y]=W),[r.sceneUboDeclarationWGSL,i.meshUboDeclarationWGSL,n.pbrUboDeclarationWGSL,a.uvAttributeDeclarationWGSL,f.mainUVVaryingDeclarationWGSL,o.helperFunctionsWGSL,d.pbrBRDFFunctionsWGSL,s.bonesDeclarationWGSL,c.bakedVertexAnimationDeclarationWGSL,l.instancesDeclarationWGSL,v.prePassVertexDeclarationWGSL,u.samplerVertexDeclarationWGSL,m.harmonicsFunctionsWGSL,p.bumpVertexDeclarationWGSL,E.clipPlaneVertexDeclarationWGSL,_.fogVertexDeclarationWGSL,I.lightVxUboDeclarationWGSL,S.morphTargetsVertexGlobalDeclarationWGSL,x.morphTargetsVertexDeclarationWGSL,N.logDepthDeclarationWGSL,T.vertexPullingDeclarationWGSL,R.vertexPullingVertexWGSL,A.morphTargetsVertexGlobalWGSL,V.morphTargetsVertexWGSL,h.instancesVertexWGSL,L.bonesVertexWGSL,O.bakedVertexAnimationWGSL,M.prePassVertexWGSL,U.uvVariableDeclarationWGSL,g.samplerVertexImplementationWGSL,F.bumpVertexWGSL,C.clipPlaneVertexWGSL,P.fogVertexWGSL,D.shadowsVertexWGSL,G.vertexColorMixingWGSL,b.logDepthVertexWGSL]))t.ShaderStore.IncludesShadersStoreWGSL[e.name]||(t.ShaderStore.IncludesShadersStoreWGSL[e.name]=e.shader);e.s(["pbrVertexShaderWGSL",0,{name:y,shader:W}])}]);