1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualServer" inherits="Object" version="3.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server for anything visible.
</brief_description>
<description>
Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display.
The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed.
The visual server can be used to bypass the scene system entirely.
Resources are created using the [code]*_create[/code] functions.
All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas].
In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any [Spatial] node with [method Spatial.get_world]. Otherwise, a scenario can be created with [method scenario_create].
Similarly, in 2D, a canvas is needed to draw all canvas items.
In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible.
In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas.
</description>
<tutorials>
<link>$DOCS_URL/tutorials/performance/using_servers.html</link>
</tutorials>
<methods>
<method name="black_bars_set_images">
<return type="void" />
<argument index="0" name="left" type="RID" />
<argument index="1" name="top" type="RID" />
<argument index="2" name="right" type="RID" />
<argument index="3" name="bottom" type="RID" />
<description>
Sets images to be rendered in the window margin.
</description>
</method>
<method name="black_bars_set_margins">
<return type="void" />
<argument index="0" name="left" type="int" />
<argument index="1" name="top" type="int" />
<argument index="2" name="right" type="int" />
<argument index="3" name="bottom" type="int" />
<description>
Sets margin size, where black bars (or images, if [method black_bars_set_images] was used) are rendered.
</description>
</method>
<method name="camera_create">
<return type="RID" />
<description>
Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="camera_set_cull_mask">
<return type="void" />
<argument index="0" name="camera" type="RID" />
<argument index="1" name="layers" type="int" />
<description>
Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera.cull_mask].
</description>
</method>
<method name="camera_set_environment">
<return type="void" />
<argument index="0" name="camera" type="RID" />
<argument index="1" name="env" type="RID" />
<description>
Sets the environment used by this camera. Equivalent to [member Camera.environment].
</description>
</method>
<method name="camera_set_frustum">
<return type="void" />
<argument index="0" name="camera" type="RID" />
<argument index="1" name="size" type="float" />
<argument index="2" name="offset" type="Vector2" />
<argument index="3" name="z_near" type="float" />
<argument index="4" name="z_far" type="float" />
<description>
Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects.
</description>
</method>
<method name="camera_set_orthogonal">
<return type="void" />
<argument index="0" name="camera" type="RID" />
<argument index="1" name="size" type="float" />
<argument index="2" name="z_near" type="float" />
<argument index="3" name="z_far" type="float" />
<description>
Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are.
</description>
</method>
<method name="camera_set_perspective">
<return type="void" />
<argument index="0" name="camera" type="RID" />
<argument index="1" name="fovy_degrees" type="float" />
<argument index="2" name="z_near" type="float" />
<argument index="3" name="z_far" type="float" />
<description>
Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away.
</description>
</method>
<method name="camera_set_transform">
<return type="void" />
<argument index="0" name="camera" type="RID" />
<argument index="1" name="transform" type="Transform" />
<description>
Sets [Transform] of camera.
</description>
</method>
<method name="camera_set_use_vertical_aspect">
<return type="void" />
<argument index="0" name="camera" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera.KEEP_HEIGHT].
</description>
</method>
<method name="canvas_create">
<return type="RID" />
<description>
Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="canvas_item_add_circle">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="radius" type="float" />
<argument index="3" name="color" type="Color" />
<description>
Adds a circle command to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_clip_ignore">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="ignore" type="bool" />
<description>
If ignore is [code]true[/code], the VisualServer does not perform clipping.
</description>
</method>
<method name="canvas_item_add_line">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="from" type="Vector2" />
<argument index="2" name="to" type="Vector2" />
<argument index="3" name="color" type="Color" />
<argument index="4" name="width" type="float" default="1.0" />
<argument index="5" name="antialiased" type="bool" default="false" />
<description>
Adds a line command to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_mesh">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="mesh" type="RID" />
<argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )" />
<argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<argument index="4" name="texture" type="RID" />
<argument index="5" name="normal_map" type="RID" />
<description>
Adds a mesh command to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_multimesh">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="mesh" type="RID" />
<argument index="2" name="texture" type="RID" />
<argument index="3" name="normal_map" type="RID" />
<description>
Adds a [MultiMesh] to the [CanvasItem]'s draw commands. Only affects its aabb at the moment.
</description>
</method>
<method name="canvas_item_add_nine_patch">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="rect" type="Rect2" />
<argument index="2" name="source" type="Rect2" />
<argument index="3" name="texture" type="RID" />
<argument index="4" name="topleft" type="Vector2" />
<argument index="5" name="bottomright" type="Vector2" />
<argument index="6" name="x_axis_mode" type="int" enum="VisualServer.NinePatchAxisMode" default="0" />
<argument index="7" name="y_axis_mode" type="int" enum="VisualServer.NinePatchAxisMode" default="0" />
<argument index="8" name="draw_center" type="bool" default="true" />
<argument index="9" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<argument index="10" name="normal_map" type="RID" />
<description>
Adds a nine patch image to the [CanvasItem]'s draw commands.
See [NinePatchRect] for more explanation.
</description>
</method>
<method name="canvas_item_add_particles">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="particles" type="RID" />
<argument index="2" name="texture" type="RID" />
<argument index="3" name="normal_map" type="RID" />
<description>
Adds a particle system to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_polygon">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="points" type="PoolVector2Array" />
<argument index="2" name="colors" type="PoolColorArray" />
<argument index="3" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )" />
<argument index="4" name="texture" type="RID" />
<argument index="5" name="normal_map" type="RID" />
<argument index="6" name="antialiased" type="bool" default="false" />
<description>
Adds a polygon to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_polyline">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="points" type="PoolVector2Array" />
<argument index="2" name="colors" type="PoolColorArray" />
<argument index="3" name="width" type="float" default="1.0" />
<argument index="4" name="antialiased" type="bool" default="false" />
<description>
Adds a polyline, which is a line from multiple points with a width, to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_primitive">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="points" type="PoolVector2Array" />
<argument index="2" name="colors" type="PoolColorArray" />
<argument index="3" name="uvs" type="PoolVector2Array" />
<argument index="4" name="texture" type="RID" />
<argument index="5" name="width" type="float" default="1.0" />
<argument index="6" name="normal_map" type="RID" />
<description>
Adds a primitive to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_rect">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="rect" type="Rect2" />
<argument index="2" name="color" type="Color" />
<description>
Adds a rectangle to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_set_transform">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="transform" type="Transform2D" />
<description>
Adds a [Transform2D] command to the [CanvasItem]'s draw commands.
This sets the extra_matrix uniform when executed. This affects the later commands of the canvas item.
</description>
</method>
<method name="canvas_item_add_texture_rect">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="rect" type="Rect2" />
<argument index="2" name="texture" type="RID" />
<argument index="3" name="tile" type="bool" default="false" />
<argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<argument index="5" name="transpose" type="bool" default="false" />
<argument index="6" name="normal_map" type="RID" />
<description>
Adds a textured rect to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_texture_rect_region">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="rect" type="Rect2" />
<argument index="2" name="texture" type="RID" />
<argument index="3" name="src_rect" type="Rect2" />
<argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )" />
<argument index="5" name="transpose" type="bool" default="false" />
<argument index="6" name="normal_map" type="RID" />
<argument index="7" name="clip_uv" type="bool" default="true" />
<description>
Adds a texture rect with region setting to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_add_triangle_array">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="indices" type="PoolIntArray" />
<argument index="2" name="points" type="PoolVector2Array" />
<argument index="3" name="colors" type="PoolColorArray" />
<argument index="4" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )" />
<argument index="5" name="bones" type="PoolIntArray" default="PoolIntArray( )" />
<argument index="6" name="weights" type="PoolRealArray" default="PoolRealArray( )" />
<argument index="7" name="texture" type="RID" />
<argument index="8" name="count" type="int" default="-1" />
<argument index="9" name="normal_map" type="RID" />
<argument index="10" name="antialiased" type="bool" default="false" />
<argument index="11" name="antialiasing_use_indices" type="bool" default="false" />
<description>
Adds a triangle array to the [CanvasItem]'s draw commands.
</description>
</method>
<method name="canvas_item_clear">
<return type="void" />
<argument index="0" name="item" type="RID" />
<description>
Clears the [CanvasItem] and removes all commands in it.
</description>
</method>
<method name="canvas_item_create">
<return type="RID" />
<description>
Creates a new [CanvasItem] and returns its [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_item_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="canvas_item_reset_physics_interpolation">
<return type="void" />
<argument index="0" name="item" type="RID" />
<description>
Prevents physics interpolation for the current physics tick.
This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location.
</description>
</method>
<method name="canvas_item_set_clip">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="clip" type="bool" />
<description>
Sets clipping for the [CanvasItem].
</description>
</method>
<method name="canvas_item_set_copy_to_backbuffer">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="enabled" type="bool" />
<argument index="2" name="rect" type="Rect2" />
<description>
Sets the [CanvasItem] to copy a rect to the backbuffer.
</description>
</method>
<method name="canvas_item_set_custom_rect">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="use_custom_rect" type="bool" />
<argument index="2" name="rect" type="Rect2" default="Rect2( 0, 0, 0, 0 )" />
<description>
Defines a custom drawing rectangle for the [CanvasItem].
</description>
</method>
<method name="canvas_item_set_distance_field_mode">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
Enables the use of distance fields for GUI elements that are rendering distance field based fonts.
</description>
</method>
<method name="canvas_item_set_draw_behind_parent">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
Sets [CanvasItem] to be drawn behind its parent.
</description>
</method>
<method name="canvas_item_set_draw_index">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="index" type="int" />
<description>
Sets the index for the [CanvasItem].
</description>
</method>
<method name="canvas_item_set_interpolated">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="interpolated" type="bool" />
<description>
Turns on and off physics interpolation for the canvas item.
</description>
</method>
<method name="canvas_item_set_light_mask">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="mask" type="int" />
<description>
The light mask. See [LightOccluder2D] for more information on light masks.
</description>
</method>
<method name="canvas_item_set_material">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="material" type="RID" />
<description>
Sets a new material to the [CanvasItem].
</description>
</method>
<method name="canvas_item_set_modulate">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Sets the color that modulates the [CanvasItem] and its children.
</description>
</method>
<method name="canvas_item_set_parent">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="parent" type="RID" />
<description>
Sets the parent for the [CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport.
</description>
</method>
<method name="canvas_item_set_self_modulate">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Sets the color that modulates the [CanvasItem] without children.
</description>
</method>
<method name="canvas_item_set_sort_children_by_y">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
Sets if [CanvasItem]'s children should be sorted by y-position.
</description>
</method>
<method name="canvas_item_set_transform">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="transform" type="Transform2D" />
<description>
Sets the [CanvasItem]'s [Transform2D].
</description>
</method>
<method name="canvas_item_set_use_parent_material">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
Sets if the [CanvasItem] uses its parent's material.
</description>
</method>
<method name="canvas_item_set_visible">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="visible" type="bool" />
<description>
Sets if the canvas item (including its children) is visible.
</description>
</method>
<method name="canvas_item_set_z_as_relative_to_parent">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
If this is enabled, the Z index of the parent will be added to the children's Z index.
</description>
</method>
<method name="canvas_item_set_z_index">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="z_index" type="int" />
<description>
Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first).
</description>
</method>
<method name="canvas_item_transform_physics_interpolation">
<return type="void" />
<argument index="0" name="item" type="RID" />
<argument index="1" name="xform" type="Transform2D" />
<description>
Transforms both the current and previous stored transform for a canvas item.
This allows transforming a canvas item without creating a "glitch" in the interpolation.
This is particularly useful for large worlds utilising a shifting origin.
</description>
</method>
<method name="canvas_light_attach_to_canvas">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="canvas" type="RID" />
<description>
Attaches the canvas light to the canvas. Removes it from its previous canvas.
</description>
</method>
<method name="canvas_light_create">
<return type="RID" />
<description>
Creates a canvas light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="canvas_light_occluder_attach_to_canvas">
<return type="void" />
<argument index="0" name="occluder" type="RID" />
<argument index="1" name="canvas" type="RID" />
<description>
Attaches a light occluder to the canvas. Removes it from its previous canvas.
</description>
</method>
<method name="canvas_light_occluder_create">
<return type="RID" />
<description>
Creates a light occluder and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_ocluder_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="canvas_light_occluder_reset_physics_interpolation">
<return type="void" />
<argument index="0" name="occluder" type="RID" />
<description>
Prevents physics interpolation for the current physics tick.
This is useful when moving an occluder to a new location, to give an instantaneous change rather than interpolation from the previous location.
</description>
</method>
<method name="canvas_light_occluder_set_enabled">
<return type="void" />
<argument index="0" name="occluder" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
Enables or disables light occluder.
</description>
</method>
<method name="canvas_light_occluder_set_interpolated">
<return type="void" />
<argument index="0" name="occluder" type="RID" />
<argument index="1" name="interpolated" type="bool" />
<description>
Turns on and off physics interpolation for the occluder.
</description>
</method>
<method name="canvas_light_occluder_set_light_mask">
<return type="void" />
<argument index="0" name="occluder" type="RID" />
<argument index="1" name="mask" type="int" />
<description>
The light mask. See [LightOccluder2D] for more information on light masks.
</description>
</method>
<method name="canvas_light_occluder_set_polygon">
<return type="void" />
<argument index="0" name="occluder" type="RID" />
<argument index="1" name="polygon" type="RID" />
<description>
Sets a light occluder's polygon.
</description>
</method>
<method name="canvas_light_occluder_set_transform">
<return type="void" />
<argument index="0" name="occluder" type="RID" />
<argument index="1" name="transform" type="Transform2D" />
<description>
Sets a light occluder's [Transform2D].
</description>
</method>
<method name="canvas_light_occluder_transform_physics_interpolation">
<return type="void" />
<argument index="0" name="occluder" type="RID" />
<argument index="1" name="xform" type="Transform2D" />
<description>
Transforms both the current and previous stored transform for an occluder.
This allows transforming an occluder without creating a "glitch" in the interpolation.
This is particularly useful for large worlds utilising a shifting origin.
</description>
</method>
<method name="canvas_light_reset_physics_interpolation">
<return type="void" />
<argument index="0" name="light" type="RID" />
<description>
Prevents physics interpolation for the current physics tick.
This is useful when moving a light to a new location, to give an instantaneous change rather than interpolation from the previous location.
</description>
</method>
<method name="canvas_light_set_color">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Sets the color for a light.
</description>
</method>
<method name="canvas_light_set_enabled">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
Enables or disables a canvas light.
</description>
</method>
<method name="canvas_light_set_energy">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="energy" type="float" />
<description>
Sets a canvas light's energy.
</description>
</method>
<method name="canvas_light_set_height">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="height" type="float" />
<description>
Sets a canvas light's height.
</description>
</method>
<method name="canvas_light_set_interpolated">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="interpolated" type="bool" />
<description>
Turns on and off physics interpolation for the light.
</description>
</method>
<method name="canvas_light_set_item_cull_mask">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="mask" type="int" />
<description>
The light mask. See [LightOccluder2D] for more information on light masks.
</description>
</method>
<method name="canvas_light_set_item_shadow_cull_mask">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="mask" type="int" />
<description>
The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks.
</description>
</method>
<method name="canvas_light_set_layer_range">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="min_layer" type="int" />
<argument index="2" name="max_layer" type="int" />
<description>
The layer range that gets rendered with this light.
</description>
</method>
<method name="canvas_light_set_mode">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="mode" type="int" enum="VisualServer.CanvasLightMode" />
<description>
The mode of the light, see [enum CanvasLightMode] constants.
</description>
</method>
<method name="canvas_light_set_scale">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="scale" type="float" />
<description>
Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale].
</description>
</method>
<method name="canvas_light_set_shadow_buffer_size">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="size" type="int" />
<description>
Sets the width of the shadow buffer, size gets scaled to the next power of two for this.
</description>
</method>
<method name="canvas_light_set_shadow_color">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Sets the color of the canvas light's shadow.
</description>
</method>
<method name="canvas_light_set_shadow_enabled">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
Enables or disables the canvas light's shadow.
</description>
</method>
<method name="canvas_light_set_shadow_filter">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="filter" type="int" enum="VisualServer.CanvasLightShadowFilter" />
<description>
Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants.
</description>
</method>
<method name="canvas_light_set_shadow_gradient_length">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="length" type="float" />
<description>
Sets the length of the shadow's gradient.
</description>
</method>
<method name="canvas_light_set_shadow_smooth">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="smooth" type="float" />
<description>
Smoothens the shadow. The lower, the smoother.
</description>
</method>
<method name="canvas_light_set_texture">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="texture" type="RID" />
<description>
Sets texture to be used by light. Equivalent to [member Light2D.texture].
</description>
</method>
<method name="canvas_light_set_texture_offset">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="offset" type="Vector2" />
<description>
Sets the offset of the light's texture. Equivalent to [member Light2D.offset].
</description>
</method>
<method name="canvas_light_set_transform">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="transform" type="Transform2D" />
<description>
Sets the canvas light's [Transform2D].
</description>
</method>
<method name="canvas_light_set_z_range">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="min_z" type="int" />
<argument index="2" name="max_z" type="int" />
<description>
Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max].
</description>
</method>
<method name="canvas_light_transform_physics_interpolation">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="xform" type="Transform2D" />
<description>
Transforms both the current and previous stored transform for a light.
This allows transforming a light without creating a "glitch" in the interpolation.
This is particularly useful for large worlds utilising a shifting origin.
</description>
</method>
<method name="canvas_occluder_polygon_create">
<return type="RID" />
<description>
Creates a new light occluder polygon and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_occluder_polygon_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="canvas_occluder_polygon_set_cull_mode">
<return type="void" />
<argument index="0" name="occluder_polygon" type="RID" />
<argument index="1" name="mode" type="int" enum="VisualServer.CanvasOccluderPolygonCullMode" />
<description>
Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants.
</description>
</method>
<method name="canvas_occluder_polygon_set_shape">
<return type="void" />
<argument index="0" name="occluder_polygon" type="RID" />
<argument index="1" name="shape" type="PoolVector2Array" />
<argument index="2" name="closed" type="bool" />
<description>
Sets the shape of the occluder polygon.
</description>
</method>
<method name="canvas_occluder_polygon_set_shape_as_lines">
<return type="void" />
<argument index="0" name="occluder_polygon" type="RID" />
<argument index="1" name="shape" type="PoolVector2Array" />
<description>
Sets the shape of the occluder polygon as lines.
</description>
</method>
<method name="canvas_set_item_mirroring">
<return type="void" />
<argument index="0" name="canvas" type="RID" />
<argument index="1" name="item" type="RID" />
<argument index="2" name="mirroring" type="Vector2" />
<description>
A copy of the canvas item will be drawn with a local offset of the mirroring [Vector2].
</description>
</method>
<method name="canvas_set_modulate">
<return type="void" />
<argument index="0" name="canvas" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Modulates all colors in the given canvas.
</description>
</method>
<method name="debug_canvas_item_get_local_bound">
<return type="Rect2" />
<argument index="0" name="item" type="RID" />
<description>
Returns the bounding rectangle for a canvas item and its descendants in local space, as calculated by the renderer. This bound is used internally for culling.
[b]Warning:[/b] This function is intended for debugging in the editor, and will pass through and return a zero [Rect2] in exported projects.
</description>
</method>
<method name="debug_canvas_item_get_rect">
<return type="Rect2" />
<argument index="0" name="item" type="RID" />
<description>
Returns the bounding rectangle for a canvas item in local space, as calculated by the renderer. This bound is used internally for culling.
[b]Warning:[/b] This function is intended for debugging in the editor, and will pass through and return a zero [Rect2] in exported projects.
</description>
</method>
<method name="directional_light_create">
<return type="RID" />
<description>
Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="draw">
<return type="void" />
<argument index="0" name="swap_buffers" type="bool" default="true" />
<argument index="1" name="frame_step" type="float" default="0.0" />
<description>
Draws a frame. [i]This method is deprecated[/i], please use [method force_draw] instead.
</description>
</method>
<method name="environment_create">
<return type="RID" />
<description>
Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="environment_set_adjustment">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
<argument index="2" name="brightness" type="float" />
<argument index="3" name="contrast" type="float" />
<argument index="4" name="saturation" type="float" />
<argument index="5" name="ramp" type="RID" />
<description>
Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ambient_light">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="color" type="Color" />
<argument index="2" name="energy" type="float" default="1.0" />
<argument index="3" name="sky_contibution" type="float" default="0.0" />
<description>
Sets the ambient light parameters. See [Environment] for more details.
</description>
</method>
<method name="environment_set_background">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="bg" type="int" enum="VisualServer.EnvironmentBG" />
<description>
Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode].
</description>
</method>
<method name="environment_set_bg_color">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes).
</description>
</method>
<method name="environment_set_bg_energy">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="energy" type="float" />
<description>
Sets the intensity of the background color.
</description>
</method>
<method name="environment_set_canvas_max_layer">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="max_layer" type="int" />
<description>
Sets the maximum layer to use if using Canvas background mode.
</description>
</method>
<method name="environment_set_dof_blur_far">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
<argument index="2" name="distance" type="float" />
<argument index="3" name="transition" type="float" />
<argument index="4" name="far_amount" type="float" />
<argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality" />
<description>
Sets the values to be used with the "DoF Far Blur" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_dof_blur_near">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
<argument index="2" name="distance" type="float" />
<argument index="3" name="transition" type="float" />
<argument index="4" name="far_amount" type="float" />
<argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality" />
<description>
Sets the values to be used with the "DoF Near Blur" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_fog">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
<argument index="2" name="color" type="Color" />
<argument index="3" name="sun_color" type="Color" />
<argument index="4" name="sun_amount" type="float" />
<description>
Sets the variables to be used with the scene fog. See [Environment] for more details.
</description>
</method>
<method name="environment_set_fog_depth">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
<argument index="2" name="depth_begin" type="float" />
<argument index="3" name="depth_end" type="float" />
<argument index="4" name="depth_curve" type="float" />
<argument index="5" name="transmit" type="bool" />
<argument index="6" name="transmit_curve" type="float" />
<description>
Sets the variables to be used with the fog depth effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_fog_height">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
<argument index="2" name="min_height" type="float" />
<argument index="3" name="max_height" type="float" />
<argument index="4" name="height_curve" type="float" />
<description>
Sets the variables to be used with the fog height effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_glow">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
<argument index="2" name="level_flags" type="int" />
<argument index="3" name="intensity" type="float" />
<argument index="4" name="strength" type="float" />
<argument index="5" name="bloom_threshold" type="float" />
<argument index="6" name="blend_mode" type="int" enum="VisualServer.EnvironmentGlowBlendMode" />
<argument index="7" name="hdr_bleed_threshold" type="float" />
<argument index="8" name="hdr_bleed_scale" type="float" />
<argument index="9" name="hdr_luminance_cap" type="float" />
<argument index="10" name="bicubic_upscale" type="bool" />
<argument index="11" name="high_quality" type="bool" />
<description>
Sets the variables to be used with the "glow" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_sky">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="sky" type="RID" />
<description>
Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.background_sky].
</description>
</method>
<method name="environment_set_sky_custom_fov">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="scale" type="float" />
<description>
Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.background_sky_custom_fov].
</description>
</method>
<method name="environment_set_sky_orientation">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="orientation" type="Basis" />
<description>
Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.background_sky_orientation].
</description>
</method>
<method name="environment_set_ssao">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
<argument index="2" name="radius" type="float" />
<argument index="3" name="intensity" type="float" />
<argument index="4" name="radius2" type="float" />
<argument index="5" name="intensity2" type="float" />
<argument index="6" name="bias" type="float" />
<argument index="7" name="light_affect" type="float" />
<argument index="8" name="ao_channel_affect" type="float" />
<argument index="9" name="color" type="Color" />
<argument index="10" name="quality" type="int" enum="VisualServer.EnvironmentSSAOQuality" />
<argument index="11" name="blur" type="int" enum="VisualServer.EnvironmentSSAOBlur" />
<argument index="12" name="bilateral_sharpness" type="float" />
<description>
Sets the variables to be used with the "Screen Space Ambient Occlusion (SSAO)" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssr">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="enable" type="bool" />
<argument index="2" name="max_steps" type="int" />
<argument index="3" name="fade_in" type="float" />
<argument index="4" name="fade_out" type="float" />
<argument index="5" name="depth_tolerance" type="float" />
<argument index="6" name="roughness" type="bool" />
<description>
Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_tonemap">
<return type="void" />
<argument index="0" name="env" type="RID" />
<argument index="1" name="tone_mapper" type="int" enum="VisualServer.EnvironmentToneMapper" />
<argument index="2" name="exposure" type="float" />
<argument index="3" name="white" type="float" />
<argument index="4" name="auto_exposure" type="bool" />
<argument index="5" name="min_luminance" type="float" />
<argument index="6" name="max_luminance" type="float" />
<argument index="7" name="auto_exp_speed" type="float" />
<argument index="8" name="auto_exp_grey" type="float" />
<description>
Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="finish">
<return type="void" />
<description>
Removes buffers and clears testcubes.
</description>
</method>
<method name="force_draw">
<return type="void" />
<argument index="0" name="swap_buffers" type="bool" default="true" />
<argument index="1" name="frame_step" type="float" default="0.0" />
<description>
Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution.
</description>
</method>
<method name="force_sync">
<return type="void" />
<description>
Synchronizes threads.
</description>
</method>
<method name="free_rid">
<return type="void" />
<argument index="0" name="rid" type="RID" />
<description>
Destroys an object created by the VisualServer. If the [RID] passed is not one created by the server that created it (e.g. VisualServer, PhysicsServer, etc.), an error will be sent to the console.
[b]Note:[/b] After freeing the object, the RID now has a reference to invalid memory. It is not safe to use or free an invalid RID. Before using the RID again, make sure to assign it to [code]RID()[/code] or any other valid RID.
[codeblock]
var r: RID = VisualServer.get_test_cube()
VisualServer.free_rid(r)
print("ID: ", r.get_id()) # It is not safe to access or free an invalid RID
r = RID() # Reset the RID so it is safe to use again.
print("ID: ", r.get_id())
# Output:
# ID: 157 # Freed RID has invalid data
# ID: 0 # RID has been properly reset
[/codeblock]
</description>
</method>
<method name="get_render_info">
<return type="int" />
<argument index="0" name="info" type="int" enum="VisualServer.RenderInfo" />
<description>
Returns a certain information, see [enum RenderInfo] for options.
</description>
</method>
<method name="get_test_cube">
<return type="RID" />
<description>
Returns the id of the test cube. Creates one if none exists.
</description>
</method>
<method name="get_test_texture">
<return type="RID" />
<description>
Returns the id of the test texture. Creates one if none exists.
</description>
</method>
<method name="get_video_adapter_name" qualifiers="const">
<return type="String" />
<description>
Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2").
[b]Note:[/b] When running a headless or server binary, this function returns an empty string.
</description>
</method>
<method name="get_video_adapter_vendor" qualifiers="const">
<return type="String" />
<description>
Returns the vendor of the video adapter (e.g. "NVIDIA Corporation").
[b]Note:[/b] When running a headless or server binary, this function returns an empty string.
</description>
</method>
<method name="get_white_texture">
<return type="RID" />
<description>
Returns the id of a white texture. Creates one if none exists.
</description>
</method>
<method name="gi_probe_create">
<return type="RID" />
<description>
Creates a GI probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]gi_probe_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach this GI probe to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="gi_probe_get_bias" qualifiers="const">
<return type="float" />
<argument index="0" name="probe" type="RID" />
<description>
Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias].
</description>
</method>
<method name="gi_probe_get_bounds" qualifiers="const">
<return type="AABB" />
<argument index="0" name="probe" type="RID" />
<description>
Returns the axis-aligned bounding box that covers the full extent of the GI probe.
</description>
</method>
<method name="gi_probe_get_cell_size" qualifiers="const">
<return type="float" />
<argument index="0" name="probe" type="RID" />
<description>
Returns the cell size set by [method gi_probe_set_cell_size].
</description>
</method>
<method name="gi_probe_get_dynamic_data" qualifiers="const">
<return type="PoolIntArray" />
<argument index="0" name="probe" type="RID" />
<description>
Returns the data used by the GI probe.
</description>
</method>
<method name="gi_probe_get_dynamic_range" qualifiers="const">
<return type="int" />
<argument index="0" name="probe" type="RID" />
<description>
Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range].
</description>
</method>
<method name="gi_probe_get_energy" qualifiers="const">
<return type="float" />
<argument index="0" name="probe" type="RID" />
<description>
Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy].
</description>
</method>
<method name="gi_probe_get_normal_bias" qualifiers="const">
<return type="float" />
<argument index="0" name="probe" type="RID" />
<description>
Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias].
</description>
</method>
<method name="gi_probe_get_propagation" qualifiers="const">
<return type="float" />
<argument index="0" name="probe" type="RID" />
<description>
Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation].
</description>
</method>
<method name="gi_probe_get_to_cell_xform" qualifiers="const">
<return type="Transform" />
<argument index="0" name="probe" type="RID" />
<description>
Returns the Transform set by [method gi_probe_set_to_cell_xform].
</description>
</method>
<method name="gi_probe_is_compressed" qualifiers="const">
<return type="bool" />
<argument index="0" name="probe" type="RID" />
<description>
Returns [code]true[/code] if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress].
</description>
</method>
<method name="gi_probe_is_interior" qualifiers="const">
<return type="bool" />
<argument index="0" name="probe" type="RID" />
<description>
Returns [code]true[/code] if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [member GIProbe.interior].
</description>
</method>
<method name="gi_probe_set_bias">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="bias" type="float" />
<description>
Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias].
</description>
</method>
<method name="gi_probe_set_bounds">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="bounds" type="AABB" />
<description>
Sets the axis-aligned bounding box that covers the extent of the GI probe.
</description>
</method>
<method name="gi_probe_set_cell_size">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="range" type="float" />
<description>
Sets the size of individual cells within the GI probe.
</description>
</method>
<method name="gi_probe_set_compress">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [member GIProbe.compress].
</description>
</method>
<method name="gi_probe_set_dynamic_data">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="data" type="PoolIntArray" />
<description>
Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [GIProbe] node. You should not try to set this yourself.
</description>
</method>
<method name="gi_probe_set_dynamic_range">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="range" type="int" />
<description>
Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to [member GIProbe.dynamic_range].
</description>
</method>
<method name="gi_probe_set_energy">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="energy" type="float" />
<description>
Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [member GIProbe.energy].
</description>
</method>
<method name="gi_probe_set_interior">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to [member GIProbe.interior].
</description>
</method>
<method name="gi_probe_set_normal_bias">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="bias" type="float" />
<description>
Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to [member GIProbe.normal_bias].
</description>
</method>
<method name="gi_probe_set_propagation">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="propagation" type="float" />
<description>
Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation].
</description>
</method>
<method name="gi_probe_set_to_cell_xform">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="xform" type="Transform" />
<description>
Sets the to cell [Transform] for this GI probe.
</description>
</method>
<method name="has_changed" qualifiers="const">
<return type="bool" />
<argument index="0" name="queried_priority" type="int" enum="VisualServer.ChangedPriority" default="0" />
<description>
Returns [code]true[/code] if changes have been made to the VisualServer's data. [method draw] is usually called if this happens.
As changes are registered as either high or low priority (e.g. dynamic shaders), this function takes an optional argument to query either low or high priority changes, or any changes.
</description>
</method>
<method name="has_feature" qualifiers="const">
<return type="bool" />
<argument index="0" name="feature" type="int" enum="VisualServer.Features" />
<description>
Not yet implemented. Always returns [code]false[/code].
</description>
</method>
<method name="has_os_feature" qualifiers="const">
<return type="bool" />
<argument index="0" name="feature" type="String" />
<description>
Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], [code]etc2[/code], [code]pvrtc[/code] and [code]skinning_fallback[/code].
When rendering with GLES2, returns [code]true[/code] with [code]skinning_fallback[/code] in case the hardware doesn't support the default GPU skinning process.
</description>
</method>
<method name="immediate_begin">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<argument index="1" name="primitive" type="int" enum="VisualServer.PrimitiveType" />
<argument index="2" name="texture" type="RID" />
<description>
Sets up [ImmediateGeometry] internals to prepare for drawing. Equivalent to [method ImmediateGeometry.begin].
</description>
</method>
<method name="immediate_clear">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<description>
Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry.clear].
</description>
</method>
<method name="immediate_color">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry.set_color].
</description>
</method>
<method name="immediate_create">
<return type="RID" />
<description>
Creates an immediate geometry and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="immediate_end">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<description>
Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method ImmediateGeometry.end].
</description>
</method>
<method name="immediate_get_material" qualifiers="const">
<return type="RID" />
<argument index="0" name="immediate" type="RID" />
<description>
Returns the material assigned to the [ImmediateGeometry].
</description>
</method>
<method name="immediate_normal">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<argument index="1" name="normal" type="Vector3" />
<description>
Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry.set_normal].
</description>
</method>
<method name="immediate_set_material">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<argument index="1" name="material" type="RID" />
<description>
Sets the material to be used to draw the [ImmediateGeometry].
</description>
</method>
<method name="immediate_tangent">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<argument index="1" name="tangent" type="Plane" />
<description>
Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry.set_tangent].
</description>
</method>
<method name="immediate_uv">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<argument index="1" name="tex_uv" type="Vector2" />
<description>
Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv].
</description>
</method>
<method name="immediate_uv2">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<argument index="1" name="tex_uv" type="Vector2" />
<description>
Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv2].
</description>
</method>
<method name="immediate_vertex">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<argument index="1" name="vertex" type="Vector3" />
<description>
Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry.add_vertex].
</description>
</method>
<method name="immediate_vertex_2d">
<return type="void" />
<argument index="0" name="immediate" type="RID" />
<argument index="1" name="vertex" type="Vector2" />
<description>
Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry.add_vertex].
</description>
</method>
<method name="init">
<return type="void" />
<description>
Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything.
</description>
</method>
<method name="instance_attach_object_instance_id">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="id" type="int" />
<description>
Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray].
</description>
</method>
<method name="instance_attach_skeleton">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="skeleton" type="RID" />
<description>
Attaches a skeleton to an instance. Removes the previous skeleton from the instance.
</description>
</method>
<method name="instance_create">
<return type="RID" />
<description>
Creates a visual instance and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base].
</description>
</method>
<method name="instance_create2">
<return type="RID" />
<argument index="0" name="base" type="RID" />
<argument index="1" name="scenario" type="RID" />
<description>
Creates a visual instance, adds it to the VisualServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="instance_geometry_set_cast_shadows_setting">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="shadow_casting_setting" type="int" enum="VisualServer.ShadowCastingSetting" />
<description>
Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance.cast_shadow].
</description>
</method>
<method name="instance_geometry_set_flag">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="flag" type="int" enum="VisualServer.InstanceFlags" />
<argument index="2" name="enabled" type="bool" />
<description>
Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details.
</description>
</method>
<method name="instance_geometry_set_material_overlay">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="material" type="RID" />
<description>
Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to [member GeometryInstance.material_overlay].
</description>
</method>
<method name="instance_geometry_set_material_override">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="material" type="RID" />
<description>
Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance.material_override].
</description>
</method>
<method name="instance_reset_physics_interpolation">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<description>
Prevents physics interpolation for the current physics tick.
This is useful when moving an instance to a new location, to give an instantaneous change rather than interpolation from the previous location.
</description>
</method>
<method name="instance_set_base">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="base" type="RID" />
<description>
Sets the base of the instance. A base can be any of the 3D objects that are created in the VisualServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario.
</description>
</method>
<method name="instance_set_blend_shape_weight">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="shape" type="int" />
<argument index="2" name="weight" type="float" />
<description>
Sets the weight for a given blend shape associated with this instance.
</description>
</method>
<method name="instance_set_custom_aabb">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="aabb" type="AABB" />
<description>
Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance.set_custom_aabb].
</description>
</method>
<method name="instance_set_exterior">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
Function not implemented in Godot 3.x.
</description>
</method>
<method name="instance_set_extra_visibility_margin">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="margin" type="float" />
<description>
Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance.extra_cull_margin].
</description>
</method>
<method name="instance_set_interpolated">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="interpolated" type="bool" />
<description>
Turns on and off physics interpolation for the instance.
</description>
</method>
<method name="instance_set_layer_mask">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="mask" type="int" />
<description>
Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance.layers].
</description>
</method>
<method name="instance_set_scenario">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="scenario" type="RID" />
<description>
Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in.
</description>
</method>
<method name="instance_set_surface_material">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="surface" type="int" />
<argument index="2" name="material" type="RID" />
<description>
Sets the material of a specific surface. Equivalent to [method MeshInstance.set_surface_material].
</description>
</method>
<method name="instance_set_transform">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="transform" type="Transform" />
<description>
Sets the world space transform of the instance. Equivalent to [member Spatial.transform].
</description>
</method>
<method name="instance_set_use_lightmap">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="lightmap_instance" type="RID" />
<argument index="2" name="lightmap" type="RID" />
<argument index="3" name="lightmap_slice" type="int" default="-1" />
<argument index="4" name="lightmap_uv_rect" type="Rect2" default="Rect2( 0, 0, 1, 1 )" />
<description>
Sets the lightmap to use with this instance.
</description>
</method>
<method name="instance_set_visible">
<return type="void" />
<argument index="0" name="instance" type="RID" />
<argument index="1" name="visible" type="bool" />
<description>
Sets whether an instance is drawn or not. Equivalent to [member Spatial.visible].
</description>
</method>
<method name="instances_cull_aabb" qualifiers="const">
<return type="Array" />
<argument index="0" name="aabb" type="AABB" />
<argument index="1" name="scenario" type="RID" />
<description>
Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
<method name="instances_cull_convex" qualifiers="const">
<return type="Array" />
<argument index="0" name="convex" type="Array" />
<argument index="1" name="scenario" type="RID" />
<description>
Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
<method name="instances_cull_ray" qualifiers="const">
<return type="Array" />
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="to" type="Vector3" />
<argument index="2" name="scenario" type="RID" />
<description>
Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
<method name="light_directional_set_blend_splits">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight.directional_shadow_blend_splits].
</description>
</method>
<method name="light_directional_set_shadow_depth_range_mode">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="range_mode" type="int" enum="VisualServer.LightDirectionalShadowDepthRangeMode" />
<description>
Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options.
</description>
</method>
<method name="light_directional_set_shadow_mode">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="mode" type="int" enum="VisualServer.LightDirectionalShadowMode" />
<description>
Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options.
</description>
</method>
<method name="light_omni_set_shadow_detail">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail" />
<description>
Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to [member OmniLight.omni_shadow_detail].
</description>
</method>
<method name="light_omni_set_shadow_mode">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="mode" type="int" enum="VisualServer.LightOmniShadowMode" />
<description>
Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight.omni_shadow_mode].
</description>
</method>
<method name="light_set_bake_mode">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="bake_mode" type="int" enum="VisualServer.LightBakeMode" />
<description>
Sets the bake mode for this light, see [enum LightBakeMode] for options. The bake mode affects how the light will be baked in [BakedLightmap]s and [GIProbe]s.
</description>
</method>
<method name="light_set_color">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Sets the color of the light. Equivalent to [member Light.light_color].
</description>
</method>
<method name="light_set_cull_mask">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="mask" type="int" />
<description>
Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [member Light.light_cull_mask].
</description>
</method>
<method name="light_set_negative">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light.light_negative].
</description>
</method>
<method name="light_set_param">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="param" type="int" enum="VisualServer.LightParam" />
<argument index="2" name="value" type="float" />
<description>
Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param].
</description>
</method>
<method name="light_set_projector">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="texture" type="RID" />
<description>
Not implemented in Godot 3.x.
</description>
</method>
<method name="light_set_reverse_cull_face_mode">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light.shadow_reverse_cull_face].
</description>
</method>
<method name="light_set_shadow">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], light will cast shadows. Equivalent to [member Light.shadow_enabled].
</description>
</method>
<method name="light_set_shadow_color">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color].
</description>
</method>
<method name="light_set_use_gi">
<return type="void" />
<argument index="0" name="light" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
Sets whether GI probes capture light information from this light. [i]Deprecated method.[/i] Use [method light_set_bake_mode] instead. This method is only kept for compatibility reasons and calls [method light_set_bake_mode] internally, setting the bake mode to [constant LIGHT_BAKE_DISABLED] or [constant LIGHT_BAKE_INDIRECT] depending on the given parameter.
</description>
</method>
<method name="lightmap_capture_create">
<return type="RID" />
<description>
Creates a lightmap capture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="lightmap_capture_get_bounds" qualifiers="const">
<return type="AABB" />
<argument index="0" name="capture" type="RID" />
<description>
Returns the size of the lightmap capture area.
</description>
</method>
<method name="lightmap_capture_get_energy" qualifiers="const">
<return type="float" />
<argument index="0" name="capture" type="RID" />
<description>
Returns the energy multiplier used by the lightmap capture.
</description>
</method>
<method name="lightmap_capture_get_octree" qualifiers="const">
<return type="PoolByteArray" />
<argument index="0" name="capture" type="RID" />
<description>
Returns the octree used by the lightmap capture.
</description>
</method>
<method name="lightmap_capture_get_octree_cell_subdiv" qualifiers="const">
<return type="int" />
<argument index="0" name="capture" type="RID" />
<description>
Returns the cell subdivision amount used by this lightmap capture's octree.
</description>
</method>
<method name="lightmap_capture_get_octree_cell_transform" qualifiers="const">
<return type="Transform" />
<argument index="0" name="capture" type="RID" />
<description>
Returns the cell transform for this lightmap capture's octree.
</description>
</method>
<method name="lightmap_capture_is_interior" qualifiers="const">
<return type="bool" />
<argument index="0" name="capture" type="RID" />
<description>
Returns [code]true[/code] if capture is in "interior" mode.
</description>
</method>
<method name="lightmap_capture_set_bounds">
<return type="void" />
<argument index="0" name="capture" type="RID" />
<argument index="1" name="bounds" type="AABB" />
<description>
Sets the size of the area covered by the lightmap capture. Equivalent to [member BakedLightmapData.bounds].
</description>
</method>
<method name="lightmap_capture_set_energy">
<return type="void" />
<argument index="0" name="capture" type="RID" />
<argument index="1" name="energy" type="float" />
<description>
Sets the energy multiplier for this lightmap capture. Equivalent to [member BakedLightmapData.energy].
</description>
</method>
<method name="lightmap_capture_set_interior">
<return type="void" />
<argument index="0" name="capture" type="RID" />
<argument index="1" name="interior" type="bool" />
<description>
Sets the "interior" mode for this lightmap capture. Equivalent to [member BakedLightmapData.interior].
</description>
</method>
<method name="lightmap_capture_set_octree">
<return type="void" />
<argument index="0" name="capture" type="RID" />
<argument index="1" name="octree" type="PoolByteArray" />
<description>
Sets the octree to be used by this lightmap capture. This function is normally used by the [BakedLightmap] node. Equivalent to [member BakedLightmapData.octree].
</description>
</method>
<method name="lightmap_capture_set_octree_cell_subdiv">
<return type="void" />
<argument index="0" name="capture" type="RID" />
<argument index="1" name="subdiv" type="int" />
<description>
Sets the subdivision level of this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_subdiv].
</description>
</method>
<method name="lightmap_capture_set_octree_cell_transform">
<return type="void" />
<argument index="0" name="capture" type="RID" />
<argument index="1" name="xform" type="Transform" />
<description>
Sets the octree cell transform for this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_space_transform].
</description>
</method>
<method name="make_sphere_mesh">
<return type="RID" />
<argument index="0" name="latitudes" type="int" />
<argument index="1" name="longitudes" type="int" />
<argument index="2" name="radius" type="float" />
<description>
Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions.
</description>
</method>
<method name="material_create">
<return type="RID" />
<description>
Creates an empty material and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="material_get_param" qualifiers="const">
<return type="Variant" />
<argument index="0" name="material" type="RID" />
<argument index="1" name="parameter" type="String" />
<description>
Returns the value of a certain material's parameter.
</description>
</method>
<method name="material_get_param_default" qualifiers="const">
<return type="Variant" />
<argument index="0" name="material" type="RID" />
<argument index="1" name="parameter" type="String" />
<description>
Returns the default value for the param if available. Returns [code]null[/code] otherwise.
</description>
</method>
<method name="material_get_shader" qualifiers="const">
<return type="RID" />
<argument index="0" name="shader_material" type="RID" />
<description>
Returns the shader of a certain material's shader. Returns an empty RID if the material doesn't have a shader.
</description>
</method>
<method name="material_set_line_width">
<return type="void" />
<argument index="0" name="material" type="RID" />
<argument index="1" name="width" type="float" />
<description>
Sets a material's line width.
</description>
</method>
<method name="material_set_next_pass">
<return type="void" />
<argument index="0" name="material" type="RID" />
<argument index="1" name="next_material" type="RID" />
<description>
Sets an object's next material.
</description>
</method>
<method name="material_set_param">
<return type="void" />
<argument index="0" name="material" type="RID" />
<argument index="1" name="parameter" type="String" />
<argument index="2" name="value" type="Variant" />
<description>
Sets a material's parameter.
</description>
</method>
<method name="material_set_render_priority">
<return type="void" />
<argument index="0" name="material" type="RID" />
<argument index="1" name="priority" type="int" />
<description>
Sets a material's render priority.
</description>
</method>
<method name="material_set_shader">
<return type="void" />
<argument index="0" name="shader_material" type="RID" />
<argument index="1" name="shader" type="RID" />
<description>
Sets a shader material's shader.
</description>
</method>
<method name="mesh_add_surface_from_arrays">
<return type="void" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="primitive" type="int" enum="VisualServer.PrimitiveType" />
<argument index="2" name="arrays" type="Array" />
<argument index="3" name="blend_shapes" type="Array" default="[ ]" />
<argument index="4" name="compress_format" type="int" default="2194432" />
<description>
Adds a surface generated from the Arrays to a mesh. See [enum PrimitiveType] constants for types.
</description>
</method>
<method name="mesh_clear">
<return type="void" />
<argument index="0" name="mesh" type="RID" />
<description>
Removes all surfaces from a mesh.
</description>
</method>
<method name="mesh_create">
<return type="RID" />
<description>
Creates a new mesh and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="mesh_get_blend_shape_count" qualifiers="const">
<return type="int" />
<argument index="0" name="mesh" type="RID" />
<description>
Returns a mesh's blend shape count.
</description>
</method>
<method name="mesh_get_blend_shape_mode" qualifiers="const">
<return type="int" enum="VisualServer.BlendShapeMode" />
<argument index="0" name="mesh" type="RID" />
<description>
Returns a mesh's blend shape mode.
</description>
</method>
<method name="mesh_get_custom_aabb" qualifiers="const">
<return type="AABB" />
<argument index="0" name="mesh" type="RID" />
<description>
Returns a mesh's custom aabb.
</description>
</method>
<method name="mesh_get_surface_count" qualifiers="const">
<return type="int" />
<argument index="0" name="mesh" type="RID" />
<description>
Returns a mesh's number of surfaces.
</description>
</method>
<method name="mesh_remove_surface">
<return type="void" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="index" type="int" />
<description>
Removes a mesh's surface.
</description>
</method>
<method name="mesh_set_blend_shape_count">
<return type="void" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="amount" type="int" />
<description>
Sets a mesh's blend shape count.
</description>
</method>
<method name="mesh_set_blend_shape_mode">
<return type="void" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="mode" type="int" enum="VisualServer.BlendShapeMode" />
<description>
Sets a mesh's blend shape mode.
</description>
</method>
<method name="mesh_set_custom_aabb">
<return type="void" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="aabb" type="AABB" />
<description>
Sets a mesh's custom aabb.
</description>
</method>
<method name="mesh_surface_get_aabb" qualifiers="const">
<return type="AABB" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's aabb.
</description>
</method>
<method name="mesh_surface_get_array" qualifiers="const">
<return type="PoolByteArray" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's vertex buffer.
</description>
</method>
<method name="mesh_surface_get_array_index_len" qualifiers="const">
<return type="int" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's amount of indices.
</description>
</method>
<method name="mesh_surface_get_array_len" qualifiers="const">
<return type="int" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's amount of vertices.
</description>
</method>
<method name="mesh_surface_get_arrays" qualifiers="const">
<return type="Array" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's buffer arrays.
</description>
</method>
<method name="mesh_surface_get_blend_shape_arrays" qualifiers="const">
<return type="Array" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's arrays for blend shapes.
</description>
</method>
<method name="mesh_surface_get_format" qualifiers="const">
<return type="int" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns the format of a mesh's surface.
</description>
</method>
<method name="mesh_surface_get_format_offset" qualifiers="const">
<return type="int" />
<argument index="0" name="format" type="int" />
<argument index="1" name="vertex_len" type="int" />
<argument index="2" name="index_len" type="int" />
<argument index="3" name="array_index" type="int" />
<description>
Function is unused in Godot 3.x.
</description>
</method>
<method name="mesh_surface_get_format_stride" qualifiers="const">
<return type="int" />
<argument index="0" name="format" type="int" />
<argument index="1" name="vertex_len" type="int" />
<argument index="2" name="index_len" type="int" />
<argument index="3" name="array_index" type="int" />
<description>
</description>
</method>
<method name="mesh_surface_get_index_array" qualifiers="const">
<return type="PoolByteArray" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's index buffer.
</description>
</method>
<method name="mesh_surface_get_material" qualifiers="const">
<return type="RID" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's material.
</description>
</method>
<method name="mesh_surface_get_primitive_type" qualifiers="const">
<return type="int" enum="VisualServer.PrimitiveType" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns the primitive type of a mesh's surface.
</description>
</method>
<method name="mesh_surface_get_skeleton_aabb" qualifiers="const">
<return type="Array" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<description>
Returns the aabb of a mesh's surface's skeleton.
</description>
</method>
<method name="mesh_surface_set_material">
<return type="void" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<argument index="2" name="material" type="RID" />
<description>
Sets a mesh's surface's material.
</description>
</method>
<method name="mesh_surface_update_region">
<return type="void" />
<argument index="0" name="mesh" type="RID" />
<argument index="1" name="surface" type="int" />
<argument index="2" name="offset" type="int" />
<argument index="3" name="data" type="PoolByteArray" />
<description>
Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh.
</description>
</method>
<method name="multimesh_allocate">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="instances" type="int" />
<argument index="2" name="transform_format" type="int" enum="VisualServer.MultimeshTransformFormat" />
<argument index="3" name="color_format" type="int" enum="VisualServer.MultimeshColorFormat" />
<argument index="4" name="custom_data_format" type="int" enum="VisualServer.MultimeshCustomDataFormat" default="0" />
<description>
Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [enum MultimeshTransformFormat], [enum MultimeshColorFormat], and [enum MultimeshCustomDataFormat] for usage. Equivalent to [member MultiMesh.instance_count].
</description>
</method>
<method name="multimesh_create">
<return type="RID" />
<description>
Creates a new multimesh on the VisualServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="multimesh_get_aabb" qualifiers="const">
<return type="AABB" />
<argument index="0" name="multimesh" type="RID" />
<description>
Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh.
</description>
</method>
<method name="multimesh_get_instance_count" qualifiers="const">
<return type="int" />
<argument index="0" name="multimesh" type="RID" />
<description>
Returns the number of instances allocated for this multimesh.
</description>
</method>
<method name="multimesh_get_mesh" qualifiers="const">
<return type="RID" />
<argument index="0" name="multimesh" type="RID" />
<description>
Returns the RID of the mesh that will be used in drawing this multimesh.
</description>
</method>
<method name="multimesh_get_visible_instances" qualifiers="const">
<return type="int" />
<argument index="0" name="multimesh" type="RID" />
<description>
Returns the number of visible instances for this multimesh.
</description>
</method>
<method name="multimesh_instance_get_color" qualifiers="const">
<return type="Color" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="index" type="int" />
<description>
Returns the color by which the specified instance will be modulated.
</description>
</method>
<method name="multimesh_instance_get_custom_data" qualifiers="const">
<return type="Color" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="index" type="int" />
<description>
Returns the custom data associated with the specified instance.
</description>
</method>
<method name="multimesh_instance_get_transform" qualifiers="const">
<return type="Transform" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="index" type="int" />
<description>
Returns the [Transform] of the specified instance.
</description>
</method>
<method name="multimesh_instance_get_transform_2d" qualifiers="const">
<return type="Transform2D" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="index" type="int" />
<description>
Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms.
</description>
</method>
<method name="multimesh_instance_reset_physics_interpolation">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="index" type="int" />
<description>
Prevents physics interpolation for the specified instance during the current physics tick.
This is useful when moving an instance to a new location, to give an instantaneous change rather than interpolation from the previous location.
</description>
</method>
<method name="multimesh_instance_set_color">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="index" type="int" />
<argument index="2" name="color" type="Color" />
<description>
Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color].
</description>
</method>
<method name="multimesh_instance_set_custom_data">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="index" type="int" />
<argument index="2" name="custom_data" type="Color" />
<description>
Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data].
</description>
</method>
<method name="multimesh_instance_set_transform">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="index" type="int" />
<argument index="2" name="transform" type="Transform" />
<description>
Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform].
</description>
</method>
<method name="multimesh_instance_set_transform_2d">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="index" type="int" />
<argument index="2" name="transform" type="Transform2D" />
<description>
Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d].
</description>
</method>
<method name="multimesh_set_as_bulk_array">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="array" type="PoolRealArray" />
<description>
Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative.
All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc.
[Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats.
</description>
</method>
<method name="multimesh_set_as_bulk_array_interpolated">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="array" type="PoolRealArray" />
<argument index="2" name="array_previous" type="PoolRealArray" />
<description>
Alternative version of [method multimesh_set_as_bulk_array] for use with physics interpolation.
Takes both an array of current data and an array of data for the previous physics tick.
</description>
</method>
<method name="multimesh_set_mesh">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="mesh" type="RID" />
<description>
Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh].
</description>
</method>
<method name="multimesh_set_physics_interpolated">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="interpolated" type="bool" />
<description>
Turns on and off physics interpolation for the [MultiMesh].
</description>
</method>
<method name="multimesh_set_physics_interpolation_quality">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="quality" type="int" enum="VisualServer.MultimeshPhysicsInterpolationQuality" />
<description>
Sets the physics interpolation quality for the [MultiMesh].
A value of [code]0[/code] gives fast but low quality interpolation, a value of [code]1[/code] gives slower but higher quality interpolation.
</description>
</method>
<method name="multimesh_set_visible_instances">
<return type="void" />
<argument index="0" name="multimesh" type="RID" />
<argument index="1" name="visible" type="int" />
<description>
Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count].
</description>
</method>
<method name="omni_light_create">
<return type="RID" />
<description>
Creates a new omni light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="particles_create">
<return type="RID" />
<description>
Creates a particle system and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="particles_get_current_aabb">
<return type="AABB" />
<argument index="0" name="particles" type="RID" />
<description>
Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb].
</description>
</method>
<method name="particles_get_emitting">
<return type="bool" />
<argument index="0" name="particles" type="RID" />
<description>
Returns [code]true[/code] if particles are currently set to emitting.
</description>
</method>
<method name="particles_is_inactive">
<return type="bool" />
<argument index="0" name="particles" type="RID" />
<description>
Returns [code]true[/code] if particles are not emitting and particles are set to inactive.
</description>
</method>
<method name="particles_request_process">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<description>
Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray].
</description>
</method>
<method name="particles_restart">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<description>
Reset the particles on the next update. Equivalent to [method Particles.restart].
</description>
</method>
<method name="particles_set_amount">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="amount" type="int" />
<description>
Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member Particles.amount].
</description>
</method>
<method name="particles_set_custom_aabb">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="aabb" type="AABB" />
<description>
Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb].
</description>
</method>
<method name="particles_set_draw_order">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="order" type="int" enum="VisualServer.ParticlesDrawOrder" />
<description>
Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member Particles.draw_order].
</description>
</method>
<method name="particles_set_draw_pass_mesh">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="pass" type="int" />
<argument index="2" name="mesh" type="RID" />
<description>
Sets the mesh to be used for the specified draw pass. Equivalent to [member Particles.draw_pass_1], [member Particles.draw_pass_2], [member Particles.draw_pass_3], and [member Particles.draw_pass_4].
</description>
</method>
<method name="particles_set_draw_passes">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="count" type="int" />
<description>
Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes].
</description>
</method>
<method name="particles_set_emission_transform">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="transform" type="Transform" />
<description>
Sets the [Transform] that will be used by the particles when they first emit.
</description>
</method>
<method name="particles_set_emitting">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="emitting" type="bool" />
<description>
If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member Particles.emitting].
</description>
</method>
<method name="particles_set_explosiveness_ratio">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="ratio" type="float" />
<description>
Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness].
</description>
</method>
<method name="particles_set_fixed_fps">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="fps" type="int" />
<description>
Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps].
</description>
</method>
<method name="particles_set_fractional_delta">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta].
</description>
</method>
<method name="particles_set_lifetime">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="lifetime" type="float" />
<description>
Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime].
</description>
</method>
<method name="particles_set_one_shot">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="one_shot" type="bool" />
<description>
If [code]true[/code], particles will emit once and then stop. Equivalent to [member Particles.one_shot].
</description>
</method>
<method name="particles_set_pre_process_time">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="time" type="float" />
<description>
Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member Particles.preprocess].
</description>
</method>
<method name="particles_set_process_material">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="material" type="RID" />
<description>
Sets the material for processing the particles.
[b]Note:[/b] This is not the material used to draw the materials. Equivalent to [member Particles.process_material].
</description>
</method>
<method name="particles_set_randomness_ratio">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="ratio" type="float" />
<description>
Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member Particles.randomness].
</description>
</method>
<method name="particles_set_speed_scale">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="scale" type="float" />
<description>
Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale].
</description>
</method>
<method name="particles_set_use_local_coordinates">
<return type="void" />
<argument index="0" name="particles" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member Particles.local_coords].
</description>
</method>
<method name="reflection_probe_create">
<return type="RID" />
<description>
Creates a reflection probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]reflection_probe_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="reflection_probe_set_as_interior">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable].
</description>
</method>
<method name="reflection_probe_set_cull_mask">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="layers" type="int" />
<description>
Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask].
</description>
</method>
<method name="reflection_probe_set_enable_box_projection">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection].
</description>
</method>
<method name="reflection_probe_set_enable_shadows">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="enable" type="bool" />
<description>
If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows].
</description>
</method>
<method name="reflection_probe_set_extents">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="extents" type="Vector3" />
<description>
Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents].
</description>
</method>
<method name="reflection_probe_set_intensity">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="intensity" type="float" />
<description>
Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity].
</description>
</method>
<method name="reflection_probe_set_interior_ambient">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="color" type="Color" />
<description>
Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color].
</description>
</method>
<method name="reflection_probe_set_interior_ambient_energy">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="energy" type="float" />
<description>
Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy].
</description>
</method>
<method name="reflection_probe_set_interior_ambient_probe_contribution">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="contrib" type="float" />
<description>
Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib].
</description>
</method>
<method name="reflection_probe_set_max_distance">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="distance" type="float" />
<description>
Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance].
</description>
</method>
<method name="reflection_probe_set_origin_offset">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="offset" type="Vector3" />
<description>
Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset].
</description>
</method>
<method name="reflection_probe_set_update_mode">
<return type="void" />
<argument index="0" name="probe" type="RID" />
<argument index="1" name="mode" type="int" enum="VisualServer.ReflectionProbeUpdateMode" />
<description>
Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options.
</description>
</method>
<method name="request_frame_drawn_callback">
<return type="void" />
<argument index="0" name="where" type="Object" />
<argument index="1" name="method" type="String" />
<argument index="2" name="userdata" type="Variant" />
<description>
Schedules a callback to the corresponding named [code]method[/code] on [code]where[/code] after a frame has been drawn.
The callback method must use only 1 argument which will be called with [code]userdata[/code].
</description>
</method>
<method name="scenario_create">
<return type="RID" />
<description>
Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
The scenario is the 3D world that all the visual instances exist in.
</description>
</method>
<method name="scenario_set_debug">
<return type="void" />
<argument index="0" name="scenario" type="RID" />
<argument index="1" name="debug_mode" type="int" enum="VisualServer.ScenarioDebugMode" />
<description>
Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options.
</description>
</method>
<method name="scenario_set_environment">
<return type="void" />
<argument index="0" name="scenario" type="RID" />
<argument index="1" name="environment" type="RID" />
<description>
Sets the environment that will be used with this scenario.
</description>
</method>
<method name="scenario_set_fallback_environment">
<return type="void" />
<argument index="0" name="scenario" type="RID" />
<argument index="1" name="environment" type="RID" />
<description>
Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment.
</description>
</method>
<method name="scenario_set_reflection_atlas_size">
<return type="void" />
<argument index="0" name="scenario" type="RID" />
<argument index="1" name="size" type="int" />
<argument index="2" name="subdiv" type="int" />
<description>
Sets the size of the reflection atlas shared by all reflection probes in this scenario.
</description>
</method>
<method name="set_boot_image">
<return type="void" />
<argument index="0" name="image" type="Image" />
<argument index="1" name="color" type="Color" />
<argument index="2" name="scale" type="bool" />
<argument index="3" name="use_filter" type="bool" default="true" />
<description>
Sets a boot image. The color defines the background color. If [code]scale[/code] is [code]true[/code], the image will be scaled to fit the screen size. If [code]use_filter[/code] is [code]true[/code], the image will be scaled with linear interpolation. If [code]use_filter[/code] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation.
</description>
</method>
<method name="set_debug_generate_wireframes">
<return type="void" />
<argument index="0" name="generate" type="bool" />
<description>
If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode.
</description>
</method>
<method name="set_default_clear_color">
<return type="void" />
<argument index="0" name="color" type="Color" />
<description>
Sets the default clear color which is used when a specific clear color has not been selected.
</description>
</method>
<method name="set_shader_async_hidden_forbidden">
<return type="void" />
<argument index="0" name="forbidden" type="bool" />
<description>
If asynchronous shader compilation is enabled, this controls whether [constant Material3D.ASYNC_MODE_HIDDEN] is obeyed.
For instance, you may want to enable this temporarily before taking a screenshot. This ensures everything is visible even if shaders with async mode [i]hidden[/i] are not ready yet.
Reflection probes use this internally to ensure they capture everything regardless the shaders are ready or not.
</description>
</method>
<method name="set_shader_time_scale">
<return type="void" />
<argument index="0" name="scale" type="float" />
<description>
Sets the scale to apply to the passage of time for the shaders' [code]TIME[/code] builtin.
The default value is [code]1.0[/code], which means [code]TIME[/code] will count the real time as it goes by, without narrowing or stretching it.
</description>
</method>
<method name="set_use_occlusion_culling">
<return type="void" />
<argument index="0" name="enable" type="bool" />
<description>
Enables or disables occlusion culling.
</description>
</method>
<method name="shader_create">
<return type="RID" />
<description>
Creates an empty shader and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="shader_get_code" qualifiers="const">
<return type="String" />
<argument index="0" name="shader" type="RID" />
<description>
Returns a shader's code.
</description>
</method>
<method name="shader_get_default_texture_param" qualifiers="const">
<return type="RID" />
<argument index="0" name="shader" type="RID" />
<argument index="1" name="name" type="String" />
<description>
Returns a default texture from a shader searched by name.
</description>
</method>
<method name="shader_get_param_list" qualifiers="const">
<return type="Array" />
<argument index="0" name="shader" type="RID" />
<description>
Returns the parameters of a shader.
</description>
</method>
<method name="shader_set_code">
<return type="void" />
<argument index="0" name="shader" type="RID" />
<argument index="1" name="code" type="String" />
<description>
Sets a shader's code.
</description>
</method>
<method name="shader_set_default_texture_param">
<return type="void" />
<argument index="0" name="shader" type="RID" />
<argument index="1" name="name" type="String" />
<argument index="2" name="texture" type="RID" />
<description>
Sets a shader's default texture. Overwrites the texture given by name.
</description>
</method>
<method name="skeleton_allocate">
<return type="void" />
<argument index="0" name="skeleton" type="RID" />
<argument index="1" name="bones" type="int" />
<argument index="2" name="is_2d_skeleton" type="bool" default="false" />
<description>
Allocates the GPU buffers for this skeleton.
</description>
</method>
<method name="skeleton_bone_get_transform" qualifiers="const">
<return type="Transform" />
<argument index="0" name="skeleton" type="RID" />
<argument index="1" name="bone" type="int" />
<description>
Returns the [Transform] set for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_get_transform_2d" qualifiers="const">
<return type="Transform2D" />
<argument index="0" name="skeleton" type="RID" />
<argument index="1" name="bone" type="int" />
<description>
Returns the [Transform2D] set for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_set_transform">
<return type="void" />
<argument index="0" name="skeleton" type="RID" />
<argument index="1" name="bone" type="int" />
<argument index="2" name="transform" type="Transform" />
<description>
Sets the [Transform] for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_set_transform_2d">
<return type="void" />
<argument index="0" name="skeleton" type="RID" />
<argument index="1" name="bone" type="int" />
<argument index="2" name="transform" type="Transform2D" />
<description>
Sets the [Transform2D] for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_create">
<return type="RID" />
<description>
Creates a skeleton and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="skeleton_get_bone_count" qualifiers="const">
<return type="int" />
<argument index="0" name="skeleton" type="RID" />
<description>
Returns the number of bones allocated for this skeleton.
</description>
</method>
<method name="sky_create">
<return type="RID" />
<description>
Creates an empty sky and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]sky_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="sky_set_texture">
<return type="void" />
<argument index="0" name="sky" type="RID" />
<argument index="1" name="cube_map" type="RID" />
<argument index="2" name="radiance_size" type="int" />
<description>
Sets a sky's texture.
</description>
</method>
<method name="spot_light_create">
<return type="RID" />
<description>
Creates a spot light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID.
</description>
</method>
<method name="sync">
<return type="void" />
<description>
Not implemented in Godot 3.x.
</description>
</method>
<method name="texture_allocate">
<return type="void" />
<argument index="0" name="texture" type="RID" />
<argument index="1" name="width" type="int" />
<argument index="2" name="height" type="int" />
<argument index="3" name="depth_3d" type="int" />
<argument index="4" name="format" type="int" enum="Image.Format" />
<argument index="5" name="type" type="int" enum="VisualServer.TextureType" />
<argument index="6" name="flags" type="int" default="7" />
<description>
Allocates the GPU memory for the texture.
</description>
</method>
<method name="texture_bind">
<return type="void" />
<argument index="0" name="texture" type="RID" />
<argument index="1" name="number" type="int" />
<description>
Binds the texture to a texture slot.
</description>
</method>
<method name="texture_create">
<return type="RID" />
<description>
Creates an empty texture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="texture_create_from_image">
<return type="RID" />
<argument index="0" name="image" type="Image" />
<argument index="1" name="flags" type="int" default="7" />
<description>
Creates a texture, allocates the space for an image, and fills in the image.
</description>
</method>
<method name="texture_debug_usage">
<return type="Array" />
<description>
Returns a list of all the textures and their information.
</description>
</method>
<method name="texture_get_data" qualifiers="const">
<return type="Image" />
<argument index="0" name="texture" type="RID" />
<argument index="1" name="cube_side" type="int" default="0" />
<description>
Returns a copy of a texture's image unless it's a CubeMap, in which case it returns the [RID] of the image at one of the cubes sides.
</description>
</method>
<method name="texture_get_depth" qualifiers="const">
<return type="int" />
<argument index="0" name="texture" type="RID" />
<description>
Returns the depth of the texture.
</description>
</method>
<method name="texture_get_flags" qualifiers="const">
<return type="int" />
<argument index="0" name="texture" type="RID" />
<description>
Returns the flags of a texture.
</description>
</method>
<method name="texture_get_format" qualifiers="const">
<return type="int" enum="Image.Format" />
<argument index="0" name="texture" type="RID" />
<description>
Returns the format of the texture's image.
</description>
</method>
<method name="texture_get_height" qualifiers="const">
<return type="int" />
<argument index="0" name="texture" type="RID" />
<description>
Returns the texture's height.
</description>
</method>
<method name="texture_get_path" qualifiers="const">
<return type="String" />
<argument index="0" name="texture" type="RID" />
<description>
Returns the texture's path.
</description>
</method>
<method name="texture_get_texid" qualifiers="const">
<return type="int" />
<argument index="0" name="texture" type="RID" />
<description>
Returns the opengl id of the texture's image.
</description>
</method>
<method name="texture_get_type" qualifiers="const">
<return type="int" enum="VisualServer.TextureType" />
<argument index="0" name="texture" type="RID" />
<description>
Returns the type of the texture, can be any of the [enum TextureType].
</description>
</method>
<method name="texture_get_width" qualifiers="const">
<return type="int" />
<argument index="0" name="texture" type="RID" />
<description>
Returns the texture's width.
</description>
</method>
<method name="texture_set_data">
<return type="void" />
<argument index="0" name="texture" type="RID" />
<argument index="1" name="image" type="Image" />
<argument index="2" name="layer" type="int" default="0" />
<description>
Sets the texture's image data. If it's a CubeMap, it sets the image data at a cube side.
</description>
</method>
<method name="texture_set_data_partial">
<return type="void" />
<argument index="0" name="texture" type="RID" />
<argument index="1" name="image" type="Image" />
<argument index="2" name="src_x" type="int" />
<argument index="3" name="src_y" type="int" />
<argument index="4" name="src_w" type="int" />
<argument index="5" name="src_h" type="int" />
<argument index="6" name="dst_x" type="int" />
<argument index="7" name="dst_y" type="int" />
<argument index="8" name="dst_mip" type="int" />
<argument index="9" name="layer" type="int" default="0" />
<description>
Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly.
</description>
</method>
<method name="texture_set_flags">
<return type="void" />
<argument index="0" name="texture" type="RID" />
<argument index="1" name="flags" type="int" />
<description>
Sets the texture's flags. See [enum TextureFlags] for options.
</description>
</method>
<method name="texture_set_path">
<return type="void" />
<argument index="0" name="texture" type="RID" />
<argument index="1" name="path" type="String" />
<description>
Sets the texture's path.
</description>
</method>
<method name="texture_set_proxy">
<return type="void" />
<argument index="0" name="proxy" type="RID" />
<argument index="1" name="base" type="RID" />
<description>
Creates an update link between two textures, similar to how [ViewportTexture]s operate. When the base texture is the texture of a [Viewport], every time the viewport renders a new frame, the proxy texture automatically receives an update.
For example, this code links a generic [ImageTexture] to the texture output of the [Viewport] using the VisualServer API:
[codeblock]
func _ready():
var viewport_rid = get_viewport().get_viewport_rid()
var viewport_texture_rid = VisualServer.viewport_get_texture(viewport_rid)
var proxy_texture = ImageTexture.new()
var viewport_texture_image_data = VisualServer.texture_get_data(viewport_texture_rid)
proxy_texture.create_from_image(viewport_texture_image_data)
var proxy_texture_rid = proxy_texture.get_rid()
VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)
$TextureRect.texture = proxy_texture
[/codeblock]
</description>
</method>
<method name="texture_set_shrink_all_x2_on_set_data">
<return type="void" />
<argument index="0" name="shrink" type="bool" />
<description>
If [code]true[/code], sets internal processes to shrink all image data to half the size.
</description>
</method>
<method name="texture_set_size_override">
<return type="void" />
<argument index="0" name="texture" type="RID" />
<argument index="1" name="width" type="int" />
<argument index="2" name="height" type="int" />
<argument index="3" name="depth" type="int" />
<description>
Resizes the texture to the specified dimensions.
</description>
</method>
<method name="textures_keep_original">
<return type="void" />
<argument index="0" name="enable" type="bool" />
<description>
If [code]true[/code], the image will be stored in the texture's images array if overwritten.
</description>
</method>
<method name="viewport_attach_camera">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="camera" type="RID" />
<description>
Sets a viewport's camera.
</description>
</method>
<method name="viewport_attach_canvas">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="canvas" type="RID" />
<description>
Sets a viewport's canvas.
</description>
</method>
<method name="viewport_attach_to_screen">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="rect" type="Rect2" default="Rect2( 0, 0, 0, 0 )" />
<argument index="2" name="screen" type="int" default="0" />
<description>
Copies viewport to a region of the screen specified by [code]rect[/code]. If [member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
For example, you can set the root viewport to not render at all with the following code:
[codeblock]
func _ready():
get_viewport().set_attach_to_screen_rect(Rect2())
$Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))
[/codeblock]
Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see [method viewport_set_render_direct_to_screen].
</description>
</method>
<method name="viewport_create">
<return type="RID" />
<description>
Creates an empty viewport and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/code] VisualServer functions.
Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method.
</description>
</method>
<method name="viewport_detach">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<description>
Detaches the viewport from the screen.
</description>
</method>
<method name="viewport_get_render_info">
<return type="int" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="info" type="int" enum="VisualServer.ViewportRenderInfo" />
<description>
Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants.
</description>
</method>
<method name="viewport_get_texture" qualifiers="const">
<return type="RID" />
<argument index="0" name="viewport" type="RID" />
<description>
Returns the viewport's last rendered frame.
</description>
</method>
<method name="viewport_remove_canvas">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="canvas" type="RID" />
<description>
Detaches a viewport from a canvas and vice versa.
</description>
</method>
<method name="viewport_set_active">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="active" type="bool" />
<description>
If [code]true[/code], sets the viewport active, else sets it inactive.
</description>
</method>
<method name="viewport_set_canvas_stacking">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="canvas" type="RID" />
<argument index="2" name="layer" type="int" />
<argument index="3" name="sublayer" type="int" />
<description>
Sets the stacking order for a viewport's canvas.
[code]layer[/code] is the actual canvas layer, while [code]sublayer[/code] specifies the stacking order of the canvas among those in the same layer.
</description>
</method>
<method name="viewport_set_canvas_transform">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="canvas" type="RID" />
<argument index="2" name="offset" type="Transform2D" />
<description>
Sets the transformation of a viewport's canvas.
</description>
</method>
<method name="viewport_set_clear_mode">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="clear_mode" type="int" enum="VisualServer.ViewportClearMode" />
<description>
Sets the clear mode of a viewport. See [enum ViewportClearMode] for options.
</description>
</method>
<method name="viewport_set_debug_draw">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="draw" type="int" enum="VisualServer.ViewportDebugDraw" />
<description>
Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options.
</description>
</method>
<method name="viewport_set_disable_3d">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="disabled" type="bool" />
<description>
If [code]true[/code], a viewport's 3D rendering is disabled.
</description>
</method>
<method name="viewport_set_disable_environment">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="disabled" type="bool" />
<description>
If [code]true[/code], rendering of a viewport's environment is disabled.
</description>
</method>
<method name="viewport_set_global_canvas_transform">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="transform" type="Transform2D" />
<description>
Sets the viewport's global transformation matrix.
</description>
</method>
<method name="viewport_set_hdr">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], the viewport renders to high dynamic range (HDR) instead of standard dynamic range (SDR). See also [method viewport_set_use_32_bpc_depth].
[b]Note:[/b] Only available on the GLES3 backend.
</description>
</method>
<method name="viewport_set_hide_canvas">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="hidden" type="bool" />
<description>
If [code]true[/code], the viewport's canvas is not rendered.
</description>
</method>
<method name="viewport_set_hide_scenario">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="hidden" type="bool" />
<description>
Currently unimplemented in Godot 3.x.
</description>
</method>
<method name="viewport_set_msaa">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="msaa" type="int" enum="VisualServer.ViewportMSAA" />
<description>
Sets the anti-aliasing mode. See [enum ViewportMSAA] for options.
</description>
</method>
<method name="viewport_set_parent_viewport">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="parent_viewport" type="RID" />
<description>
Sets the viewport's parent to another viewport.
</description>
</method>
<method name="viewport_set_render_direct_to_screen">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.
</description>
</method>
<method name="viewport_set_scenario">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="scenario" type="RID" />
<description>
Sets a viewport's scenario.
The scenario contains information about the [enum ScenarioDebugMode], environment information, reflection atlas etc.
</description>
</method>
<method name="viewport_set_shadow_atlas_quadrant_subdivision">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="quadrant" type="int" />
<argument index="2" name="subdivision" type="int" />
<description>
Sets the shadow atlas quadrant's subdivision.
</description>
</method>
<method name="viewport_set_shadow_atlas_size">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="size" type="int" />
<description>
Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
</description>
</method>
<method name="viewport_set_sharpen_intensity">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="intensity" type="float" />
<description>
Sets the sharpening [code]intensity[/code] for the [code]viewport[/code]. If set to a value greater than [code]0.0[/code], contrast-adaptive sharpening will be applied to the 3D viewport. This has a low performance cost and can be used to recover some of the sharpness lost from using FXAA. Values around [code]0.5[/code] generally give the best results. See also [method viewport_set_use_fxaa].
</description>
</method>
<method name="viewport_set_size">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="width" type="int" />
<argument index="2" name="height" type="int" />
<description>
Sets the viewport's width and height.
</description>
</method>
<method name="viewport_set_transparent_background">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], the viewport renders its background as transparent.
</description>
</method>
<method name="viewport_set_update_mode">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="update_mode" type="int" enum="VisualServer.ViewportUpdateMode" />
<description>
Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options.
</description>
</method>
<method name="viewport_set_usage">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="usage" type="int" enum="VisualServer.ViewportUsage" />
<description>
Sets the viewport's 2D/3D mode. See [enum ViewportUsage] constants for options.
</description>
</method>
<method name="viewport_set_use_32_bpc_depth">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], allocates the viewport's framebuffer with full floating-point precision (32-bit) instead of half floating-point precision (16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used on the same [Viewport] to set HDR to [code]true[/code].
[b]Note:[/b] Only available on the GLES3 backend.
</description>
</method>
<method name="viewport_set_use_arvr">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="use_arvr" type="bool" />
<description>
If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [ARVRInterface].
</description>
</method>
<method name="viewport_set_use_debanding">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="debanding" type="bool" />
<description>
If [code]true[/code], uses a fast post-processing filter to make banding significantly less visible. In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.
[b]Note:[/b] Only available on the GLES3 backend. [member Viewport.hdr] must also be [code]true[/code] for debanding to be effective.
</description>
</method>
<method name="viewport_set_use_fxaa">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="fxaa" type="bool" />
<description>
Enables fast approximate antialiasing for this viewport. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. Some of the lost sharpness can be recovered by enabling contrast-adaptive sharpening (see [method viewport_set_sharpen_intensity]).
</description>
</method>
<method name="viewport_set_vflip">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], the viewport's rendering is flipped vertically.
</description>
</method>
</methods>
<members>
<member name="render_loop_enabled" type="bool" setter="set_render_loop_enabled" getter="is_render_loop_enabled">
If [code]false[/code], disables rendering completely, but the engine logic is still being processed. You can call [method force_draw] to draw a frame even with rendering disabled.
</member>
</members>
<signals>
<signal name="frame_post_draw">
<description>
Emitted at the end of the frame, after the VisualServer has finished updating all the Viewports.
</description>
</signal>
<signal name="frame_pre_draw">
<description>
Emitted at the beginning of the frame, before the VisualServer updates all the Viewports.
</description>
</signal>
</signals>
<constants>
<constant name="NO_INDEX_ARRAY" value="-1">
Marks an error that shows that the index array is empty.
</constant>
<constant name="ARRAY_WEIGHTS_SIZE" value="4">
Number of weights/bones per vertex.
</constant>
<constant name="CANVAS_ITEM_Z_MIN" value="-4096">
The minimum Z-layer for canvas items.
</constant>
<constant name="CANVAS_ITEM_Z_MAX" value="4096">
The maximum Z-layer for canvas items.
</constant>
<constant name="MAX_GLOW_LEVELS" value="7">
Max number of glow levels that can be used with glow post-process effect.
</constant>
<constant name="MAX_CURSORS" value="8">
Unused enum in Godot 3.x.
</constant>
<constant name="MATERIAL_RENDER_PRIORITY_MIN" value="-128">
The minimum renderpriority of all materials.
</constant>
<constant name="MATERIAL_RENDER_PRIORITY_MAX" value="127">
The maximum renderpriority of all materials.
</constant>
<constant name="CUBEMAP_LEFT" value="0" enum="CubeMapSide">
Marks the left side of a cubemap.
</constant>
<constant name="CUBEMAP_RIGHT" value="1" enum="CubeMapSide">
Marks the right side of a cubemap.
</constant>
<constant name="CUBEMAP_BOTTOM" value="2" enum="CubeMapSide">
Marks the bottom side of a cubemap.
</constant>
<constant name="CUBEMAP_TOP" value="3" enum="CubeMapSide">
Marks the top side of a cubemap.
</constant>
<constant name="CUBEMAP_FRONT" value="4" enum="CubeMapSide">
Marks the front side of a cubemap.
</constant>
<constant name="CUBEMAP_BACK" value="5" enum="CubeMapSide">
Marks the back side of a cubemap.
</constant>
<constant name="TEXTURE_TYPE_2D" value="0" enum="TextureType">
Normal texture with 2 dimensions, width and height.
</constant>
<constant name="TEXTURE_TYPE_CUBEMAP" value="2" enum="TextureType">
Texture made up of six faces, can be looked up with a [code]vec3[/code] in shader.
</constant>
<constant name="TEXTURE_TYPE_2D_ARRAY" value="3" enum="TextureType">
An array of 2-dimensional textures.
</constant>
<constant name="TEXTURE_TYPE_3D" value="4" enum="TextureType">
A 3-dimensional texture with width, height, and depth.
</constant>
<constant name="TEXTURE_FLAG_MIPMAPS" value="1" enum="TextureFlags">
Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio.
</constant>
<constant name="TEXTURE_FLAG_REPEAT" value="2" enum="TextureFlags">
Repeats the texture (instead of clamp to edge).
</constant>
<constant name="TEXTURE_FLAG_FILTER" value="4" enum="TextureFlags">
Uses a magnifying filter, to enable smooth zooming in of the texture.
</constant>
<constant name="TEXTURE_FLAG_ANISOTROPIC_FILTER" value="8" enum="TextureFlags">
Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios.
This results in better-looking textures when viewed from oblique angles.
</constant>
<constant name="TEXTURE_FLAG_CONVERT_TO_LINEAR" value="16" enum="TextureFlags">
Converts the texture to the sRGB color space.
</constant>
<constant name="TEXTURE_FLAG_MIRRORED_REPEAT" value="32" enum="TextureFlags">
Repeats the texture with alternate sections mirrored.
</constant>
<constant name="TEXTURE_FLAG_USED_FOR_STREAMING" value="2048" enum="TextureFlags">
Texture is a video surface.
</constant>
<constant name="TEXTURE_FLAGS_DEFAULT" value="7" enum="TextureFlags">
Default flags. [constant TEXTURE_FLAG_MIPMAPS], [constant TEXTURE_FLAG_REPEAT] and [constant TEXTURE_FLAG_FILTER] are enabled.
</constant>
<constant name="SHADER_SPATIAL" value="0" enum="ShaderMode">
Shader is a 3D shader.
</constant>
<constant name="SHADER_CANVAS_ITEM" value="1" enum="ShaderMode">
Shader is a 2D shader.
</constant>
<constant name="SHADER_PARTICLES" value="2" enum="ShaderMode">
Shader is a particle shader.
</constant>
<constant name="SHADER_MAX" value="3" enum="ShaderMode">
Represents the size of the [enum ShaderMode] enum.
</constant>
<constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
Array is a vertex array.
</constant>
<constant name="ARRAY_NORMAL" value="1" enum="ArrayType">
Array is a normal array.
</constant>
<constant name="ARRAY_TANGENT" value="2" enum="ArrayType">
Array is a tangent array.
</constant>
<constant name="ARRAY_COLOR" value="3" enum="ArrayType">
Array is a color array.
</constant>
<constant name="ARRAY_TEX_UV" value="4" enum="ArrayType">
Array is an UV coordinates array.
</constant>
<constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
Array is an UV coordinates array for the second UV coordinates.
</constant>
<constant name="ARRAY_BONES" value="6" enum="ArrayType">
Array contains bone information.
</constant>
<constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
Array is weight information.
</constant>
<constant name="ARRAY_INDEX" value="8" enum="ArrayType">
Array is index array.
</constant>
<constant name="ARRAY_MAX" value="9" enum="ArrayType">
Represents the size of the [enum ArrayType] enum.
</constant>
<constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat">
Flag used to mark a vertex array.
</constant>
<constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat">
Flag used to mark a normal array.
</constant>
<constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat">
Flag used to mark a tangent array.
</constant>
<constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat">
Flag used to mark a color array.
</constant>
<constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat">
Flag used to mark an UV coordinates array.
</constant>
<constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat">
Flag used to mark an UV coordinates array for the second UV coordinates.
</constant>
<constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat">
Flag used to mark a bone information array.
</constant>
<constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat">
Flag used to mark a weights array.
</constant>
<constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
Flag used to mark an index array.
</constant>
<constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat">
Flag used to mark a compressed (half float) vertex array.
</constant>
<constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat">
Flag used to mark a compressed (half float) normal array.
</constant>
<constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat">
Flag used to mark a compressed (half float) tangent array.
</constant>
<constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat">
Flag used to mark a compressed (half float) color array.
</constant>
<constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat">
Flag used to mark a compressed (half float) UV coordinates array.
</constant>
<constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat">
Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates.
</constant>
<constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat">
Flag used to mark a compressed bone array.
</constant>
<constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat">
Flag used to mark a compressed (half float) weight array.
</constant>
<constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat">
Flag used to mark a compressed index array.
</constant>
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat">
Flag used to mark that the array contains 2D vertices.
</constant>
<constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat">
Flag used to mark that the array uses 16-bit bones instead of 8-bit.
</constant>
<constant name="ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION" value="2097152" enum="ArrayFormat">
Flag used to mark that the array uses an octahedral representation of normal and tangent vectors rather than cartesian.
</constant>
<constant name="ARRAY_COMPRESS_DEFAULT" value="2194432" enum="ArrayFormat">
Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2], [constant ARRAY_COMPRESS_WEIGHTS], and [constant ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION] quickly.
</constant>
<constant name="PRIMITIVE_POINTS" value="0" enum="PrimitiveType">
Primitive to draw consists of points.
</constant>
<constant name="PRIMITIVE_LINES" value="1" enum="PrimitiveType">
Primitive to draw consists of lines.
</constant>
<constant name="PRIMITIVE_LINE_STRIP" value="2" enum="PrimitiveType">
Primitive to draw consists of a line strip from start to end.
</constant>
<constant name="PRIMITIVE_LINE_LOOP" value="3" enum="PrimitiveType">
Primitive to draw consists of a line loop (a line strip with a line between the last and the first vertex).
</constant>
<constant name="PRIMITIVE_TRIANGLES" value="4" enum="PrimitiveType">
Primitive to draw consists of triangles.
</constant>
<constant name="PRIMITIVE_TRIANGLE_STRIP" value="5" enum="PrimitiveType">
Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle).
</constant>
<constant name="PRIMITIVE_TRIANGLE_FAN" value="6" enum="PrimitiveType">
Primitive to draw consists of a triangle strip (the last 2 vertices are always combined with the first to make a triangle).
</constant>
<constant name="PRIMITIVE_MAX" value="7" enum="PrimitiveType">
Represents the size of the [enum PrimitiveType] enum.
</constant>
<constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
Blend shapes are normalized.
</constant>
<constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode">
Blend shapes are relative to base weight.
</constant>
<constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType">
Is a directional (sun) light.
</constant>
<constant name="LIGHT_OMNI" value="1" enum="LightType">
Is an omni light.
</constant>
<constant name="LIGHT_SPOT" value="2" enum="LightType">
Is a spot light.
</constant>
<constant name="LIGHT_PARAM_ENERGY" value="0" enum="LightParam">
The light's energy.
</constant>
<constant name="LIGHT_PARAM_INDIRECT_ENERGY" value="1" enum="LightParam">
Secondary multiplier used with indirect light (light bounces).
</constant>
<constant name="LIGHT_PARAM_SIZE" value="2" enum="LightParam">
The light's size, currently only used for soft shadows in baked lightmaps.
</constant>
<constant name="LIGHT_PARAM_SPECULAR" value="3" enum="LightParam">
The light's influence on specularity.
</constant>
<constant name="LIGHT_PARAM_RANGE" value="4" enum="LightParam">
The light's range.
</constant>
<constant name="LIGHT_PARAM_ATTENUATION" value="5" enum="LightParam">
The light's attenuation.
</constant>
<constant name="LIGHT_PARAM_SPOT_ANGLE" value="6" enum="LightParam">
The spotlight's angle.
</constant>
<constant name="LIGHT_PARAM_SPOT_ATTENUATION" value="7" enum="LightParam">
The spotlight's attenuation.
</constant>
<constant name="LIGHT_PARAM_CONTACT_SHADOW_SIZE" value="8" enum="LightParam">
Scales the shadow color.
</constant>
<constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="9" enum="LightParam">
Max distance that shadows will be rendered.
</constant>
<constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="10" enum="LightParam">
Proportion of shadow atlas occupied by the first split.
</constant>
<constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="11" enum="LightParam">
Proportion of shadow atlas occupied by the second split.
</constant>
<constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="12" enum="LightParam">
Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest.
</constant>
<constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="13" enum="LightParam">
Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts.
</constant>
<constant name="LIGHT_PARAM_SHADOW_BIAS" value="14" enum="LightParam">
Bias the shadow lookup to fix self-shadowing artifacts.
</constant>
<constant name="LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE" value="15" enum="LightParam">
Increases bias on further splits to fix self-shadowing that only occurs far away from the camera.
</constant>
<constant name="LIGHT_PARAM_SHADOW_FADE_START" value="16" enum="LightParam">
Proportion of [constant LIGHT_PARAM_SHADOW_MAX_DISTANCE] at which point the shadow starts to fade. At [constant LIGHT_PARAM_SHADOW_MAX_DISTANCE], the shadow will disappear. The default value is a balance between smooth fading and distant shadow visibility. If the camera moves fast and the [constant LIGHT_PARAM_SHADOW_MAX_DISTANCE] is low, consider lowering [constant LIGHT_PARAM_SHADOW_FADE_START] below [code]0.8[/code] to make shadow transitions less noticeable. On the other hand, if you tuned [constant LIGHT_PARAM_SHADOW_MAX_DISTANCE] to cover the entire scene, you can set [constant LIGHT_PARAM_SHADOW_FADE_START] to [code]1.0[/code] to prevent the shadow from fading in the distance (it will suddenly cut off instead).
</constant>
<constant name="LIGHT_PARAM_MAX" value="17" enum="LightParam">
Represents the size of the [enum LightParam] enum.
</constant>
<constant name="LIGHT_BAKE_DISABLED" value="0" enum="LightBakeMode">
</constant>
<constant name="LIGHT_BAKE_INDIRECT" value="1" enum="LightBakeMode">
</constant>
<constant name="LIGHT_BAKE_ALL" value="2" enum="LightBakeMode">
</constant>
<constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode">
Use a dual paraboloid shadow map for omni lights.
</constant>
<constant name="LIGHT_OMNI_SHADOW_CUBE" value="1" enum="LightOmniShadowMode">
Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid.
</constant>
<constant name="LIGHT_OMNI_SHADOW_DETAIL_VERTICAL" value="0" enum="LightOmniShadowDetail">
Use more detail vertically when computing shadow map.
</constant>
<constant name="LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL" value="1" enum="LightOmniShadowDetail">
Use more detail horizontally when computing shadow map.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL" value="0" enum="LightDirectionalShadowMode">
Use orthogonal shadow projection for directional light.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS" value="1" enum="LightDirectionalShadowMode">
Use 2 splits for shadow projection when using directional light.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_3_SPLITS" value="2" enum="LightDirectionalShadowMode">
Use 3 splits for shadow projection when using directional light.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS" value="3" enum="LightDirectionalShadowMode">
Use 4 splits for shadow projection when using directional light.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE" value="0" enum="LightDirectionalShadowDepthRangeMode">
Keeps shadows stable as camera moves but has lower effective resolution.
</constant>
<constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="LightDirectionalShadowDepthRangeMode">
Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly.
</constant>
<constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode">
Do not update the viewport.
</constant>
<constant name="VIEWPORT_UPDATE_ONCE" value="1" enum="ViewportUpdateMode">
Update the viewport once then set to disabled.
</constant>
<constant name="VIEWPORT_UPDATE_WHEN_VISIBLE" value="2" enum="ViewportUpdateMode">
Update the viewport whenever it is visible.
</constant>
<constant name="VIEWPORT_UPDATE_ALWAYS" value="3" enum="ViewportUpdateMode">
Always update the viewport.
</constant>
<constant name="VIEWPORT_CLEAR_ALWAYS" value="0" enum="ViewportClearMode">
The viewport is always cleared before drawing.
</constant>
<constant name="VIEWPORT_CLEAR_NEVER" value="1" enum="ViewportClearMode">
The viewport is never cleared before drawing.
</constant>
<constant name="VIEWPORT_CLEAR_ONLY_NEXT_FRAME" value="2" enum="ViewportClearMode">
The viewport is cleared once, then the clear mode is set to [constant VIEWPORT_CLEAR_NEVER].
</constant>
<constant name="VIEWPORT_MSAA_DISABLED" value="0" enum="ViewportMSAA">
Multisample antialiasing is disabled.
</constant>
<constant name="VIEWPORT_MSAA_2X" value="1" enum="ViewportMSAA">
Multisample antialiasing is set to 2×.
</constant>
<constant name="VIEWPORT_MSAA_4X" value="2" enum="ViewportMSAA">
Multisample antialiasing is set to 4×.
</constant>
<constant name="VIEWPORT_MSAA_8X" value="3" enum="ViewportMSAA">
Multisample antialiasing is set to 8×.
</constant>
<constant name="VIEWPORT_MSAA_16X" value="4" enum="ViewportMSAA">
Multisample antialiasing is set to 16×.
</constant>
<constant name="VIEWPORT_MSAA_EXT_2X" value="5" enum="ViewportMSAA">
Multisample antialiasing is set to 2× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go).
</constant>
<constant name="VIEWPORT_MSAA_EXT_4X" value="6" enum="ViewportMSAA">
Multisample antialiasing is set to 4× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go).
</constant>
<constant name="VIEWPORT_USAGE_2D" value="0" enum="ViewportUsage">
The Viewport does not render 3D but samples.
</constant>
<constant name="VIEWPORT_USAGE_2D_NO_SAMPLING" value="1" enum="ViewportUsage">
The Viewport does not render 3D and does not sample.
</constant>
<constant name="VIEWPORT_USAGE_3D" value="2" enum="ViewportUsage">
The Viewport renders 3D with effects.
</constant>
<constant name="VIEWPORT_USAGE_3D_NO_EFFECTS" value="3" enum="ViewportUsage">
The Viewport renders 3D but without effects.
</constant>
<constant name="VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME" value="0" enum="ViewportRenderInfo">
Number of objects drawn in a single frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME" value="1" enum="ViewportRenderInfo">
Number of vertices drawn in a single frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="ViewportRenderInfo">
Number of material changes during this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="ViewportRenderInfo">
Number of shader changes during this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="ViewportRenderInfo">
Number of surface changes during this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5" enum="ViewportRenderInfo">
Number of draw calls during this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_2D_ITEMS_IN_FRAME" value="6" enum="ViewportRenderInfo">
Number of 2d items drawn this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_2D_DRAW_CALLS_IN_FRAME" value="7" enum="ViewportRenderInfo">
Number of 2d draw calls during this frame.
</constant>
<constant name="VIEWPORT_RENDER_INFO_MAX" value="8" enum="ViewportRenderInfo">
Represents the size of the [enum ViewportRenderInfo] enum.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_DISABLED" value="0" enum="ViewportDebugDraw">
Debug draw is disabled. Default setting.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_UNSHADED" value="1" enum="ViewportDebugDraw">
Debug draw sets objects to unshaded.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_OVERDRAW" value="2" enum="ViewportDebugDraw">
Overwrites clear color to [code](0,0,0,0)[/code].
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_WIREFRAME" value="3" enum="ViewportDebugDraw">
Debug draw draws objects in wireframe.
</constant>
<constant name="SCENARIO_DEBUG_DISABLED" value="0" enum="ScenarioDebugMode">
Do not use a debug mode.
</constant>
<constant name="SCENARIO_DEBUG_WIREFRAME" value="1" enum="ScenarioDebugMode">
Draw all objects as wireframe models.
</constant>
<constant name="SCENARIO_DEBUG_OVERDRAW" value="2" enum="ScenarioDebugMode">
Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw.
</constant>
<constant name="SCENARIO_DEBUG_SHADELESS" value="3" enum="ScenarioDebugMode">
Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code].
</constant>
<constant name="INSTANCE_NONE" value="0" enum="InstanceType">
The instance does not have a type.
</constant>
<constant name="INSTANCE_MESH" value="1" enum="InstanceType">
The instance is a mesh.
</constant>
<constant name="INSTANCE_MULTIMESH" value="2" enum="InstanceType">
The instance is a multimesh.
</constant>
<constant name="INSTANCE_IMMEDIATE" value="3" enum="InstanceType">
The instance is an immediate geometry.
</constant>
<constant name="INSTANCE_PARTICLES" value="4" enum="InstanceType">
The instance is a particle emitter.
</constant>
<constant name="INSTANCE_LIGHT" value="5" enum="InstanceType">
The instance is a light.
</constant>
<constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType">
The instance is a reflection probe.
</constant>
<constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType">
The instance is a GI probe.
</constant>
<constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType">
The instance is a lightmap capture.
</constant>
<constant name="INSTANCE_MAX" value="9" enum="InstanceType">
Represents the size of the [enum InstanceType] enum.
</constant>
<constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType">
A combination of the flags of geometry instances (mesh, multimesh, immediate and particles).
</constant>
<constant name="INSTANCE_FLAG_USE_BAKED_LIGHT" value="0" enum="InstanceFlags">
Allows the instance to be used in baked lighting.
</constant>
<constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="InstanceFlags">
When set, manually requests to draw geometry on next frame.
</constant>
<constant name="INSTANCE_FLAG_MAX" value="2" enum="InstanceFlags">
Represents the size of the [enum InstanceFlags] enum.
</constant>
<constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
Disable shadows from this instance.
</constant>
<constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting">
Cast shadows from this instance.
</constant>
<constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting">
Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows.
</constant>
<constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting">
Only render the shadows from the object. The object itself will not be drawn.
</constant>
<constant name="NINE_PATCH_STRETCH" value="0" enum="NinePatchAxisMode">
The nine patch gets stretched where needed.
</constant>
<constant name="NINE_PATCH_TILE" value="1" enum="NinePatchAxisMode">
The nine patch gets filled with tiles where needed.
</constant>
<constant name="NINE_PATCH_TILE_FIT" value="2" enum="NinePatchAxisMode">
The nine patch gets filled with tiles where needed and stretches them a bit if needed.
</constant>
<constant name="CANVAS_LIGHT_MODE_ADD" value="0" enum="CanvasLightMode">
Adds light color additive to the canvas.
</constant>
<constant name="CANVAS_LIGHT_MODE_SUB" value="1" enum="CanvasLightMode">
Adds light color subtractive to the canvas.
</constant>
<constant name="CANVAS_LIGHT_MODE_MIX" value="2" enum="CanvasLightMode">
The light adds color depending on transparency.
</constant>
<constant name="CANVAS_LIGHT_MODE_MASK" value="3" enum="CanvasLightMode">
The light adds color depending on mask.
</constant>
<constant name="CANVAS_LIGHT_FILTER_NONE" value="0" enum="CanvasLightShadowFilter">
Do not apply a filter to canvas light shadows.
</constant>
<constant name="CANVAS_LIGHT_FILTER_PCF3" value="1" enum="CanvasLightShadowFilter">
Use PCF3 filtering to filter canvas light shadows.
</constant>
<constant name="CANVAS_LIGHT_FILTER_PCF5" value="2" enum="CanvasLightShadowFilter">
Use PCF5 filtering to filter canvas light shadows.
</constant>
<constant name="CANVAS_LIGHT_FILTER_PCF7" value="3" enum="CanvasLightShadowFilter">
Use PCF7 filtering to filter canvas light shadows.
</constant>
<constant name="CANVAS_LIGHT_FILTER_PCF9" value="4" enum="CanvasLightShadowFilter">
Use PCF9 filtering to filter canvas light shadows.
</constant>
<constant name="CANVAS_LIGHT_FILTER_PCF13" value="5" enum="CanvasLightShadowFilter">
Use PCF13 filtering to filter canvas light shadows.
</constant>
<constant name="CANVAS_OCCLUDER_POLYGON_CULL_DISABLED" value="0" enum="CanvasOccluderPolygonCullMode">
Culling of the canvas occluder is disabled.
</constant>
<constant name="CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE" value="1" enum="CanvasOccluderPolygonCullMode">
Culling of the canvas occluder is clockwise.
</constant>
<constant name="CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE" value="2" enum="CanvasOccluderPolygonCullMode">
Culling of the canvas occluder is counterclockwise.
</constant>
<constant name="INFO_OBJECTS_IN_FRAME" value="0" enum="RenderInfo">
The amount of objects in the frame.
</constant>
<constant name="INFO_VERTICES_IN_FRAME" value="1" enum="RenderInfo">
The amount of vertices in the frame.
</constant>
<constant name="INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="RenderInfo">
The amount of modified materials in the frame.
</constant>
<constant name="INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="RenderInfo">
The amount of shader rebinds in the frame.
</constant>
<constant name="INFO_SHADER_COMPILES_IN_FRAME" value="4" enum="RenderInfo">
The peak amount of shaders that have been under compilation in the frame.
This is useful to know when asynchronous shader compilation has finished for the current shaders on screen.
[b]Note:[/b] For complete certainty, only assume there are no outstanding compilations when this value is zero for at least two frames in a row.
Unimplemented in the GLES2 rendering backend, always returns 0.
</constant>
<constant name="INFO_SURFACE_CHANGES_IN_FRAME" value="5" enum="RenderInfo">
The amount of surface changes in the frame.
</constant>
<constant name="INFO_DRAW_CALLS_IN_FRAME" value="6" enum="RenderInfo">
The amount of draw calls in frame.
</constant>
<constant name="INFO_2D_ITEMS_IN_FRAME" value="7" enum="RenderInfo">
The amount of 2d items in the frame.
</constant>
<constant name="INFO_2D_DRAW_CALLS_IN_FRAME" value="8" enum="RenderInfo">
The amount of 2d draw calls in frame.
</constant>
<constant name="INFO_USAGE_VIDEO_MEM_TOTAL" value="9" enum="RenderInfo">
Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0.
</constant>
<constant name="INFO_VIDEO_MEM_USED" value="10" enum="RenderInfo">
The amount of video memory used, i.e. texture and vertex memory combined.
</constant>
<constant name="INFO_TEXTURE_MEM_USED" value="11" enum="RenderInfo">
The amount of texture memory used.
</constant>
<constant name="INFO_VERTEX_MEM_USED" value="12" enum="RenderInfo">
The amount of vertex memory used.
</constant>
<constant name="FEATURE_SHADERS" value="0" enum="Features">
Hardware supports shaders. This enum is currently unused in Godot 3.x.
</constant>
<constant name="FEATURE_MULTITHREADED" value="1" enum="Features">
Hardware supports multithreading. This enum is currently unused in Godot 3.x.
</constant>
<constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat">
Use [Transform2D] to store MultiMesh transform.
</constant>
<constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat">
Use [Transform] to store MultiMesh transform.
</constant>
<constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat">
MultiMesh does not use per-instance color.
</constant>
<constant name="MULTIMESH_COLOR_8BIT" value="1" enum="MultimeshColorFormat">
MultiMesh color uses 8 bits per component. This packs the color into a single float.
</constant>
<constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat">
MultiMesh color uses a float per channel.
</constant>
<constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat">
MultiMesh does not use custom data.
</constant>
<constant name="MULTIMESH_CUSTOM_DATA_8BIT" value="1" enum="MultimeshCustomDataFormat">
MultiMesh custom data uses 8 bits per component. This packs the 4-component custom data into a single float.
</constant>
<constant name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat">
MultiMesh custom data uses a float per component.
</constant>
<constant name="MULTIMESH_INTERP_QUALITY_FAST" value="0" enum="MultimeshPhysicsInterpolationQuality">
MultiMesh physics interpolation favours speed over quality.
</constant>
<constant name="MULTIMESH_INTERP_QUALITY_HIGH" value="1" enum="MultimeshPhysicsInterpolationQuality">
MultiMesh physics interpolation favours quality over speed.
</constant>
<constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode">
Reflection probe will update reflections once and then stop.
</constant>
<constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode">
Reflection probe will update each frame. This mode is necessary to capture moving objects.
</constant>
<constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder">
Draw particles in the order that they appear in the particles array.
</constant>
<constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder">
Sort particles based on their lifetime.
</constant>
<constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder">
Sort particles based on their distance to the camera.
</constant>
<constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG">
Use the clear color as background.
</constant>
<constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG">
Use a specified color as the background.
</constant>
<constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG">
Use a sky resource for the background.
</constant>
<constant name="ENV_BG_COLOR_SKY" value="3" enum="EnvironmentBG">
Use a custom color for background, but use a sky for shading and reflections.
</constant>
<constant name="ENV_BG_CANVAS" value="4" enum="EnvironmentBG">
Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world.
</constant>
<constant name="ENV_BG_KEEP" value="5" enum="EnvironmentBG">
Do not clear the background, use whatever was rendered last frame as the background.
</constant>
<constant name="ENV_BG_MAX" value="7" enum="EnvironmentBG">
Represents the size of the [enum EnvironmentBG] enum.
</constant>
<constant name="ENV_DOF_BLUR_QUALITY_LOW" value="0" enum="EnvironmentDOFBlurQuality">
Use lowest blur quality. Fastest, but may look bad.
</constant>
<constant name="ENV_DOF_BLUR_QUALITY_MEDIUM" value="1" enum="EnvironmentDOFBlurQuality">
Use medium blur quality.
</constant>
<constant name="ENV_DOF_BLUR_QUALITY_HIGH" value="2" enum="EnvironmentDOFBlurQuality">
Used highest blur quality. Looks the best, but is the slowest.
</constant>
<constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode">
Add the effect of the glow on top of the scene.
</constant>
<constant name="GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode">
Blends the glow effect with the screen. Does not get as bright as additive.
</constant>
<constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode">
Produces a subtle color disturbance around objects.
</constant>
<constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode">
Shows the glow effect by itself without the underlying scene.
</constant>
<constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper">
Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors.
</constant>
<constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper">
Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. This avoids clipping bright highlights, but the resulting image can look a bit dull.
</constant>
<constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper">
Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant ENV_TONE_MAPPER_REINHARD].
</constant>
<constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper">
Use the legacy Godot version of the Academy Color Encoding System tonemapper. Unlike [constant ENV_TONE_MAPPER_ACES_FITTED], this version of ACES does not handle bright lighting in a physically accurate way. ACES typically has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].
[b]Note:[/b] This tonemapping operator will be removed in Godot 4.0 in favor of the more accurate [constant ENV_TONE_MAPPER_ACES_FITTED].
</constant>
<constant name="ENV_TONE_MAPPER_ACES_FITTED" value="4" enum="EnvironmentToneMapper">
Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].
</constant>
<constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality">
Lowest quality of screen space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality">
Medium quality screen space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality">
Highest quality screen space ambient occlusion.
</constant>
<constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur">
Disables the blur set for SSAO. Will make SSAO look noisier.
</constant>
<constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur">
Perform a 1x1 blur on the SSAO output.
</constant>
<constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur">
Performs a 2x2 blur on the SSAO output.
</constant>
<constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur">
Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO.
</constant>
<constant name="CHANGED_PRIORITY_ANY" value="0" enum="ChangedPriority">
Used to query for any changes that request a redraw, whatever the priority.
</constant>
<constant name="CHANGED_PRIORITY_LOW" value="1" enum="ChangedPriority">
Registered changes which have low priority can be optionally prevented from causing editor redraws. Examples might include dynamic shaders (typically using the [code]TIME[/code] built-in).
</constant>
<constant name="CHANGED_PRIORITY_HIGH" value="2" enum="ChangedPriority">
Registered changes which can cause a redraw default to high priority.
</constant>
</constants>
</class>
|