2
0
Эх сурвалжийг харах

WebGPU: IES SpotLight Node-Based (#25238)

* Add ies files

* IES SpotLight Node-Based

* Add webgpu ies spotlight example

* fix example name and thumbnail

* cleanup function parameters

* cleanup

* cleanup

* rename example to ies spotlight

* syntax approach updated

* Show LDR optional property

* cleanup
sunag 2 жил өмнө
parent
commit
15b35ad614

+ 1 - 0
examples/files.json

@@ -333,6 +333,7 @@
 		"webgpu_instance_mesh",
 		"webgpu_instance_uniform",
 		"webgpu_lights_custom",
+		"webgpu_lights_ies_spotlight",
 		"webgpu_lights_phong",
 		"webgpu_lights_selective",
 		"webgpu_loader_gltf",

+ 28 - 0
examples/ies/007cfb11e343e2f42e3b476be4ab684e.ies

@@ -0,0 +1,28 @@
+IESNA:LM-63-1995
+[TEST] 
+[MANUFAC] BEGA
+[MORE] Copyright LUMCat V 
+[LUMCAT] 
+[LUMINAIRE] 50975.6K3 (Preliminary)
+[LAMPCAT] LED  7,9W
+[LAMP]     321 lm,9 W
+TILT=NONE
+1 -1 1.0 73 1 1 2 -0.080 0.000 0.000
+1.0 1.0 9
+   0.0   2.5   5.0   7.5  10.0  12.5  15.0  17.5  20.0  22.5  25.0  27.5  30.0
+  32.5  35.0  37.5  40.0  42.5  45.0  47.5  50.0  52.5  55.0  57.5  60.0  62.5
+  65.0  67.5  70.0  72.5  75.0  77.5  80.0  82.5  85.0  87.5  90.0  92.5  95.0
+  97.5 100.0 102.5 105.0 107.5 110.0 112.5 115.0 117.5 120.0 122.5 125.0 127.5
+ 130.0 132.5 135.0 137.5 140.0 142.5 145.0 147.5 150.0 152.5 155.0 157.5 160.0
+ 162.5 165.0 167.5 170.0 172.5 175.0 177.5 180.0
+   0.0
+     330.8     333.2     335.2     336.2     336.8     337.1     337.2     336.7
+     331.4     302.1     238.1     159.9      90.7      51.3      38.9      36.0
+      34.8      34.2      33.5      32.7      31.6      29.3      25.2      19.8
+      15.4      12.3       9.9       8.1       6.4       5.1       3.9       3.0
+       2.1       1.4       0.9       0.4       0.1       0.1       0.1       0.0
+       0.0       0.0       0.0       0.0       0.0       0.0       0.0       0.0
+       0.0       0.0       0.0       0.0       0.0       0.0       0.0       0.0
+       0.0       0.0       0.0       0.0       0.0       0.0       0.0       0.0
+       0.0       0.0       0.0       0.0       0.0       0.0       0.0       0.0
+       0.0

+ 202 - 0
examples/ies/02a7562c650498ebb301153dbbf59207.ies

@@ -0,0 +1,202 @@
+IESNA:LM-63-1995
+[TEST] 
+[MANUFAC] BEGA
+[MORE] Copyright LUMCat V 
+[LUMCAT] 
+[LUMINAIRE] 84659K4 (Preliminary)
+[LAMPCAT] LED  62W
+[LAMP]    9600 lm,68 W
+TILT=NONE
+1 -1 1.0 37 37 1 2 0.240 0.270 0.000
+1.0 1.0 68
+   0.0   2.5   5.0   7.5  10.0  12.5  15.0  17.5  20.0  22.5  25.0  27.5  30.0
+  32.5  35.0  37.5  40.0  42.5  45.0  47.5  50.0  52.5  55.0  57.5  60.0  62.5
+  65.0  67.5  70.0  72.5  75.0  77.5  80.0  82.5  85.0  87.5  90.0
+  90.0  95.0 100.0 105.0 110.0 115.0 120.0 125.0 130.0 135.0 140.0 145.0 150.0
+ 155.0 160.0 165.0 170.0 175.0 180.0 185.0 190.0 195.0 200.0 205.0 210.0 215.0
+ 220.0 225.0 230.0 235.0 240.0 245.0 250.0 255.0 260.0 265.0 270.0
+    1739.8    1748.5    1754.2    1758.7    1775.5    1813.8    1888.7    2057.8
+    2268.7    2530.0    2653.0    2727.6    2847.9    2943.6    3012.0    3010.7
+    2925.3    2695.3    2336.5    1929.2    1501.3    1136.6     808.5     532.9
+     280.7     122.6      64.3      37.0      26.4      18.3      12.9       8.2
+       5.1       2.4       0.3       0.0       0.0
+    1739.8    1748.6    1755.1    1761.4    1779.4    1810.3    1897.9    2049.0
+    2262.6    2522.0    2673.8    2761.2    2883.7    2983.2    3028.5    3050.3
+    2988.3    2746.1    2362.9    1967.1    1541.8    1172.7     839.4     558.2
+     309.8     141.1      80.4      50.8      35.6      24.5      16.9      10.8
+       7.1       4.0       1.2       0.0       0.0
+    1739.8    1749.1    1757.4    1767.4    1785.7    1823.3    1899.7    2048.4
+    2256.2    2498.9    2694.0    2773.9    2844.4    2922.8    2988.7    3031.0
+    3027.4    2881.6    2567.2    2188.7    1761.0    1375.4    1018.7     699.3
+     400.3     196.2     113.3      71.3      47.6      32.5      22.1      14.8
+       9.7       5.2       2.1       0.1       0.0
+    1739.8    1749.8    1760.2    1773.9    1795.1    1832.1    1900.1    2045.2
+    2239.3    2482.5    2660.9    2744.7    2861.5    3034.0    3184.8    3305.3
+    3327.2    3210.1    2878.7    2442.9    1979.1    1517.9    1151.7     808.6
+     498.3     261.5     152.9      99.1      66.3      42.9      26.9      18.1
+      11.5       6.5       2.5       0.0       0.0
+    1739.8    1750.6    1763.0    1780.3    1803.0    1833.0    1894.3    2008.2
+    2199.0    2444.7    2696.9    2888.1    3087.5    3267.2    3389.1    3432.1
+    3418.0    3298.7    3024.6    2609.8    2146.7    1683.6    1305.7     944.7
+     626.2     363.9     214.5     137.1      87.4      54.7      34.9      23.2
+      15.2       8.4       2.5       0.0       0.0
+    1739.8    1751.6    1766.6    1786.2    1806.4    1826.5    1860.2    1973.2
+    2177.0    2478.9    2808.4    3035.9    3161.6    3281.4    3384.3    3448.8
+    3438.0    3361.0    3159.2    2800.0    2365.0    1909.0    1518.8    1156.2
+     839.7     537.7     333.0     229.1     153.9      98.5      60.9      38.2
+      22.2      10.8       3.6       0.0       0.0
+    1739.8    1752.7    1771.7    1792.3    1802.7    1808.7    1832.9    1970.3
+    2231.9    2557.8    2848.8    3046.8    3145.9    3246.5    3374.8    3453.3
+    3465.7    3410.5    3291.8    3011.3    2624.9    2203.5    1792.9    1450.0
+    1136.5     840.7     606.6     481.8     364.3     246.9     150.7      88.9
+      48.1      22.0       6.9       0.3       0.0
+    1739.8    1753.8    1777.0    1796.5    1794.8    1791.9    1841.4    2021.7
+    2280.7    2542.2    2771.2    2975.5    3121.1    3248.2    3391.1    3511.0
+    3531.5    3484.4    3392.6    3203.7    2913.7    2548.4    2163.0    1821.9
+    1540.7    1327.8    1160.0    1022.5     800.9     563.3     370.4     228.6
+     125.4      51.8      15.1       1.2       0.1
+    1739.8    1754.8    1781.0    1795.7    1781.8    1792.6    1886.5    2075.7
+    2261.2    2450.6    2649.5    2876.7    3093.7    3285.2    3444.9    3600.0
+    3677.9    3661.2    3584.7    3460.9    3265.7    2991.9    2661.8    2352.5
+    2166.2    2101.0    2042.7    1810.4    1435.5    1092.7     774.0     501.6
+     276.8     103.1      26.9       2.6       0.0
+    1739.8    1755.4    1782.8    1790.5    1772.5    1813.9    1953.0    2096.5
+    2208.0    2334.6    2514.0    2750.9    3033.0    3305.6    3497.4    3638.5
+    3780.3    3871.8    3869.9    3803.3    3693.5    3534.0    3313.6    3128.5
+    3083.1    3162.1    3100.2    2758.2    2262.6    1809.0    1341.3     899.8
+     500.0     187.6      46.7       4.3       0.0
+    1739.8    1755.7    1782.8    1783.3    1768.3    1848.9    2006.2    2097.5
+    2154.6    2236.7    2392.4    2608.1    2899.4    3231.2    3514.3    3713.1
+    3856.4    3983.7    4070.7    4087.8    4080.7    4098.0    4077.7    4091.0
+    4192.6    4272.4    4144.6    3754.2    3197.0    2607.4    2005.6    1386.9
+     778.1     293.9      79.5       7.5       0.0
+    1739.8    1755.4    1782.2    1774.3    1772.9    1890.9    2037.3    2090.6
+    2116.9    2172.1    2286.5    2481.7    2751.7    3076.9    3413.4    3703.8
+    3904.5    4053.3    4183.4    4293.1    4376.2    4499.1    4733.8    5032.2
+    5271.9    5261.5    5017.0    4611.3    4064.9    3373.1    2651.0    1878.4
+    1053.3     386.3     107.3      13.3       0.0
+    1739.8    1754.8    1781.2    1763.5    1782.8    1925.4    2052.3    2085.7
+    2109.9    2148.2    2230.5    2373.6    2592.0    2872.4    3193.1    3524.8
+    3813.4    4054.3    4243.0    4393.5    4537.7    4758.7    5191.2    5738.1
+    6099.8    6004.9    5742.4    5359.5    4807.0    4117.3    3298.1    2376.1
+    1374.9     499.6     137.2      19.0       0.1
+    1739.8    1754.2    1779.0    1753.3    1795.5    1954.6    2057.7    2081.8
+    2106.0    2140.8    2198.8    2293.9    2431.6    2638.7    2872.8    3146.3
+    3442.6    3729.7    4009.0    4277.9    4534.4    4841.2    5334.3    5971.2
+    6458.4    6427.8    6214.9    5945.5    5405.8    4726.0    3924.8    2910.2
+    1731.6     647.9     172.7      24.4       0.2
+    1739.8    1753.7    1775.5    1747.2    1811.0    1975.6    2058.3    2078.1
+    2100.7    2143.1    2192.8    2252.8    2332.3    2443.4    2578.3    2735.2
+    2900.4    3095.8    3322.8    3611.9    3979.1    4473.8    5057.7    5592.9
+    6039.2    6254.0    6274.6    6086.8    5637.3    5050.5    4315.5    3337.6
+    2052.6     777.2     188.6      27.0       0.1
+    1739.8    1753.5    1772.1    1743.4    1825.3    1988.7    2055.7    2075.2
+    2104.0    2147.1    2182.2    2230.3    2278.6    2338.0    2407.8    2488.4
+    2561.1    2649.0    2758.2    2933.2    3221.1    3689.9    4315.9    4887.8
+    5217.3    5403.3    5578.3    5593.9    5285.6    4859.4    4234.2    3286.5
+    2092.1     833.6     192.9      25.7       0.1
+    1739.8    1753.4    1770.3    1741.1    1834.5    1998.4    2060.2    2074.5
+    2102.5    2137.9    2177.5    2212.0    2239.4    2273.8    2324.5    2374.0
+    2422.9    2478.7    2555.6    2672.0    2890.8    3264.9    3773.6    4189.1
+    4395.8    4538.9    4636.8    4609.0    4417.1    4064.6    3531.1    2726.5
+    1743.9     712.5     163.7      22.3       0.0
+    1739.8    1753.2    1769.9    1740.7    1844.3    2003.6    2059.3    2074.3
+    2101.9    2140.5    2174.2    2200.8    2225.4    2242.9    2274.6    2316.0
+    2375.6    2439.1    2522.0    2651.4    2890.5    3269.0    3713.2    4051.6
+    4168.6    4152.3    4098.0    3932.4    3645.8    3237.7    2704.4    2024.6
+    1266.2     505.7     118.2      17.2       0.2
+    1739.8    1752.7    1768.9    1739.4    1848.0    2005.0    2057.8    2076.1
+    2105.3    2138.8    2172.1    2193.3    2208.4    2232.2    2264.7    2306.5
+    2370.7    2456.0    2566.0    2716.8    2996.1    3411.2    3879.6    4247.8
+    4401.7    4315.5    4107.0    3814.8    3470.1    3017.1    2489.7    1881.1
+    1180.9     457.8     104.1      14.4       0.2
+    1739.8    1751.9    1766.5    1736.6    1841.4    1999.8    2051.3    2064.5
+    2091.3    2125.1    2159.2    2184.1    2191.0    2207.5    2233.7    2281.7
+    2347.3    2428.6    2529.8    2693.0    2968.7    3391.4    3882.6    4271.4
+    4468.1    4373.3    4162.7    3880.4    3514.7    2965.6    2326.5    1745.4
+    1081.3     418.7      96.3      13.4       1.0
+    1739.8    1750.6    1763.4    1733.9    1826.0    1984.8    2039.0    2046.3
+    2062.0    2088.3    2113.7    2133.3    2141.8    2161.8    2185.5    2224.5
+    2273.4    2341.5    2413.9    2555.7    2779.9    3119.7    3534.7    3883.8
+    4018.8    3886.8    3657.9    3358.8    2911.8    2312.5    1679.0    1171.2
+     650.0     219.8      51.6       7.1       0.1
+    1739.8    1748.8    1761.1    1728.9    1802.9    1961.8    2019.1    2024.3
+    2035.5    2051.2    2063.9    2066.3    2069.3    2082.4    2104.1    2127.4
+    2161.4    2207.3    2257.9    2335.9    2458.5    2688.2    2954.9    3149.0
+    3185.9    2991.3    2712.6    2412.9    1981.8    1449.2     948.1     615.6
+     320.2      97.1      23.3       3.3       0.2
+    1739.8    1746.5    1759.4    1723.6    1777.0    1932.0    1998.8    1995.7
+    1994.2    2001.1    2002.5    1998.9    1987.0    1981.7    1985.9    1995.0
+    1999.0    1996.4    1977.9    1933.3    1936.8    2021.7    2181.6    2300.9
+    2256.1    2053.8    1778.0    1471.1    1135.3     799.3     514.5     323.3
+     164.0      54.3      15.1       1.6       0.1
+    1739.8    1744.0    1757.0    1721.8    1748.6    1894.2    1976.7    1971.4
+    1956.9    1944.0    1936.1    1924.3    1898.2    1872.1    1842.7    1794.3
+    1718.2    1646.3    1576.3    1483.8    1417.8    1401.1    1440.9    1460.8
+    1416.0    1272.8    1065.0     836.9     632.9     445.5     286.8     178.6
+      94.5      37.6      12.6       1.2       0.3
+    1739.8    1741.7    1753.4    1722.7    1722.0    1842.1    1944.5    1941.7
+    1918.0    1891.7    1868.5    1851.0    1816.6    1752.6    1640.2    1519.0
+    1434.8    1324.8    1200.9    1070.9     944.0     869.6     846.3     831.3
+     790.4     737.8     618.3     463.7     343.7     247.9     165.4     107.8
+      60.6      28.2      10.6       1.1       0.1
+    1739.8    1739.8    1748.9    1724.2    1698.3    1788.1    1901.0    1907.5
+    1882.0    1856.4    1822.8    1785.5    1710.2    1563.1    1442.7    1331.9
+    1185.6    1054.8     883.0     738.7     614.5     520.0     465.7     457.4
+     447.6     406.0     346.2     275.1     205.1     152.5     114.7      80.8
+      48.6      23.4       9.0       1.0       0.0
+    1739.8    1738.1    1743.9    1725.3    1681.1    1728.5    1845.0    1873.7
+    1849.8    1813.1    1773.9    1679.5    1531.6    1417.5    1288.7    1126.7
+     980.5     804.6     659.8     523.7     411.4     329.1     333.5     349.1
+     341.6     296.6     255.7     218.4     169.0     130.9     111.9      85.7
+      54.1      24.0       7.9       0.6       0.4
+    1739.8    1736.4    1738.6    1726.7    1675.0    1674.9    1765.5    1832.5
+    1821.7    1779.7    1679.0    1525.9    1406.7    1277.8    1119.9     973.6
+     776.8     629.6     489.6     373.0     292.8     297.0     338.4     373.3
+     360.6     319.8     289.8     241.5     177.2     139.2     116.7      85.4
+      50.4      21.6       5.9       0.6       0.2
+    1739.8    1734.9    1733.0    1726.6    1678.5    1639.2    1676.6    1759.3
+    1781.8    1728.1    1560.6    1415.1    1296.8    1138.6     994.1     791.0
+     639.3     488.9     362.5     271.5     278.4     342.3     430.8     470.2
+     433.8     400.4     375.7     296.9     194.9     131.9      99.3      72.7
+      46.8      21.9       6.2       0.3       0.1
+    1739.8    1733.4    1726.2    1721.4    1683.0    1628.9    1608.0    1656.3
+    1704.4    1642.1    1461.3    1338.6    1178.5    1036.7     842.3     665.5
+     509.1     370.1     248.1     237.4     299.4     424.0     538.7     550.9
+     505.8     511.8     478.4     333.3     185.0     107.6      77.9      62.2
+      39.9      17.1       4.6       0.4       0.7
+    1739.8    1731.9    1718.6    1711.6    1685.5    1634.5    1578.3    1566.8
+    1578.6    1503.9    1391.7    1255.9    1088.7     918.0     716.7     559.7
+     401.4     255.8     187.5     211.9     297.5     428.9     500.2     478.8
+     461.1     488.9     417.1     244.3     117.7      65.4      46.5      33.1
+      19.9       8.9       2.5       0.5       0.7
+    1739.8    1730.4    1712.0    1698.4    1680.5    1643.5    1584.6    1522.5
+    1448.6    1328.1    1281.5    1153.1    1024.0     806.2     630.3     450.3
+     309.5     184.1     158.9     180.9     253.0     347.8     373.9     338.1
+     321.6     318.9     245.2     135.1      69.1      41.8      29.2      21.0
+      13.5       6.3       1.6       0.2       0.5
+    1739.8    1728.7    1707.5    1686.4    1669.4    1640.1    1597.6    1534.1
+    1390.3    1215.9    1131.7    1016.4     911.0     711.6     558.9     394.2
+     239.7     152.3     141.0     158.0     216.4     290.9     300.0     255.6
+     228.7     224.1     172.4      88.1      36.6      18.1      12.7       8.7
+       5.8       3.1       0.9       0.3       0.3
+    1739.8    1727.3    1704.7    1677.5    1654.2    1625.8    1594.5    1538.4
+    1391.4    1223.5    1086.3     937.0     788.1     619.2     476.3     340.5
+     195.2     136.2     124.3     136.7     186.6     250.5     253.2     209.8
+     198.9     210.2     154.6      57.6      19.1       7.5       2.6       0.4
+       0.3       0.1       0.3       0.1       0.1
+    1739.8    1726.1    1702.3    1671.4    1641.1    1613.2    1577.6    1520.4
+    1376.1    1245.4    1102.8     950.4     762.0     587.5     432.1     303.3
+     173.0     126.7     111.5     113.1     144.8     183.9     180.1     150.1
+     148.3     152.5     110.7      58.0      29.4      14.6       6.5       3.5
+       2.2       1.2       0.3       0.2       0.3
+    1739.8    1725.3    1699.4    1669.8    1633.6    1599.7    1563.7    1498.5
+    1345.3    1223.2    1074.8     935.8     757.2     592.9     431.9     290.9
+     166.9     125.1     107.4     101.7     108.6     116.4     100.5      77.0
+      69.3      66.1      49.9      31.9      17.8       9.2       6.1       5.1
+       3.8       2.4       0.4       0.2       0.1
+    1739.8    1725.1    1697.8    1670.7    1629.3    1595.2    1555.4    1496.7
+    1324.7    1209.7    1067.7     938.0     736.8     576.8     423.8     288.7
+     163.9     124.3     105.5      94.1      90.2      83.9      64.6      44.4
+      32.4      26.8      19.6      12.9       7.9       4.1       2.8       2.2
+       1.1       0.2       0.2       0.1       0.2

+ 87 - 0
examples/ies/06b4cfdc8805709e767b5e2e904be8ad.ies

@@ -0,0 +1,87 @@
+IESNA:LM-63-1995
+[TEST] 
+[MANUFAC] BEGA
+[MORE] Copyright LUMCat V 
+[LUMCAT] 
+[LUMINAIRE] 50899.2K3
+[LAMPCAT] LED  11,5W
+[LAMP]    1221 lm,14 W
+TILT=NONE
+1 -1 1.0 19 24 1 2 -0.120 0.000 0.000
+1.0 1.0 14
+   0.0   5.0  10.0  15.0  20.0  25.0  30.0  35.0  40.0  45.0  50.0  55.0  60.0
+  65.0  70.0  75.0  80.0  85.0  90.0
+   0.0  15.0  30.0  45.0  60.0  75.0  90.0 105.0 120.0 135.0 150.0 165.0 180.0
+ 195.0 210.0 225.0 240.0 255.0 270.0 285.0 300.0 315.0 330.0 345.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0
+    2160.3    1896.0    1447.3    1122.5     882.7     695.9     546.9     529.2
+     284.6      41.6      27.5      23.8      21.4      20.2      18.5      10.0
+       4.9       1.7       0.0

+ 30 - 0
examples/ies/1a936937a49c63374e6d4fbed9252b29.ies

@@ -0,0 +1,30 @@
+IESNA:LM-63-2002
+[TEST] LightLab International Test Report No. LL20433-R01-S1
+[MANUFAC] Efficient Lighting Systems,
+[MORE] Brunswick. VIC. 3056.
+[LUMINAIRE] Efficient Lighting Systems LED Display Track Light. Product ID: DT106.XTM10.N.94.61.
+[MORE] Cylindrical cast aluminium body and rectangular gear housing, 150 x 165 x 140 mm deep.
+[MORE] Recessed glass lens. Luminous opening of 92 mm diameter. Specular multifaceted “15 degree” reflector
+[MORE] about LED. One "Xicato XTM19954030CCA 0D" LED centred 60 mm above L/O.
+[MORE] One Harvard Technology CL40-1050S2D 220-240V 50/60Hz electronic driver set to “1050mA”
+[OTHER] Absolute test - lamp lumens value set to -1
+[MORE] NA conventions used for C0 plane alignment and C-plane rotation direction.
+[MORE] The sample was tested at a distance of 8m.
+[MORE] This IES file created by LightLab/LSA Report program version 3.803a.
+[DATE] This file created: Tuesday, 26 September 2017 4:14:01 PM
+[LUMCAT] DT106.XTM10.N.94.61
+[TESTLAB] LightLab International
+[ISSUEDATE] 26/09/2017
+TILT=NONE
+1 -1 1.498 181 1 1 2 -0.092 -0.092 0
+1 1 39
+0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14 14.5 15 15.5 16 16.5 17 17.5 18 18.5 19 19.5 20 20.5 21 21.5 22 22.5 23 23.5 24 24.5 25 25.5 26 26.5 27 27.5 28 28.5 29 29.5 30 30.5 31 31.5 32 32.5 33 33.5 34 
+34.5 35 35.5 36 36.5 37 37.5 38 38.5 39 39.5 40 40.5 41 41.5 42 42.5 43 43.5 44 44.5 45 45.5 46 46.5 47 47.5 48 48.5 49 49.5 50 50.5 51 51.5 52 52.5 53 53.5 54 54.5 55 55.5 56 56.5 57 57.5 58 58.5 59 59.5 60 60.5 61 61.5 62 62.5 63 63.5 64 64.5 65 65.5 66
+ 66.5 67 67.5 68 68.5 69 69.5 70 70.5 71 71.5 72 72.5 73 73.5 74 74.5 75 75.5 76 76.5 77 77.5 78 78.5 79 79.5 80 80.5 81 81.5 82 82.5 83 83.5 84 84.5 85 85.5 86 86.5 87 87.5 88 88.5 89 89.5 90
+0
+9769.798 9766.099 9733.675 9662.947 9575.834 9442.665 9280.229 9118.304 8886.575 8613.292 8341.374 7954.059 7478.424 7037.077 6451.128 5813.887 5183.818 4670.251 4124.621 3645.885 3310.188 2945.517 2631.518 2403.866 2164.416 1958.844 1816.224 1663.451 
+1524.167 1419.652 1306.115 1202.535 1115.449 1047.913 981.195 921.649 876.95 831.168 790.026 760.98 730.924 706.114 687.086 667.788 650.355 637.35 624.922 614.813 604.786 598.047 591.914 586.282 582.085 577.621 574.641 572.333 569.62 567.557 565.539 
+563.204 559.745 553.524 544.477 534.858 527.80 521.81 511.364 498.373 483.43 463.707 439.765 418.717 389.445 360.335 336.512 304.879 270.151 238.945 213.729 181.877 150.681 128.811 105.391 82.645 66.833 52.248 42.075 37.054 34.538 33.947 33.94 34.272 
+34.798 35.093 35.396 35.972 36.688 37.212 38.144 38.89 40.057 40.797 41.463 40.917 39.831 37.592 34.888 32.145 28.847 25.431 22.88 20.927 19.271 18.25 17.761 17.155 16.807 16.327 16.267 15.817 15.558 14.90 14.597 14.109 13.879 13.68 13.192 13.221 12.815 
+12.386 12.512 12.193 12.364 11.876 11.735 11.684 11.387 11.248 11.307 11.121 10.967 10.93 10.766 10.818 10.663 10.766 10.522 10.745 10.486 10.56 10.308 10.079 10.064 9.99 9.813 9.724 9.354 9.303 9.111 8.586 8.408 8.061 7.779 7.129 6.693 6.123 5.287 4.541 
+3.646 3.513 2.833 2.678 2.33 1.916 1.709 1.178 0.814 0.502 0.396 0.059 0.00

+ 3 - 0
examples/ies/README.md

@@ -0,0 +1,3 @@
+Profiles from the [IES Library](https://ieslibrary.com/en/home) website.
+
+New profiles can be created via [CNDL](https://cndl.io/).

+ 25 - 0
examples/jsm/lights/IESSpotLight.js

@@ -0,0 +1,25 @@
+import { SpotLight } from 'three';
+
+class IESSpotLight extends SpotLight {
+
+	constructor( color, intensity, distance, angle, penumbra, decay ) {
+
+		super( color, intensity, distance, angle, penumbra, decay );
+
+		this.iesMap = null;
+
+	}
+
+	copy( source, recursive ) {
+
+		super.copy( source, recursive );
+
+		this.iesMap = source.iesMap;
+
+		return this;
+
+	}
+
+}
+
+export default IESSpotLight;

+ 337 - 0
examples/jsm/loaders/IESLoader.js

@@ -0,0 +1,337 @@
+import {
+	DataTexture,
+	FileLoader,
+	FloatType,
+	RedFormat,
+	MathUtils,
+	Loader,
+	UnsignedByteType,
+	LinearFilter,
+	HalfFloatType,
+	DataUtils
+} from 'three';
+
+class IESLoader extends Loader {
+
+	constructor( manager ) {
+
+		super( manager );
+
+		this.type = HalfFloatType;
+
+	}
+
+	_getIESValues( iesLamp, type ) {
+
+		const width = 360;
+		const height = 180;
+		const size = width * height;
+
+		const data = new Array( size );
+
+		function interpolateCandelaValues( phi, theta ) {
+
+			let phiIndex = 0, thetaIndex = 0;
+			let startTheta = 0, endTheta = 0, startPhi = 0, endPhi = 0;
+
+			for ( let i = 0; i < iesLamp.numHorAngles - 1; ++ i ) { // numHorAngles = horAngles.length-1 because of extra padding, so this wont cause an out of bounds error
+
+				if ( theta < iesLamp.horAngles[ i + 1 ] || i == iesLamp.numHorAngles - 2 ) {
+
+					thetaIndex = i;
+					startTheta = iesLamp.horAngles[ i ];
+					endTheta = iesLamp.horAngles[ i + 1 ];
+
+					break;
+
+				}
+
+			}
+
+			for ( let i = 0; i < iesLamp.numVerAngles - 1; ++ i ) {
+
+				if ( phi < iesLamp.verAngles[ i + 1 ] || i == iesLamp.numVerAngles - 2 ) {
+
+					phiIndex = i;
+					startPhi = iesLamp.verAngles[ i ];
+					endPhi = iesLamp.verAngles[ i + 1 ];
+
+					break;
+
+				}
+
+			}
+
+			const deltaTheta = endTheta - startTheta;
+			const deltaPhi = endPhi - startPhi;
+
+			if ( deltaPhi === 0 ) // Outside range
+				return 0;
+
+			const t1 = deltaTheta === 0 ? 0 : ( theta - startTheta ) / deltaTheta;
+			const t2 = ( phi - startPhi ) / deltaPhi;
+
+			const nextThetaIndex = deltaTheta === 0 ? thetaIndex : thetaIndex + 1;
+
+			const v1 = MathUtils.lerp( iesLamp.candelaValues[ thetaIndex ][ phiIndex ], iesLamp.candelaValues[ nextThetaIndex ][ phiIndex ], t1 );
+			const v2 = MathUtils.lerp( iesLamp.candelaValues[ thetaIndex ][ phiIndex + 1 ], iesLamp.candelaValues[ nextThetaIndex ][ phiIndex + 1 ], t1 );
+			const v = MathUtils.lerp( v1, v2, t2 );
+
+			return v;
+
+		}
+
+		const startTheta = iesLamp.horAngles[ 0 ], endTheta = iesLamp.horAngles[ iesLamp.numHorAngles - 1 ];
+
+		for ( let i = 0; i < size; ++ i ) {
+
+			let theta = i % width;
+			const phi = Math.floor( i / width );
+
+			if ( endTheta - startTheta !== 0 && ( theta < startTheta || theta >= endTheta ) ) { // Handle symmetry for hor angles
+
+				theta %= endTheta * 2;
+
+				if ( theta > endTheta )
+					theta = endTheta * 2 - theta;
+
+			}
+
+			data[ phi + theta * height ] = interpolateCandelaValues( phi, theta );
+
+		}
+
+		let result = null;
+
+		if ( type === UnsignedByteType ) result = Uint8Array.from( data.map( v => Math.min( v * 0xFF, 0xFF ) ) );
+		else if ( type === HalfFloatType ) result = Uint16Array.from( data.map( v => DataUtils.toHalfFloat( v ) ) );
+		else if ( type === FloatType ) result = Float32Array.from( data );
+		else console.error( 'IESLoader: Unsupported type:', type );
+
+		return result;
+
+	}
+
+	load( url, onLoad, onProgress, onError ) {
+
+		const loader = new FileLoader( this.manager );
+		loader.setResponseType( 'text' );
+		loader.setCrossOrigin( this.crossOrigin );
+		loader.setWithCredentials( this.withCredentials );
+		loader.setPath( this.path );
+		loader.setRequestHeader( this.requestHeader );
+
+		loader.load( url, text => {
+
+			onLoad( this.parse( text ) );
+
+		}, onProgress, onError );
+
+	}
+
+	parse( text ) {
+
+		const type = this.type;
+
+		const iesLamp = new IESLamp( text );
+		const data = this._getIESValues( iesLamp, type );
+
+		const texture = new DataTexture( data, 180, 1, RedFormat, type );
+		texture.minFilter = LinearFilter;
+		texture.magFilter = LinearFilter;
+		texture.needsUpdate = true;
+
+		return texture;
+
+	}
+
+}
+
+
+function IESLamp( text ) {
+
+	const _self = this;
+
+	const textArray = text.split( '\n' );
+
+	let lineNumber = 0;
+	let line;
+
+	_self.verAngles = [ ];
+	_self.horAngles = [ ];
+
+	_self.candelaValues = [ ];
+
+	_self.tiltData = { };
+	_self.tiltData.angles = [ ];
+	_self.tiltData.mulFactors = [ ];
+
+	function textToArray( text ) {
+
+		text = text.replace( /^\s+|\s+$/g, '' ); // remove leading or trailing spaces
+		text = text.replace( /,/g, ' ' ); // replace commas with spaces
+		text = text.replace( /\s\s+/g, ' ' ); // replace white space/tabs etc by single whitespace
+
+		const array = text.split( ' ' );
+
+		return array;
+
+	}
+
+	function readArray( count, array ) {
+
+		while ( true ) {
+
+			const line = textArray[ lineNumber ++ ];
+			const lineData = textToArray( line );
+
+			for ( let i = 0; i < lineData.length; ++ i ) {
+
+				array.push( Number( lineData[ i ] ) );
+
+			}
+
+			if ( array.length === count )
+				break;
+
+		}
+
+	}
+
+	function readTilt() {
+
+		let line = textArray[ lineNumber ++ ];
+		let lineData = textToArray( line );
+
+		_self.tiltData.lampToLumGeometry = Number( lineData[ 0 ] );
+
+		line = textArray[ lineNumber ++ ];
+		lineData = textToArray( line );
+
+		_self.tiltData.numAngles = Number( lineData[ 0 ] );
+
+		readArray( _self.tiltData.numAngles, _self.tiltData.angles );
+		readArray( _self.tiltData.numAngles, _self.tiltData.mulFactors );
+
+	}
+
+	function readLampValues() {
+
+		const values = [ ];
+		readArray( 10, values );
+
+		_self.count = Number( values[ 0 ] );
+		_self.lumens = Number( values[ 1 ] );
+		_self.multiplier = Number( values[ 2 ] );
+		_self.numVerAngles = Number( values[ 3 ] );
+		_self.numHorAngles = Number( values[ 4 ] );
+		_self.gonioType = Number( values[ 5 ] );
+		_self.units = Number( values[ 6 ] );
+		_self.width = Number( values[ 7 ] );
+		_self.length = Number( values[ 8 ] );
+		_self.height = Number( values[ 9 ] );
+
+	}
+
+	function readLampFactors() {
+
+		const values = [ ];
+		readArray( 3, values );
+
+		_self.ballFactor = Number( values[ 0 ] );
+		_self.blpFactor = Number( values[ 1 ] );
+		_self.inputWatts = Number( values[ 2 ] );
+
+	}
+
+	while ( true ) {
+
+		line = textArray[ lineNumber ++ ];
+
+		if ( line.includes( 'TILT' ) ) {
+
+			break;
+
+		}
+
+	}
+
+	if ( ! line.includes( 'NONE' ) ) {
+
+		if ( line.includes( 'INCLUDE' ) ) {
+
+			readTilt();
+
+		} else {
+
+			// TODO:: Read tilt data from a file
+
+		}
+
+	}
+
+	readLampValues();
+
+	readLampFactors();
+
+	// Initialize candela value array
+	for ( let i = 0; i < _self.numHorAngles; ++ i ) {
+
+		_self.candelaValues.push( [ ] );
+
+	}
+
+	// Parse Angles
+	readArray( _self.numVerAngles, _self.verAngles );
+	readArray( _self.numHorAngles, _self.horAngles );
+
+	// Parse Candela values
+	for ( let i = 0; i < _self.numHorAngles; ++ i ) {
+
+		readArray( _self.numVerAngles, _self.candelaValues[ i ] );
+
+	}
+
+	// Calculate actual candela values, and normalize.
+	for ( let i = 0; i < _self.numHorAngles; ++ i ) {
+
+		for ( let j = 0; j < _self.numVerAngles; ++ j ) {
+
+			_self.candelaValues[ i ][ j ] *= _self.candelaValues[ i ][ j ] * _self.multiplier
+				* _self.ballFactor * _self.blpFactor;
+
+		}
+
+	}
+
+	let maxVal = - 1;
+	for ( let i = 0; i < _self.numHorAngles; ++ i ) {
+
+		for ( let j = 0; j < _self.numVerAngles; ++ j ) {
+
+			const value = _self.candelaValues[ i ][ j ];
+			maxVal = maxVal < value ? value : maxVal;
+
+		}
+
+	}
+
+	const bNormalize = true;
+	if ( bNormalize && maxVal > 0 ) {
+
+		for ( let i = 0; i < _self.numHorAngles; ++ i ) {
+
+			for ( let j = 0; j < _self.numVerAngles; ++ j ) {
+
+				_self.candelaValues[ i ][ j ] /= maxVal;
+
+			}
+
+		}
+
+	}
+
+}
+
+
+export { IESLoader };

+ 3 - 0
examples/jsm/nodes/Nodes.js

@@ -76,6 +76,7 @@ import CondNode from './math/CondNode.js';
 import PointLightNode from './lighting/PointLightNode.js';
 import DirectionalLightNode from './lighting/DirectionalLightNode.js';
 import SpotLightNode from './lighting/SpotLightNode.js';
+import IESSpotLightNode from './lighting/IESSpotLightNode.js';
 import AmbientLightNode from './lighting/AmbientLightNode.js';
 import LightsNode from './lighting/LightsNode.js';
 import LightingNode from './lighting/LightingNode.js';
@@ -213,6 +214,7 @@ const nodeLib = {
 	PointLightNode,
 	DirectionalLightNode,
 	SpotLightNode,
+	IESSpotLightNode,
 	AmbientLightNode,
 	LightsNode,
 	LightingNode,
@@ -343,6 +345,7 @@ export {
 	PointLightNode,
 	DirectionalLightNode,
 	SpotLightNode,
+	IESSpotLightNode,
 	AmbientLightNode,
 	LightsNode,
 	LightingNode,

+ 35 - 0
examples/jsm/nodes/lighting/IESSpotLightNode.js

@@ -0,0 +1,35 @@
+import SpotLightNode from './SpotLightNode.js';
+import LightsNode from './LightsNode.js';
+import { acos, texture, vec2 } from '../shadernode/ShaderNodeElements.js';
+
+import IESSpotLight from '../../lights/IESSpotLight.js';
+
+class IESSpotLightNode extends SpotLightNode {
+
+	getSpotAttenuation( angleCosine ) {
+
+		const iesMap = this.light.iesMap;
+
+		let spotAttenuation = null;
+
+		if ( iesMap && iesMap.isTexture === true ) {
+
+			const angle = acos( angleCosine ).mul( 1.0 / Math.PI );
+
+			spotAttenuation = texture( iesMap, vec2( angle, 0 ), 0 ).r;
+
+		} else {
+
+			spotAttenuation = super.getSpotAttenuation( angleCosine );
+
+		}
+
+		return spotAttenuation;
+
+	}
+
+}
+
+LightsNode.setReference( IESSpotLight, IESSpotLightNode );
+
+export default IESSpotLightNode;

+ 9 - 3
examples/jsm/nodes/lighting/SpotLightNode.js

@@ -6,8 +6,6 @@ import { uniform, smoothstep, positionView, objectViewPosition } from '../shader
 
 import { Vector3, SpotLight } from 'three';
 
-const getSpotAttenuation = ( coneCosine, penumbraCosine, angleCosine ) => smoothstep( coneCosine, penumbraCosine, angleCosine );
-
 class SpotLightNode extends AnalyticLightNode {
 
 	constructor( light = null ) {
@@ -40,6 +38,14 @@ class SpotLightNode extends AnalyticLightNode {
 
 	}
 
+	getSpotAttenuation( angleCosine ) {
+
+		const { coneCosNode, penumbraCosNode } = this;
+
+		return smoothstep( coneCosNode, penumbraCosNode, angleCosine );
+
+	}
+
 	construct( builder ) {
 
 		const { colorNode, cutoffDistanceNode, decayExponentNode, light } = this;
@@ -48,7 +54,7 @@ class SpotLightNode extends AnalyticLightNode {
 
 		const lightDirection = lVector.normalize();
 		const angleCos = lightDirection.dot( this.directionNode );
-		const spotAttenuation = getSpotAttenuation( this.coneCosNode, this.penumbraCosNode, angleCos );
+		const spotAttenuation = this.getSpotAttenuation( angleCos );
 
 		const lightDistance = lVector.length();
 

BIN
examples/screenshots/webgpu_lights_ies_spotlight.jpg


+ 178 - 0
examples/webgpu_lights_ies_spotlight.html

@@ -0,0 +1,178 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<title>three.js webgl - lights - ies spotlight</title>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
+		<link type="text/css" rel="stylesheet" href="main.css">
+	</head>
+	<body>
+
+		<div id="info">
+			<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> webgl - ies spotlight<br />
+		</div>
+
+		<!-- Import maps polyfill -->
+		<!-- Remove this when import maps will be widely supported -->
+		<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
+
+		<script type="importmap">
+			{
+				"imports": {
+					"three": "../build/three.module.js",
+					"three/addons/": "./jsm/",
+					"three/nodes": "./jsm/nodes/Nodes.js"
+				}
+			}
+		</script>
+
+		<script type="module">
+
+			import * as THREE from 'three';
+
+			import WebGPU from 'three/addons/capabilities/WebGPU.js';
+			import WebGPURenderer from 'three/addons/renderers/webgpu/WebGPURenderer.js';
+
+			import IESSpotLight from 'three/addons/lights/IESSpotLight.js';
+
+			import { OrbitControls } from './jsm/controls/OrbitControls.js';
+
+			import { IESLoader } from './jsm/loaders/IESLoader.js';
+
+			let renderer, scene, camera;
+			let lights;
+
+			async function init() {
+
+				if ( WebGPU.isAvailable() === false ) {
+
+					document.body.appendChild( WebGPU.getErrorMessage() );
+
+					throw new Error( 'No WebGPU support' );
+
+				}
+
+				//
+
+				scene = new THREE.Scene();
+
+				//
+
+				const iesLoader = new IESLoader().setPath( './ies/' );
+				//iesLoader.type = THREE.UnsignedByteType; // LDR
+
+				const [ iesTexture1, iesTexture2, iesTexture3, iesTexture4 ] = await Promise.all( [
+					iesLoader.loadAsync( '007cfb11e343e2f42e3b476be4ab684e.ies' ),
+					iesLoader.loadAsync( '06b4cfdc8805709e767b5e2e904be8ad.ies' ),
+					iesLoader.loadAsync( '02a7562c650498ebb301153dbbf59207.ies' ),
+					iesLoader.loadAsync( '1a936937a49c63374e6d4fbed9252b29.ies' )
+				] );
+
+				//
+
+				const spotLight = new IESSpotLight( 0xff0000, 500 );
+				spotLight.position.set( 6.5, 1.5, 6.5 );
+				spotLight.angle = Math.PI / 8;
+				spotLight.penumbra = 0.7;
+				spotLight.distance = 20;
+				spotLight.iesMap = iesTexture1;
+				scene.add( spotLight );
+
+				//
+
+				const spotLight2 = new IESSpotLight( 0x00ff00, 500 );
+				spotLight2.position.set( 6.5, 1.5, - 6.5 );
+				spotLight2.angle = Math.PI / 8;
+				spotLight2.penumbra = 0.7;
+				spotLight2.distance = 20;
+				spotLight2.iesMap = iesTexture2;
+				scene.add( spotLight2 );
+
+				//
+
+				const spotLight3 = new IESSpotLight( 0x0000ff, 500 );
+				spotLight3.position.set( - 6.5, 1.5, - 6.5 );
+				spotLight3.angle = Math.PI / 8;
+				spotLight3.penumbra = 0.7;
+				spotLight3.distance = 20;
+				spotLight3.iesMap = iesTexture3;
+				scene.add( spotLight3 );
+
+				//
+
+				const spotLight4 = new IESSpotLight( 0xffffff, 500 );
+				spotLight4.position.set( - 6.5, 1.5, 6.5 );
+				spotLight4.angle = Math.PI / 8;
+				spotLight4.penumbra = 0.7;
+				spotLight4.distance = 20;
+				spotLight4.iesMap = iesTexture4;
+				scene.add( spotLight4 );
+
+				//
+
+				lights = [ spotLight, spotLight2, spotLight3, spotLight4 ];
+
+				//
+
+				const material = new THREE.MeshPhongMaterial( { color: 0x808080/*, dithering: true*/ } );
+
+				const geometry = new THREE.PlaneGeometry( 200, 200 );
+
+				const mesh = new THREE.Mesh( geometry, material );
+				mesh.rotation.x = - Math.PI * 0.5;
+				scene.add( mesh );
+
+				//
+
+				renderer = new WebGPURenderer();
+				renderer.setPixelRatio( window.devicePixelRatio );
+				renderer.setSize( window.innerWidth, window.innerHeight );
+				renderer.setAnimationLoop( render );
+				renderer.outputEncoding = THREE.sRGBEncoding;
+				document.body.appendChild( renderer.domElement );
+
+				camera = new THREE.PerspectiveCamera( 35, window.innerWidth / window.innerHeight, .1, 100 );
+				camera.position.set( 16, 4, 1 );
+
+				const controls = new OrbitControls( camera, renderer.domElement );
+				controls.addEventListener( 'change', render );
+				controls.minDistance = 2;
+				controls.maxDistance = 50;
+				controls.enablePan = false;
+
+				//
+
+				window.addEventListener( 'resize', onWindowResize );
+
+			}
+
+			function onWindowResize() {
+
+				camera.aspect = window.innerWidth / window.innerHeight;
+				camera.updateProjectionMatrix();
+
+				renderer.setSize( window.innerWidth, window.innerHeight );
+
+			}
+
+			function render( time ) {
+
+				time = ( time / 1000 ) * 2.0;
+
+				for ( let i = 0; i < lights.length; i ++ ) {
+
+					lights[ i ].position.y = Math.sin( time + i ) + 0.97;
+
+				}
+
+				renderer.render( scene, camera );
+
+			}
+
+			init();
+
+		</script>
+
+	</body>
+
+</html>

+ 2 - 1
test/e2e/puppeteer.js

@@ -53,6 +53,7 @@ const exceptionList = [
 	'webgpu_instance_mesh',
 	'webgpu_instance_uniform',
 	'webgpu_lights_custom',
+	'webgpu_lights_ies_spotlight',
 	'webgpu_lights_phong',
 	'webgpu_lights_selective',
 	'webgpu_loader_gltf',
@@ -61,9 +62,9 @@ const exceptionList = [
 	'webgpu_particles',
 	'webgpu_rtt',
 	'webgpu_sandbox',
+	'webgpu_skinning',
 	'webgpu_skinning_instancing',
 	'webgpu_skinning_points',
-	'webgpu_skinning',
 	'webgpu_sprites'
 ].concat( ( process.platform === 'win32' ) ? [