class_material3d.rst 135 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/Material3D.xml.
  6. .. _class_Material3D:
  7. Material3D
  8. ==========
  9. **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`ORMSpatialMaterial<class_ORMSpatialMaterial>`, :ref:`SpatialMaterial<class_SpatialMaterial>`
  11. .. container:: contribute
  12. There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  13. .. rst-class:: classref-reftable-group
  14. Properties
  15. ----------
  16. .. table::
  17. :widths: auto
  18. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  19. | :ref:`Color<class_Color>` | :ref:`albedo_color<class_Material3D_property_albedo_color>` | ``Color( 1, 1, 1, 1 )`` |
  20. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  21. | :ref:`Texture<class_Texture>` | :ref:`albedo_texture<class_Material3D_property_albedo_texture>` | |
  22. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  23. | :ref:`float<class_float>` | :ref:`anisotropy<class_Material3D_property_anisotropy>` | |
  24. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`anisotropy_enabled<class_Material3D_property_anisotropy_enabled>` | ``false`` |
  26. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  27. | :ref:`Texture<class_Texture>` | :ref:`anisotropy_flowmap<class_Material3D_property_anisotropy_flowmap>` | |
  28. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`ao_enabled<class_Material3D_property_ao_enabled>` | ``false`` |
  30. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  31. | :ref:`float<class_float>` | :ref:`ao_light_affect<class_Material3D_property_ao_light_affect>` | |
  32. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`ao_on_uv2<class_Material3D_property_ao_on_uv2>` | |
  34. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  35. | :ref:`Texture<class_Texture>` | :ref:`ao_texture<class_Material3D_property_ao_texture>` | |
  36. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  37. | :ref:`TextureChannel<enum_Material3D_TextureChannel>` | :ref:`ao_texture_channel<class_Material3D_property_ao_texture_channel>` | |
  38. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  39. | :ref:`AsyncMode<enum_Material3D_AsyncMode>` | :ref:`async_mode<class_Material3D_property_async_mode>` | ``0`` |
  40. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  41. | :ref:`float<class_float>` | :ref:`clearcoat<class_Material3D_property_clearcoat>` | |
  42. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  43. | :ref:`bool<class_bool>` | :ref:`clearcoat_enabled<class_Material3D_property_clearcoat_enabled>` | ``false`` |
  44. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  45. | :ref:`float<class_float>` | :ref:`clearcoat_gloss<class_Material3D_property_clearcoat_gloss>` | |
  46. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  47. | :ref:`Texture<class_Texture>` | :ref:`clearcoat_texture<class_Material3D_property_clearcoat_texture>` | |
  48. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`depth_deep_parallax<class_Material3D_property_depth_deep_parallax>` | |
  50. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  51. | :ref:`bool<class_bool>` | :ref:`depth_enabled<class_Material3D_property_depth_enabled>` | ``false`` |
  52. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`depth_flip_binormal<class_Material3D_property_depth_flip_binormal>` | |
  54. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`depth_flip_tangent<class_Material3D_property_depth_flip_tangent>` | |
  56. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  57. | :ref:`int<class_int>` | :ref:`depth_max_layers<class_Material3D_property_depth_max_layers>` | |
  58. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  59. | :ref:`int<class_int>` | :ref:`depth_min_layers<class_Material3D_property_depth_min_layers>` | |
  60. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  61. | :ref:`float<class_float>` | :ref:`depth_scale<class_Material3D_property_depth_scale>` | |
  62. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  63. | :ref:`Texture<class_Texture>` | :ref:`depth_texture<class_Material3D_property_depth_texture>` | |
  64. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  65. | :ref:`Texture<class_Texture>` | :ref:`detail_albedo<class_Material3D_property_detail_albedo>` | |
  66. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  67. | :ref:`BlendMode<enum_Material3D_BlendMode>` | :ref:`detail_blend_mode<class_Material3D_property_detail_blend_mode>` | |
  68. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  69. | :ref:`bool<class_bool>` | :ref:`detail_enabled<class_Material3D_property_detail_enabled>` | ``false`` |
  70. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  71. | :ref:`Texture<class_Texture>` | :ref:`detail_mask<class_Material3D_property_detail_mask>` | |
  72. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  73. | :ref:`Texture<class_Texture>` | :ref:`detail_normal<class_Material3D_property_detail_normal>` | |
  74. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  75. | :ref:`DetailUV<enum_Material3D_DetailUV>` | :ref:`detail_uv_layer<class_Material3D_property_detail_uv_layer>` | |
  76. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  77. | :ref:`float<class_float>` | :ref:`distance_fade_max_distance<class_Material3D_property_distance_fade_max_distance>` | |
  78. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  79. | :ref:`float<class_float>` | :ref:`distance_fade_min_distance<class_Material3D_property_distance_fade_min_distance>` | |
  80. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  81. | :ref:`DistanceFadeMode<enum_Material3D_DistanceFadeMode>` | :ref:`distance_fade_mode<class_Material3D_property_distance_fade_mode>` | ``0`` |
  82. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  83. | :ref:`Color<class_Color>` | :ref:`emission<class_Material3D_property_emission>` | |
  84. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  85. | :ref:`bool<class_bool>` | :ref:`emission_enabled<class_Material3D_property_emission_enabled>` | ``false`` |
  86. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  87. | :ref:`float<class_float>` | :ref:`emission_energy<class_Material3D_property_emission_energy>` | |
  88. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  89. | :ref:`bool<class_bool>` | :ref:`emission_on_uv2<class_Material3D_property_emission_on_uv2>` | |
  90. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  91. | :ref:`EmissionOperator<enum_Material3D_EmissionOperator>` | :ref:`emission_operator<class_Material3D_property_emission_operator>` | |
  92. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  93. | :ref:`Texture<class_Texture>` | :ref:`emission_texture<class_Material3D_property_emission_texture>` | |
  94. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  95. | :ref:`bool<class_bool>` | :ref:`flags_albedo_tex_force_srgb<class_Material3D_property_flags_albedo_tex_force_srgb>` | ``false`` |
  96. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  97. | :ref:`bool<class_bool>` | :ref:`flags_albedo_tex_msdf<class_Material3D_property_flags_albedo_tex_msdf>` | ``false`` |
  98. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  99. | :ref:`bool<class_bool>` | :ref:`flags_disable_ambient_light<class_Material3D_property_flags_disable_ambient_light>` | ``false`` |
  100. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  101. | :ref:`bool<class_bool>` | :ref:`flags_do_not_receive_shadows<class_Material3D_property_flags_do_not_receive_shadows>` | ``false`` |
  102. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  103. | :ref:`bool<class_bool>` | :ref:`flags_ensure_correct_normals<class_Material3D_property_flags_ensure_correct_normals>` | ``false`` |
  104. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  105. | :ref:`bool<class_bool>` | :ref:`flags_fixed_size<class_Material3D_property_flags_fixed_size>` | ``false`` |
  106. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  107. | :ref:`bool<class_bool>` | :ref:`flags_no_depth_test<class_Material3D_property_flags_no_depth_test>` | ``false`` |
  108. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  109. | :ref:`bool<class_bool>` | :ref:`flags_transparent<class_Material3D_property_flags_transparent>` | ``false`` |
  110. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  111. | :ref:`bool<class_bool>` | :ref:`flags_unshaded<class_Material3D_property_flags_unshaded>` | ``false`` |
  112. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  113. | :ref:`bool<class_bool>` | :ref:`flags_use_point_size<class_Material3D_property_flags_use_point_size>` | ``false`` |
  114. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  115. | :ref:`bool<class_bool>` | :ref:`flags_use_shadow_to_opacity<class_Material3D_property_flags_use_shadow_to_opacity>` | ``false`` |
  116. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  117. | :ref:`bool<class_bool>` | :ref:`flags_vertex_lighting<class_Material3D_property_flags_vertex_lighting>` | ``false`` |
  118. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  119. | :ref:`bool<class_bool>` | :ref:`flags_world_triplanar<class_Material3D_property_flags_world_triplanar>` | ``false`` |
  120. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  121. | :ref:`float<class_float>` | :ref:`metallic<class_Material3D_property_metallic>` | ``0.0`` |
  122. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  123. | :ref:`float<class_float>` | :ref:`metallic_specular<class_Material3D_property_metallic_specular>` | ``0.5`` |
  124. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  125. | :ref:`Texture<class_Texture>` | :ref:`metallic_texture<class_Material3D_property_metallic_texture>` | |
  126. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  127. | :ref:`TextureChannel<enum_Material3D_TextureChannel>` | :ref:`metallic_texture_channel<class_Material3D_property_metallic_texture_channel>` | ``0`` |
  128. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  129. | :ref:`bool<class_bool>` | :ref:`normal_enabled<class_Material3D_property_normal_enabled>` | ``false`` |
  130. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  131. | :ref:`float<class_float>` | :ref:`normal_scale<class_Material3D_property_normal_scale>` | |
  132. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  133. | :ref:`Texture<class_Texture>` | :ref:`normal_texture<class_Material3D_property_normal_texture>` | |
  134. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  135. | :ref:`Texture<class_Texture>` | :ref:`orm_texture<class_Material3D_property_orm_texture>` | |
  136. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  137. | :ref:`float<class_float>` | :ref:`params_alpha_scissor_threshold<class_Material3D_property_params_alpha_scissor_threshold>` | |
  138. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  139. | :ref:`bool<class_bool>` | :ref:`params_billboard_keep_scale<class_Material3D_property_params_billboard_keep_scale>` | ``false`` |
  140. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  141. | :ref:`BillboardMode<enum_Material3D_BillboardMode>` | :ref:`params_billboard_mode<class_Material3D_property_params_billboard_mode>` | ``0`` |
  142. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  143. | :ref:`BlendMode<enum_Material3D_BlendMode>` | :ref:`params_blend_mode<class_Material3D_property_params_blend_mode>` | ``0`` |
  144. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  145. | :ref:`CullMode<enum_Material3D_CullMode>` | :ref:`params_cull_mode<class_Material3D_property_params_cull_mode>` | ``0`` |
  146. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  147. | :ref:`DepthDrawMode<enum_Material3D_DepthDrawMode>` | :ref:`params_depth_draw_mode<class_Material3D_property_params_depth_draw_mode>` | ``0`` |
  148. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  149. | :ref:`DiffuseMode<enum_Material3D_DiffuseMode>` | :ref:`params_diffuse_mode<class_Material3D_property_params_diffuse_mode>` | ``0`` |
  150. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  151. | :ref:`bool<class_bool>` | :ref:`params_grow<class_Material3D_property_params_grow>` | ``false`` |
  152. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  153. | :ref:`float<class_float>` | :ref:`params_grow_amount<class_Material3D_property_params_grow_amount>` | |
  154. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  155. | :ref:`float<class_float>` | :ref:`params_line_width<class_Material3D_property_params_line_width>` | ``1.0`` |
  156. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  157. | :ref:`float<class_float>` | :ref:`params_point_size<class_Material3D_property_params_point_size>` | ``1.0`` |
  158. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  159. | :ref:`SpecularMode<enum_Material3D_SpecularMode>` | :ref:`params_specular_mode<class_Material3D_property_params_specular_mode>` | ``0`` |
  160. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  161. | :ref:`bool<class_bool>` | :ref:`params_use_alpha_scissor<class_Material3D_property_params_use_alpha_scissor>` | ``false`` |
  162. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  163. | :ref:`int<class_int>` | :ref:`particles_anim_h_frames<class_Material3D_property_particles_anim_h_frames>` | |
  164. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  165. | :ref:`bool<class_bool>` | :ref:`particles_anim_loop<class_Material3D_property_particles_anim_loop>` | |
  166. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  167. | :ref:`int<class_int>` | :ref:`particles_anim_v_frames<class_Material3D_property_particles_anim_v_frames>` | |
  168. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  169. | :ref:`float<class_float>` | :ref:`proximity_fade_distance<class_Material3D_property_proximity_fade_distance>` | |
  170. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  171. | :ref:`bool<class_bool>` | :ref:`proximity_fade_enable<class_Material3D_property_proximity_fade_enable>` | ``false`` |
  172. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  173. | :ref:`bool<class_bool>` | :ref:`refraction_enabled<class_Material3D_property_refraction_enabled>` | ``false`` |
  174. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  175. | :ref:`float<class_float>` | :ref:`refraction_scale<class_Material3D_property_refraction_scale>` | |
  176. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  177. | :ref:`Texture<class_Texture>` | :ref:`refraction_texture<class_Material3D_property_refraction_texture>` | |
  178. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  179. | :ref:`TextureChannel<enum_Material3D_TextureChannel>` | :ref:`refraction_texture_channel<class_Material3D_property_refraction_texture_channel>` | |
  180. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  181. | :ref:`float<class_float>` | :ref:`rim<class_Material3D_property_rim>` | |
  182. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  183. | :ref:`bool<class_bool>` | :ref:`rim_enabled<class_Material3D_property_rim_enabled>` | ``false`` |
  184. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  185. | :ref:`Texture<class_Texture>` | :ref:`rim_texture<class_Material3D_property_rim_texture>` | |
  186. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  187. | :ref:`float<class_float>` | :ref:`rim_tint<class_Material3D_property_rim_tint>` | |
  188. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  189. | :ref:`float<class_float>` | :ref:`roughness<class_Material3D_property_roughness>` | ``1.0`` |
  190. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  191. | :ref:`Texture<class_Texture>` | :ref:`roughness_texture<class_Material3D_property_roughness_texture>` | |
  192. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  193. | :ref:`TextureChannel<enum_Material3D_TextureChannel>` | :ref:`roughness_texture_channel<class_Material3D_property_roughness_texture_channel>` | ``0`` |
  194. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  195. | :ref:`bool<class_bool>` | :ref:`subsurf_scatter_enabled<class_Material3D_property_subsurf_scatter_enabled>` | ``false`` |
  196. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  197. | :ref:`float<class_float>` | :ref:`subsurf_scatter_strength<class_Material3D_property_subsurf_scatter_strength>` | |
  198. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  199. | :ref:`Texture<class_Texture>` | :ref:`subsurf_scatter_texture<class_Material3D_property_subsurf_scatter_texture>` | |
  200. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  201. | :ref:`Color<class_Color>` | :ref:`transmission<class_Material3D_property_transmission>` | |
  202. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  203. | :ref:`bool<class_bool>` | :ref:`transmission_enabled<class_Material3D_property_transmission_enabled>` | ``false`` |
  204. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  205. | :ref:`Texture<class_Texture>` | :ref:`transmission_texture<class_Material3D_property_transmission_texture>` | |
  206. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  207. | :ref:`Vector3<class_Vector3>` | :ref:`uv1_offset<class_Material3D_property_uv1_offset>` | ``Vector3( 0, 0, 0 )`` |
  208. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  209. | :ref:`Vector3<class_Vector3>` | :ref:`uv1_scale<class_Material3D_property_uv1_scale>` | ``Vector3( 1, 1, 1 )`` |
  210. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  211. | :ref:`bool<class_bool>` | :ref:`uv1_triplanar<class_Material3D_property_uv1_triplanar>` | ``false`` |
  212. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  213. | :ref:`float<class_float>` | :ref:`uv1_triplanar_sharpness<class_Material3D_property_uv1_triplanar_sharpness>` | |
  214. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  215. | :ref:`Vector3<class_Vector3>` | :ref:`uv2_offset<class_Material3D_property_uv2_offset>` | ``Vector3( 0, 0, 0 )`` |
  216. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  217. | :ref:`Vector3<class_Vector3>` | :ref:`uv2_scale<class_Material3D_property_uv2_scale>` | ``Vector3( 1, 1, 1 )`` |
  218. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  219. | :ref:`bool<class_bool>` | :ref:`uv2_triplanar<class_Material3D_property_uv2_triplanar>` | ``false`` |
  220. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  221. | :ref:`float<class_float>` | :ref:`uv2_triplanar_sharpness<class_Material3D_property_uv2_triplanar_sharpness>` | |
  222. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  223. | :ref:`bool<class_bool>` | :ref:`vertex_color_is_srgb<class_Material3D_property_vertex_color_is_srgb>` | ``false`` |
  224. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  225. | :ref:`bool<class_bool>` | :ref:`vertex_color_use_as_albedo<class_Material3D_property_vertex_color_use_as_albedo>` | ``false`` |
  226. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+
  227. .. rst-class:: classref-reftable-group
  228. Methods
  229. -------
  230. .. table::
  231. :widths: auto
  232. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  233. | :ref:`bool<class_bool>` | :ref:`get_feature<class_Material3D_method_get_feature>` **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const| |
  234. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  235. | :ref:`bool<class_bool>` | :ref:`get_flag<class_Material3D_method_get_flag>` **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const| |
  236. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  237. | :ref:`Texture<class_Texture>` | :ref:`get_texture<class_Material3D_method_get_texture>` **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const| |
  238. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  239. | void | :ref:`set_feature<class_Material3D_method_set_feature>` **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)** |
  240. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  241. | void | :ref:`set_flag<class_Material3D_method_set_flag>` **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)** |
  242. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  243. | void | :ref:`set_texture<class_Material3D_method_set_texture>` **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)** |
  244. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  245. .. rst-class:: classref-section-separator
  246. ----
  247. .. rst-class:: classref-descriptions-group
  248. Enumerations
  249. ------------
  250. .. _enum_Material3D_TextureParam:
  251. .. rst-class:: classref-enumeration
  252. enum **TextureParam**:
  253. .. _class_Material3D_constant_TEXTURE_ALBEDO:
  254. .. rst-class:: classref-enumeration-constant
  255. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_ALBEDO** = ``0``
  256. Texture specifying per-pixel color.
  257. .. _class_Material3D_constant_TEXTURE_METALLIC:
  258. .. rst-class:: classref-enumeration-constant
  259. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_METALLIC** = ``1``
  260. Texture specifying per-pixel metallic value.
  261. .. _class_Material3D_constant_TEXTURE_ROUGHNESS:
  262. .. rst-class:: classref-enumeration-constant
  263. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_ROUGHNESS** = ``2``
  264. Texture specifying per-pixel roughness value.
  265. .. _class_Material3D_constant_TEXTURE_EMISSION:
  266. .. rst-class:: classref-enumeration-constant
  267. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_EMISSION** = ``3``
  268. Texture specifying per-pixel emission color.
  269. .. _class_Material3D_constant_TEXTURE_NORMAL:
  270. .. rst-class:: classref-enumeration-constant
  271. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_NORMAL** = ``4``
  272. Texture specifying per-pixel normal vector.
  273. .. _class_Material3D_constant_TEXTURE_RIM:
  274. .. rst-class:: classref-enumeration-constant
  275. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_RIM** = ``5``
  276. Texture specifying per-pixel rim value.
  277. .. _class_Material3D_constant_TEXTURE_CLEARCOAT:
  278. .. rst-class:: classref-enumeration-constant
  279. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_CLEARCOAT** = ``6``
  280. Texture specifying per-pixel clearcoat value.
  281. .. _class_Material3D_constant_TEXTURE_FLOWMAP:
  282. .. rst-class:: classref-enumeration-constant
  283. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_FLOWMAP** = ``7``
  284. Texture specifying per-pixel flowmap direction for use with :ref:`anisotropy<class_Material3D_property_anisotropy>`.
  285. .. _class_Material3D_constant_TEXTURE_AMBIENT_OCCLUSION:
  286. .. rst-class:: classref-enumeration-constant
  287. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_AMBIENT_OCCLUSION** = ``8``
  288. Texture specifying per-pixel ambient occlusion value.
  289. .. _class_Material3D_constant_TEXTURE_DEPTH:
  290. .. rst-class:: classref-enumeration-constant
  291. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_DEPTH** = ``9``
  292. Texture specifying per-pixel depth.
  293. .. _class_Material3D_constant_TEXTURE_SUBSURFACE_SCATTERING:
  294. .. rst-class:: classref-enumeration-constant
  295. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_SUBSURFACE_SCATTERING** = ``10``
  296. Texture specifying per-pixel subsurface scattering.
  297. .. _class_Material3D_constant_TEXTURE_TRANSMISSION:
  298. .. rst-class:: classref-enumeration-constant
  299. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_TRANSMISSION** = ``11``
  300. Texture specifying per-pixel transmission color.
  301. .. _class_Material3D_constant_TEXTURE_REFRACTION:
  302. .. rst-class:: classref-enumeration-constant
  303. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_REFRACTION** = ``12``
  304. Texture specifying per-pixel refraction strength.
  305. .. _class_Material3D_constant_TEXTURE_DETAIL_MASK:
  306. .. rst-class:: classref-enumeration-constant
  307. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_DETAIL_MASK** = ``13``
  308. Texture specifying per-pixel detail mask blending value.
  309. .. _class_Material3D_constant_TEXTURE_DETAIL_ALBEDO:
  310. .. rst-class:: classref-enumeration-constant
  311. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_DETAIL_ALBEDO** = ``14``
  312. Texture specifying per-pixel detail color.
  313. .. _class_Material3D_constant_TEXTURE_DETAIL_NORMAL:
  314. .. rst-class:: classref-enumeration-constant
  315. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_DETAIL_NORMAL** = ``15``
  316. Texture specifying per-pixel detail normal.
  317. .. _class_Material3D_constant_TEXTURE_MAX:
  318. .. rst-class:: classref-enumeration-constant
  319. :ref:`TextureParam<enum_Material3D_TextureParam>` **TEXTURE_MAX** = ``17``
  320. Represents the size of the :ref:`TextureParam<enum_Material3D_TextureParam>` enum.
  321. .. rst-class:: classref-item-separator
  322. ----
  323. .. _enum_Material3D_DetailUV:
  324. .. rst-class:: classref-enumeration
  325. enum **DetailUV**:
  326. .. _class_Material3D_constant_DETAIL_UV_1:
  327. .. rst-class:: classref-enumeration-constant
  328. :ref:`DetailUV<enum_Material3D_DetailUV>` **DETAIL_UV_1** = ``0``
  329. Use ``UV`` with the detail texture.
  330. .. _class_Material3D_constant_DETAIL_UV_2:
  331. .. rst-class:: classref-enumeration-constant
  332. :ref:`DetailUV<enum_Material3D_DetailUV>` **DETAIL_UV_2** = ``1``
  333. Use ``UV2`` with the detail texture.
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _enum_Material3D_Feature:
  337. .. rst-class:: classref-enumeration
  338. enum **Feature**:
  339. .. _class_Material3D_constant_FEATURE_TRANSPARENT:
  340. .. rst-class:: classref-enumeration-constant
  341. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_TRANSPARENT** = ``0``
  342. Constant for setting :ref:`flags_transparent<class_Material3D_property_flags_transparent>`.
  343. .. _class_Material3D_constant_FEATURE_EMISSION:
  344. .. rst-class:: classref-enumeration-constant
  345. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_EMISSION** = ``1``
  346. Constant for setting :ref:`emission_enabled<class_Material3D_property_emission_enabled>`.
  347. .. _class_Material3D_constant_FEATURE_NORMAL_MAPPING:
  348. .. rst-class:: classref-enumeration-constant
  349. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_NORMAL_MAPPING** = ``2``
  350. Constant for setting :ref:`normal_enabled<class_Material3D_property_normal_enabled>`.
  351. .. _class_Material3D_constant_FEATURE_RIM:
  352. .. rst-class:: classref-enumeration-constant
  353. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_RIM** = ``3``
  354. Constant for setting :ref:`rim_enabled<class_Material3D_property_rim_enabled>`.
  355. .. _class_Material3D_constant_FEATURE_CLEARCOAT:
  356. .. rst-class:: classref-enumeration-constant
  357. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_CLEARCOAT** = ``4``
  358. Constant for setting :ref:`clearcoat_enabled<class_Material3D_property_clearcoat_enabled>`.
  359. .. _class_Material3D_constant_FEATURE_ANISOTROPY:
  360. .. rst-class:: classref-enumeration-constant
  361. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_ANISOTROPY** = ``5``
  362. Constant for setting :ref:`anisotropy_enabled<class_Material3D_property_anisotropy_enabled>`.
  363. .. _class_Material3D_constant_FEATURE_AMBIENT_OCCLUSION:
  364. .. rst-class:: classref-enumeration-constant
  365. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_AMBIENT_OCCLUSION** = ``6``
  366. Constant for setting :ref:`ao_enabled<class_Material3D_property_ao_enabled>`.
  367. .. _class_Material3D_constant_FEATURE_DEPTH_MAPPING:
  368. .. rst-class:: classref-enumeration-constant
  369. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_DEPTH_MAPPING** = ``7``
  370. Constant for setting :ref:`depth_enabled<class_Material3D_property_depth_enabled>`.
  371. .. _class_Material3D_constant_FEATURE_SUBSURACE_SCATTERING:
  372. .. rst-class:: classref-enumeration-constant
  373. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_SUBSURACE_SCATTERING** = ``8``
  374. Constant for setting :ref:`subsurf_scatter_enabled<class_Material3D_property_subsurf_scatter_enabled>`.
  375. .. _class_Material3D_constant_FEATURE_TRANSMISSION:
  376. .. rst-class:: classref-enumeration-constant
  377. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_TRANSMISSION** = ``9``
  378. Constant for setting :ref:`transmission_enabled<class_Material3D_property_transmission_enabled>`.
  379. .. _class_Material3D_constant_FEATURE_REFRACTION:
  380. .. rst-class:: classref-enumeration-constant
  381. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_REFRACTION** = ``10``
  382. Constant for setting :ref:`refraction_enabled<class_Material3D_property_refraction_enabled>`.
  383. .. _class_Material3D_constant_FEATURE_DETAIL:
  384. .. rst-class:: classref-enumeration-constant
  385. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_DETAIL** = ``11``
  386. Constant for setting :ref:`detail_enabled<class_Material3D_property_detail_enabled>`.
  387. .. _class_Material3D_constant_FEATURE_MAX:
  388. .. rst-class:: classref-enumeration-constant
  389. :ref:`Feature<enum_Material3D_Feature>` **FEATURE_MAX** = ``12``
  390. Represents the size of the :ref:`Feature<enum_Material3D_Feature>` enum.
  391. .. rst-class:: classref-item-separator
  392. ----
  393. .. _enum_Material3D_BlendMode:
  394. .. rst-class:: classref-enumeration
  395. enum **BlendMode**:
  396. .. _class_Material3D_constant_BLEND_MODE_MIX:
  397. .. rst-class:: classref-enumeration-constant
  398. :ref:`BlendMode<enum_Material3D_BlendMode>` **BLEND_MODE_MIX** = ``0``
  399. Default blend mode. The color of the object is blended over the background based on the object's alpha value.
  400. .. _class_Material3D_constant_BLEND_MODE_ADD:
  401. .. rst-class:: classref-enumeration-constant
  402. :ref:`BlendMode<enum_Material3D_BlendMode>` **BLEND_MODE_ADD** = ``1``
  403. The color of the object is added to the background.
  404. .. _class_Material3D_constant_BLEND_MODE_SUB:
  405. .. rst-class:: classref-enumeration-constant
  406. :ref:`BlendMode<enum_Material3D_BlendMode>` **BLEND_MODE_SUB** = ``2``
  407. The color of the object is subtracted from the background.
  408. .. _class_Material3D_constant_BLEND_MODE_MUL:
  409. .. rst-class:: classref-enumeration-constant
  410. :ref:`BlendMode<enum_Material3D_BlendMode>` **BLEND_MODE_MUL** = ``3``
  411. The color of the object is multiplied by the background.
  412. .. rst-class:: classref-item-separator
  413. ----
  414. .. _enum_Material3D_DepthDrawMode:
  415. .. rst-class:: classref-enumeration
  416. enum **DepthDrawMode**:
  417. .. _class_Material3D_constant_DEPTH_DRAW_OPAQUE_ONLY:
  418. .. rst-class:: classref-enumeration-constant
  419. :ref:`DepthDrawMode<enum_Material3D_DepthDrawMode>` **DEPTH_DRAW_OPAQUE_ONLY** = ``0``
  420. Default depth draw mode. Depth is drawn only for opaque objects.
  421. .. _class_Material3D_constant_DEPTH_DRAW_ALWAYS:
  422. .. rst-class:: classref-enumeration-constant
  423. :ref:`DepthDrawMode<enum_Material3D_DepthDrawMode>` **DEPTH_DRAW_ALWAYS** = ``1``
  424. Depth draw is calculated for both opaque and transparent objects.
  425. .. _class_Material3D_constant_DEPTH_DRAW_DISABLED:
  426. .. rst-class:: classref-enumeration-constant
  427. :ref:`DepthDrawMode<enum_Material3D_DepthDrawMode>` **DEPTH_DRAW_DISABLED** = ``2``
  428. No depth draw.
  429. .. _class_Material3D_constant_DEPTH_DRAW_ALPHA_OPAQUE_PREPASS:
  430. .. rst-class:: classref-enumeration-constant
  431. :ref:`DepthDrawMode<enum_Material3D_DepthDrawMode>` **DEPTH_DRAW_ALPHA_OPAQUE_PREPASS** = ``3``
  432. For transparent objects, an opaque pass is made first with the opaque parts, then transparency is drawn.
  433. .. rst-class:: classref-item-separator
  434. ----
  435. .. _enum_Material3D_CullMode:
  436. .. rst-class:: classref-enumeration
  437. enum **CullMode**:
  438. .. _class_Material3D_constant_CULL_BACK:
  439. .. rst-class:: classref-enumeration-constant
  440. :ref:`CullMode<enum_Material3D_CullMode>` **CULL_BACK** = ``0``
  441. Default cull mode. The back of the object is culled when not visible.
  442. .. _class_Material3D_constant_CULL_FRONT:
  443. .. rst-class:: classref-enumeration-constant
  444. :ref:`CullMode<enum_Material3D_CullMode>` **CULL_FRONT** = ``1``
  445. The front of the object is culled when not visible.
  446. .. _class_Material3D_constant_CULL_DISABLED:
  447. .. rst-class:: classref-enumeration-constant
  448. :ref:`CullMode<enum_Material3D_CullMode>` **CULL_DISABLED** = ``2``
  449. No culling is performed.
  450. .. rst-class:: classref-item-separator
  451. ----
  452. .. _enum_Material3D_Flags:
  453. .. rst-class:: classref-enumeration
  454. enum **Flags**:
  455. .. _class_Material3D_constant_FLAG_UNSHADED:
  456. .. rst-class:: classref-enumeration-constant
  457. :ref:`Flags<enum_Material3D_Flags>` **FLAG_UNSHADED** = ``0``
  458. No lighting is used on the object. Color comes directly from ``ALBEDO``.
  459. .. _class_Material3D_constant_FLAG_USE_VERTEX_LIGHTING:
  460. .. rst-class:: classref-enumeration-constant
  461. :ref:`Flags<enum_Material3D_Flags>` **FLAG_USE_VERTEX_LIGHTING** = ``1``
  462. Lighting is calculated per-vertex rather than per-pixel. This can be used to increase the speed of the shader at the cost of quality.
  463. .. _class_Material3D_constant_FLAG_DISABLE_DEPTH_TEST:
  464. .. rst-class:: classref-enumeration-constant
  465. :ref:`Flags<enum_Material3D_Flags>` **FLAG_DISABLE_DEPTH_TEST** = ``2``
  466. Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
  467. .. _class_Material3D_constant_FLAG_ALBEDO_FROM_VERTEX_COLOR:
  468. .. rst-class:: classref-enumeration-constant
  469. :ref:`Flags<enum_Material3D_Flags>` **FLAG_ALBEDO_FROM_VERTEX_COLOR** = ``3``
  470. Set ``ALBEDO`` to the per-vertex color specified in the mesh.
  471. .. _class_Material3D_constant_FLAG_SRGB_VERTEX_COLOR:
  472. .. rst-class:: classref-enumeration-constant
  473. :ref:`Flags<enum_Material3D_Flags>` **FLAG_SRGB_VERTEX_COLOR** = ``4``
  474. Vertex color is in sRGB space and needs to be converted to linear. Only applies in the GLES3 renderer.
  475. .. _class_Material3D_constant_FLAG_USE_POINT_SIZE:
  476. .. rst-class:: classref-enumeration-constant
  477. :ref:`Flags<enum_Material3D_Flags>` **FLAG_USE_POINT_SIZE** = ``5``
  478. Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use ``POINT_COORD`` instead of ``UV``.
  479. .. _class_Material3D_constant_FLAG_FIXED_SIZE:
  480. .. rst-class:: classref-enumeration-constant
  481. :ref:`Flags<enum_Material3D_Flags>` **FLAG_FIXED_SIZE** = ``6``
  482. Object is scaled by depth so that it always appears the same size on screen.
  483. .. _class_Material3D_constant_FLAG_BILLBOARD_KEEP_SCALE:
  484. .. rst-class:: classref-enumeration-constant
  485. :ref:`Flags<enum_Material3D_Flags>` **FLAG_BILLBOARD_KEEP_SCALE** = ``7``
  486. Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when :ref:`params_billboard_mode<class_Material3D_property_params_billboard_mode>` is :ref:`BILLBOARD_ENABLED<class_Material3D_constant_BILLBOARD_ENABLED>`.
  487. .. _class_Material3D_constant_FLAG_UV1_USE_TRIPLANAR:
  488. .. rst-class:: classref-enumeration-constant
  489. :ref:`Flags<enum_Material3D_Flags>` **FLAG_UV1_USE_TRIPLANAR** = ``8``
  490. Use triplanar texture lookup for all texture lookups that would normally use ``UV``.
  491. .. _class_Material3D_constant_FLAG_UV2_USE_TRIPLANAR:
  492. .. rst-class:: classref-enumeration-constant
  493. :ref:`Flags<enum_Material3D_Flags>` **FLAG_UV2_USE_TRIPLANAR** = ``9``
  494. Use triplanar texture lookup for all texture lookups that would normally use ``UV2``.
  495. .. _class_Material3D_constant_FLAG_AO_ON_UV2:
  496. .. rst-class:: classref-enumeration-constant
  497. :ref:`Flags<enum_Material3D_Flags>` **FLAG_AO_ON_UV2** = ``11``
  498. Use ``UV2`` coordinates to look up from the :ref:`ao_texture<class_Material3D_property_ao_texture>`.
  499. .. _class_Material3D_constant_FLAG_EMISSION_ON_UV2:
  500. .. rst-class:: classref-enumeration-constant
  501. :ref:`Flags<enum_Material3D_Flags>` **FLAG_EMISSION_ON_UV2** = ``12``
  502. Use ``UV2`` coordinates to look up from the :ref:`emission_texture<class_Material3D_property_emission_texture>`.
  503. .. _class_Material3D_constant_FLAG_USE_ALPHA_SCISSOR:
  504. .. rst-class:: classref-enumeration-constant
  505. :ref:`Flags<enum_Material3D_Flags>` **FLAG_USE_ALPHA_SCISSOR** = ``13``
  506. Use alpha scissor. Set by :ref:`params_use_alpha_scissor<class_Material3D_property_params_use_alpha_scissor>`.
  507. .. _class_Material3D_constant_FLAG_TRIPLANAR_USE_WORLD:
  508. .. rst-class:: classref-enumeration-constant
  509. :ref:`Flags<enum_Material3D_Flags>` **FLAG_TRIPLANAR_USE_WORLD** = ``10``
  510. Use world coordinates in the triplanar texture lookup instead of local coordinates.
  511. .. _class_Material3D_constant_FLAG_ALBEDO_TEXTURE_FORCE_SRGB:
  512. .. rst-class:: classref-enumeration-constant
  513. :ref:`Flags<enum_Material3D_Flags>` **FLAG_ALBEDO_TEXTURE_FORCE_SRGB** = ``14``
  514. Forces the shader to convert albedo from sRGB space to linear space.
  515. .. _class_Material3D_constant_FLAG_DONT_RECEIVE_SHADOWS:
  516. .. rst-class:: classref-enumeration-constant
  517. :ref:`Flags<enum_Material3D_Flags>` **FLAG_DONT_RECEIVE_SHADOWS** = ``15``
  518. Disables receiving shadows from other objects.
  519. .. _class_Material3D_constant_FLAG_DISABLE_AMBIENT_LIGHT:
  520. .. rst-class:: classref-enumeration-constant
  521. :ref:`Flags<enum_Material3D_Flags>` **FLAG_DISABLE_AMBIENT_LIGHT** = ``17``
  522. Disables receiving ambient light.
  523. .. _class_Material3D_constant_FLAG_ENSURE_CORRECT_NORMALS:
  524. .. rst-class:: classref-enumeration-constant
  525. :ref:`Flags<enum_Material3D_Flags>` **FLAG_ENSURE_CORRECT_NORMALS** = ``16``
  526. Ensures that normals appear correct, even with non-uniform scaling.
  527. .. _class_Material3D_constant_FLAG_USE_SHADOW_TO_OPACITY:
  528. .. rst-class:: classref-enumeration-constant
  529. :ref:`Flags<enum_Material3D_Flags>` **FLAG_USE_SHADOW_TO_OPACITY** = ``18``
  530. Enables the shadow to opacity feature.
  531. .. _class_Material3D_constant_FLAG_ALBEDO_TEXTURE_SDF:
  532. .. rst-class:: classref-enumeration-constant
  533. :ref:`Flags<enum_Material3D_Flags>` **FLAG_ALBEDO_TEXTURE_SDF** = ``19``
  534. Enables signed distance field rendering shader.
  535. .. _class_Material3D_constant_FLAG_MAX:
  536. .. rst-class:: classref-enumeration-constant
  537. :ref:`Flags<enum_Material3D_Flags>` **FLAG_MAX** = ``20``
  538. Represents the size of the :ref:`Flags<enum_Material3D_Flags>` enum.
  539. .. rst-class:: classref-item-separator
  540. ----
  541. .. _enum_Material3D_DiffuseMode:
  542. .. rst-class:: classref-enumeration
  543. enum **DiffuseMode**:
  544. .. _class_Material3D_constant_DIFFUSE_BURLEY:
  545. .. rst-class:: classref-enumeration-constant
  546. :ref:`DiffuseMode<enum_Material3D_DiffuseMode>` **DIFFUSE_BURLEY** = ``0``
  547. Default diffuse scattering algorithm.
  548. .. _class_Material3D_constant_DIFFUSE_LAMBERT:
  549. .. rst-class:: classref-enumeration-constant
  550. :ref:`DiffuseMode<enum_Material3D_DiffuseMode>` **DIFFUSE_LAMBERT** = ``1``
  551. Diffuse scattering ignores roughness.
  552. .. _class_Material3D_constant_DIFFUSE_LAMBERT_WRAP:
  553. .. rst-class:: classref-enumeration-constant
  554. :ref:`DiffuseMode<enum_Material3D_DiffuseMode>` **DIFFUSE_LAMBERT_WRAP** = ``2``
  555. Extends Lambert to cover more than 90 degrees when roughness increases.
  556. .. _class_Material3D_constant_DIFFUSE_OREN_NAYAR:
  557. .. rst-class:: classref-enumeration-constant
  558. :ref:`DiffuseMode<enum_Material3D_DiffuseMode>` **DIFFUSE_OREN_NAYAR** = ``3``
  559. Attempts to use roughness to emulate microsurfacing.
  560. .. _class_Material3D_constant_DIFFUSE_TOON:
  561. .. rst-class:: classref-enumeration-constant
  562. :ref:`DiffuseMode<enum_Material3D_DiffuseMode>` **DIFFUSE_TOON** = ``4``
  563. Uses a hard cut for lighting, with smoothing affected by roughness.
  564. .. rst-class:: classref-item-separator
  565. ----
  566. .. _enum_Material3D_SpecularMode:
  567. .. rst-class:: classref-enumeration
  568. enum **SpecularMode**:
  569. .. _class_Material3D_constant_SPECULAR_SCHLICK_GGX:
  570. .. rst-class:: classref-enumeration-constant
  571. :ref:`SpecularMode<enum_Material3D_SpecularMode>` **SPECULAR_SCHLICK_GGX** = ``0``
  572. Default specular blob.
  573. .. _class_Material3D_constant_SPECULAR_BLINN:
  574. .. rst-class:: classref-enumeration-constant
  575. :ref:`SpecularMode<enum_Material3D_SpecularMode>` **SPECULAR_BLINN** = ``1``
  576. Older specular algorithm, included for compatibility.
  577. .. _class_Material3D_constant_SPECULAR_PHONG:
  578. .. rst-class:: classref-enumeration-constant
  579. :ref:`SpecularMode<enum_Material3D_SpecularMode>` **SPECULAR_PHONG** = ``2``
  580. Older specular algorithm, included for compatibility.
  581. .. _class_Material3D_constant_SPECULAR_TOON:
  582. .. rst-class:: classref-enumeration-constant
  583. :ref:`SpecularMode<enum_Material3D_SpecularMode>` **SPECULAR_TOON** = ``3``
  584. Toon blob which changes size based on roughness.
  585. .. _class_Material3D_constant_SPECULAR_DISABLED:
  586. .. rst-class:: classref-enumeration-constant
  587. :ref:`SpecularMode<enum_Material3D_SpecularMode>` **SPECULAR_DISABLED** = ``4``
  588. No specular blob.
  589. .. rst-class:: classref-item-separator
  590. ----
  591. .. _enum_Material3D_BillboardMode:
  592. .. rst-class:: classref-enumeration
  593. enum **BillboardMode**:
  594. .. _class_Material3D_constant_BILLBOARD_DISABLED:
  595. .. rst-class:: classref-enumeration-constant
  596. :ref:`BillboardMode<enum_Material3D_BillboardMode>` **BILLBOARD_DISABLED** = ``0``
  597. Billboard mode is disabled.
  598. .. _class_Material3D_constant_BILLBOARD_ENABLED:
  599. .. rst-class:: classref-enumeration-constant
  600. :ref:`BillboardMode<enum_Material3D_BillboardMode>` **BILLBOARD_ENABLED** = ``1``
  601. The object's Z axis will always face the camera.
  602. .. _class_Material3D_constant_BILLBOARD_FIXED_Y:
  603. .. rst-class:: classref-enumeration-constant
  604. :ref:`BillboardMode<enum_Material3D_BillboardMode>` **BILLBOARD_FIXED_Y** = ``2``
  605. The object's X axis will always face the camera.
  606. .. _class_Material3D_constant_BILLBOARD_PARTICLES:
  607. .. rst-class:: classref-enumeration-constant
  608. :ref:`BillboardMode<enum_Material3D_BillboardMode>` **BILLBOARD_PARTICLES** = ``3``
  609. Used for particle systems when assigned to :ref:`Particles<class_Particles>` and :ref:`CPUParticles<class_CPUParticles>` nodes. Enables ``particles_anim_*`` properties.
  610. The :ref:`ParticlesMaterial.anim_speed<class_ParticlesMaterial_property_anim_speed>` or :ref:`CPUParticles.anim_speed<class_CPUParticles_property_anim_speed>` should also be set to a positive value for the animation to play.
  611. .. rst-class:: classref-item-separator
  612. ----
  613. .. _enum_Material3D_TextureChannel:
  614. .. rst-class:: classref-enumeration
  615. enum **TextureChannel**:
  616. .. _class_Material3D_constant_TEXTURE_CHANNEL_RED:
  617. .. rst-class:: classref-enumeration-constant
  618. :ref:`TextureChannel<enum_Material3D_TextureChannel>` **TEXTURE_CHANNEL_RED** = ``0``
  619. Used to read from the red channel of a texture.
  620. .. _class_Material3D_constant_TEXTURE_CHANNEL_GREEN:
  621. .. rst-class:: classref-enumeration-constant
  622. :ref:`TextureChannel<enum_Material3D_TextureChannel>` **TEXTURE_CHANNEL_GREEN** = ``1``
  623. Used to read from the green channel of a texture.
  624. .. _class_Material3D_constant_TEXTURE_CHANNEL_BLUE:
  625. .. rst-class:: classref-enumeration-constant
  626. :ref:`TextureChannel<enum_Material3D_TextureChannel>` **TEXTURE_CHANNEL_BLUE** = ``2``
  627. Used to read from the blue channel of a texture.
  628. .. _class_Material3D_constant_TEXTURE_CHANNEL_ALPHA:
  629. .. rst-class:: classref-enumeration-constant
  630. :ref:`TextureChannel<enum_Material3D_TextureChannel>` **TEXTURE_CHANNEL_ALPHA** = ``3``
  631. Used to read from the alpha channel of a texture.
  632. .. _class_Material3D_constant_TEXTURE_CHANNEL_GRAYSCALE:
  633. .. rst-class:: classref-enumeration-constant
  634. :ref:`TextureChannel<enum_Material3D_TextureChannel>` **TEXTURE_CHANNEL_GRAYSCALE** = ``4``
  635. Currently unused.
  636. .. rst-class:: classref-item-separator
  637. ----
  638. .. _enum_Material3D_EmissionOperator:
  639. .. rst-class:: classref-enumeration
  640. enum **EmissionOperator**:
  641. .. _class_Material3D_constant_EMISSION_OP_ADD:
  642. .. rst-class:: classref-enumeration-constant
  643. :ref:`EmissionOperator<enum_Material3D_EmissionOperator>` **EMISSION_OP_ADD** = ``0``
  644. Adds the emission color to the color from the emission texture.
  645. .. _class_Material3D_constant_EMISSION_OP_MULTIPLY:
  646. .. rst-class:: classref-enumeration-constant
  647. :ref:`EmissionOperator<enum_Material3D_EmissionOperator>` **EMISSION_OP_MULTIPLY** = ``1``
  648. Multiplies the emission color by the color from the emission texture.
  649. .. rst-class:: classref-item-separator
  650. ----
  651. .. _enum_Material3D_DistanceFadeMode:
  652. .. rst-class:: classref-enumeration
  653. enum **DistanceFadeMode**:
  654. .. _class_Material3D_constant_DISTANCE_FADE_DISABLED:
  655. .. rst-class:: classref-enumeration-constant
  656. :ref:`DistanceFadeMode<enum_Material3D_DistanceFadeMode>` **DISTANCE_FADE_DISABLED** = ``0``
  657. Do not use distance fade.
  658. .. _class_Material3D_constant_DISTANCE_FADE_PIXEL_ALPHA:
  659. .. rst-class:: classref-enumeration-constant
  660. :ref:`DistanceFadeMode<enum_Material3D_DistanceFadeMode>` **DISTANCE_FADE_PIXEL_ALPHA** = ``1``
  661. Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel.
  662. .. _class_Material3D_constant_DISTANCE_FADE_PIXEL_DITHER:
  663. .. rst-class:: classref-enumeration-constant
  664. :ref:`DistanceFadeMode<enum_Material3D_DistanceFadeMode>` **DISTANCE_FADE_PIXEL_DITHER** = ``2``
  665. Smoothly fades the object out based on each pixel's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than :ref:`DISTANCE_FADE_PIXEL_ALPHA<class_Material3D_constant_DISTANCE_FADE_PIXEL_ALPHA>`.
  666. .. _class_Material3D_constant_DISTANCE_FADE_OBJECT_DITHER:
  667. .. rst-class:: classref-enumeration-constant
  668. :ref:`DistanceFadeMode<enum_Material3D_DistanceFadeMode>` **DISTANCE_FADE_OBJECT_DITHER** = ``3``
  669. Smoothly fades the object out based on the object's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than :ref:`DISTANCE_FADE_PIXEL_ALPHA<class_Material3D_constant_DISTANCE_FADE_PIXEL_ALPHA>`.
  670. .. rst-class:: classref-item-separator
  671. ----
  672. .. _enum_Material3D_AsyncMode:
  673. .. rst-class:: classref-enumeration
  674. enum **AsyncMode**:
  675. .. _class_Material3D_constant_ASYNC_MODE_VISIBLE:
  676. .. rst-class:: classref-enumeration-constant
  677. :ref:`AsyncMode<enum_Material3D_AsyncMode>` **ASYNC_MODE_VISIBLE** = ``0``
  678. The real conditioned shader needed on each situation will be sent for background compilation. In the meantime, a very complex shader that adapts to every situation will be used ("ubershader"). This ubershader is much slower to render, but will keep the game running without stalling to compile. Once shader compilation is done, the ubershader is replaced by the traditional optimized shader.
  679. .. _class_Material3D_constant_ASYNC_MODE_HIDDEN:
  680. .. rst-class:: classref-enumeration-constant
  681. :ref:`AsyncMode<enum_Material3D_AsyncMode>` **ASYNC_MODE_HIDDEN** = ``1``
  682. Anything with this material applied won't be rendered while this material's shader is being compiled.
  683. This is useful for optimization, in cases where the visuals won't suffer from having certain non-essential elements missing during the short time their shaders are being compiled.
  684. .. rst-class:: classref-section-separator
  685. ----
  686. .. rst-class:: classref-descriptions-group
  687. Property Descriptions
  688. ---------------------
  689. .. _class_Material3D_property_albedo_color:
  690. .. rst-class:: classref-property
  691. :ref:`Color<class_Color>` **albedo_color** = ``Color( 1, 1, 1, 1 )``
  692. .. rst-class:: classref-property-setget
  693. - void **set_albedo** **(** :ref:`Color<class_Color>` value **)**
  694. - :ref:`Color<class_Color>` **get_albedo** **(** **)**
  695. The material's base color.
  696. .. rst-class:: classref-item-separator
  697. ----
  698. .. _class_Material3D_property_albedo_texture:
  699. .. rst-class:: classref-property
  700. :ref:`Texture<class_Texture>` **albedo_texture**
  701. .. rst-class:: classref-property-setget
  702. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  703. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  704. Texture to multiply by :ref:`albedo_color<class_Material3D_property_albedo_color>`. Used for basic texturing of objects.
  705. .. rst-class:: classref-item-separator
  706. ----
  707. .. _class_Material3D_property_anisotropy:
  708. .. rst-class:: classref-property
  709. :ref:`float<class_float>` **anisotropy**
  710. .. rst-class:: classref-property-setget
  711. - void **set_anisotropy** **(** :ref:`float<class_float>` value **)**
  712. - :ref:`float<class_float>` **get_anisotropy** **(** **)**
  713. The strength of the anisotropy effect. This is multiplied by :ref:`anisotropy_flowmap<class_Material3D_property_anisotropy_flowmap>`'s alpha channel if a texture is defined there and the texture contains an alpha channel.
  714. .. rst-class:: classref-item-separator
  715. ----
  716. .. _class_Material3D_property_anisotropy_enabled:
  717. .. rst-class:: classref-property
  718. :ref:`bool<class_bool>` **anisotropy_enabled** = ``false``
  719. .. rst-class:: classref-property-setget
  720. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  721. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  722. If ``true``, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections.
  723. \ **Note:** Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken.
  724. \ **Note:** Material anisotropy should not to be confused with anisotropic texture filtering. Anisotropic texture filtering can be enabled by selecting a texture in the FileSystem dock, going to the Import dock, checking the **Anisotropic** checkbox then clicking **Reimport**. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/quality/filters/anisotropic_filter_level<class_ProjectSettings_property_rendering/quality/filters/anisotropic_filter_level>`.
  725. .. rst-class:: classref-item-separator
  726. ----
  727. .. _class_Material3D_property_anisotropy_flowmap:
  728. .. rst-class:: classref-property
  729. :ref:`Texture<class_Texture>` **anisotropy_flowmap**
  730. .. rst-class:: classref-property-setget
  731. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  732. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  733. Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion.
  734. If present, the texture's alpha channel will be used to multiply the strength of the :ref:`anisotropy<class_Material3D_property_anisotropy>` effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored.
  735. .. rst-class:: classref-item-separator
  736. ----
  737. .. _class_Material3D_property_ao_enabled:
  738. .. rst-class:: classref-property
  739. :ref:`bool<class_bool>` **ao_enabled** = ``false``
  740. .. rst-class:: classref-property-setget
  741. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  742. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  743. If ``true``, ambient occlusion is enabled. Ambient occlusion darkens areas based on the :ref:`ao_texture<class_Material3D_property_ao_texture>`.
  744. .. rst-class:: classref-item-separator
  745. ----
  746. .. _class_Material3D_property_ao_light_affect:
  747. .. rst-class:: classref-property
  748. :ref:`float<class_float>` **ao_light_affect**
  749. .. rst-class:: classref-property-setget
  750. - void **set_ao_light_affect** **(** :ref:`float<class_float>` value **)**
  751. - :ref:`float<class_float>` **get_ao_light_affect** **(** **)**
  752. Amount that ambient occlusion affects lighting from lights. If ``0``, ambient occlusion only affects ambient light. If ``1``, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic.
  753. .. rst-class:: classref-item-separator
  754. ----
  755. .. _class_Material3D_property_ao_on_uv2:
  756. .. rst-class:: classref-property
  757. :ref:`bool<class_bool>` **ao_on_uv2**
  758. .. rst-class:: classref-property-setget
  759. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  760. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  761. If ``true``, use ``UV2`` coordinates to look up from the :ref:`ao_texture<class_Material3D_property_ao_texture>`.
  762. .. rst-class:: classref-item-separator
  763. ----
  764. .. _class_Material3D_property_ao_texture:
  765. .. rst-class:: classref-property
  766. :ref:`Texture<class_Texture>` **ao_texture**
  767. .. rst-class:: classref-property-setget
  768. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  769. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  770. Texture that defines the amount of ambient occlusion for a given point on the object.
  771. .. rst-class:: classref-item-separator
  772. ----
  773. .. _class_Material3D_property_ao_texture_channel:
  774. .. rst-class:: classref-property
  775. :ref:`TextureChannel<enum_Material3D_TextureChannel>` **ao_texture_channel**
  776. .. rst-class:: classref-property-setget
  777. - void **set_ao_texture_channel** **(** :ref:`TextureChannel<enum_Material3D_TextureChannel>` value **)**
  778. - :ref:`TextureChannel<enum_Material3D_TextureChannel>` **get_ao_texture_channel** **(** **)**
  779. Specifies the channel of the :ref:`ao_texture<class_Material3D_property_ao_texture>` in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
  780. .. rst-class:: classref-item-separator
  781. ----
  782. .. _class_Material3D_property_async_mode:
  783. .. rst-class:: classref-property
  784. :ref:`AsyncMode<enum_Material3D_AsyncMode>` **async_mode** = ``0``
  785. .. rst-class:: classref-property-setget
  786. - void **set_async_mode** **(** :ref:`AsyncMode<enum_Material3D_AsyncMode>` value **)**
  787. - :ref:`AsyncMode<enum_Material3D_AsyncMode>` **get_async_mode** **(** **)**
  788. If :ref:`ProjectSettings.rendering/gles3/shaders/shader_compilation_mode<class_ProjectSettings_property_rendering/gles3/shaders/shader_compilation_mode>` is ``Synchronous`` (with or without cache), this determines how this material must behave in regards to asynchronous shader compilation.
  789. \ :ref:`ASYNC_MODE_VISIBLE<class_Material3D_constant_ASYNC_MODE_VISIBLE>` is the default and the best for most cases.
  790. .. rst-class:: classref-item-separator
  791. ----
  792. .. _class_Material3D_property_clearcoat:
  793. .. rst-class:: classref-property
  794. :ref:`float<class_float>` **clearcoat**
  795. .. rst-class:: classref-property-setget
  796. - void **set_clearcoat** **(** :ref:`float<class_float>` value **)**
  797. - :ref:`float<class_float>` **get_clearcoat** **(** **)**
  798. Sets the strength of the clearcoat effect. Setting to ``0`` looks the same as disabling the clearcoat effect.
  799. .. rst-class:: classref-item-separator
  800. ----
  801. .. _class_Material3D_property_clearcoat_enabled:
  802. .. rst-class:: classref-property
  803. :ref:`bool<class_bool>` **clearcoat_enabled** = ``false``
  804. .. rst-class:: classref-property-setget
  805. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  806. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  807. If ``true``, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough.
  808. \ **Note:** Clearcoat rendering is not visible if the material has :ref:`flags_unshaded<class_Material3D_property_flags_unshaded>` set to ``true``.
  809. .. rst-class:: classref-item-separator
  810. ----
  811. .. _class_Material3D_property_clearcoat_gloss:
  812. .. rst-class:: classref-property
  813. :ref:`float<class_float>` **clearcoat_gloss**
  814. .. rst-class:: classref-property-setget
  815. - void **set_clearcoat_gloss** **(** :ref:`float<class_float>` value **)**
  816. - :ref:`float<class_float>` **get_clearcoat_gloss** **(** **)**
  817. Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat.
  818. .. rst-class:: classref-item-separator
  819. ----
  820. .. _class_Material3D_property_clearcoat_texture:
  821. .. rst-class:: classref-property
  822. :ref:`Texture<class_Texture>` **clearcoat_texture**
  823. .. rst-class:: classref-property-setget
  824. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  825. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  826. Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel.
  827. .. rst-class:: classref-item-separator
  828. ----
  829. .. _class_Material3D_property_depth_deep_parallax:
  830. .. rst-class:: classref-property
  831. :ref:`bool<class_bool>` **depth_deep_parallax**
  832. .. rst-class:: classref-property-setget
  833. - void **set_depth_deep_parallax** **(** :ref:`bool<class_bool>` value **)**
  834. - :ref:`bool<class_bool>` **is_depth_deep_parallax_enabled** **(** **)**
  835. If ``true``, the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping.
  836. .. rst-class:: classref-item-separator
  837. ----
  838. .. _class_Material3D_property_depth_enabled:
  839. .. rst-class:: classref-property
  840. :ref:`bool<class_bool>` **depth_enabled** = ``false``
  841. .. rst-class:: classref-property-setget
  842. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  843. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  844. If ``true``, depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also :ref:`normal_enabled<class_Material3D_property_normal_enabled>`.
  845. \ **Note:** Depth mapping is not supported if triplanar mapping is used on the same material. The value of :ref:`depth_enabled<class_Material3D_property_depth_enabled>` will be ignored if :ref:`uv1_triplanar<class_Material3D_property_uv1_triplanar>` is enabled.
  846. .. rst-class:: classref-item-separator
  847. ----
  848. .. _class_Material3D_property_depth_flip_binormal:
  849. .. rst-class:: classref-property
  850. :ref:`bool<class_bool>` **depth_flip_binormal**
  851. .. rst-class:: classref-property-setget
  852. - void **set_depth_deep_parallax_flip_binormal** **(** :ref:`bool<class_bool>` value **)**
  853. - :ref:`bool<class_bool>` **get_depth_deep_parallax_flip_binormal** **(** **)**
  854. If ``true``, direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect.
  855. .. rst-class:: classref-item-separator
  856. ----
  857. .. _class_Material3D_property_depth_flip_tangent:
  858. .. rst-class:: classref-property
  859. :ref:`bool<class_bool>` **depth_flip_tangent**
  860. .. rst-class:: classref-property-setget
  861. - void **set_depth_deep_parallax_flip_tangent** **(** :ref:`bool<class_bool>` value **)**
  862. - :ref:`bool<class_bool>` **get_depth_deep_parallax_flip_tangent** **(** **)**
  863. If ``true``, direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect.
  864. .. rst-class:: classref-item-separator
  865. ----
  866. .. _class_Material3D_property_depth_max_layers:
  867. .. rst-class:: classref-property
  868. :ref:`int<class_int>` **depth_max_layers**
  869. .. rst-class:: classref-property-setget
  870. - void **set_depth_deep_parallax_max_layers** **(** :ref:`int<class_int>` value **)**
  871. - :ref:`int<class_int>` **get_depth_deep_parallax_max_layers** **(** **)**
  872. Number of layers to use when using :ref:`depth_deep_parallax<class_Material3D_property_depth_deep_parallax>` and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp.
  873. .. rst-class:: classref-item-separator
  874. ----
  875. .. _class_Material3D_property_depth_min_layers:
  876. .. rst-class:: classref-property
  877. :ref:`int<class_int>` **depth_min_layers**
  878. .. rst-class:: classref-property-setget
  879. - void **set_depth_deep_parallax_min_layers** **(** :ref:`int<class_int>` value **)**
  880. - :ref:`int<class_int>` **get_depth_deep_parallax_min_layers** **(** **)**
  881. Number of layers to use when using :ref:`depth_deep_parallax<class_Material3D_property_depth_deep_parallax>` and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp.
  882. .. rst-class:: classref-item-separator
  883. ----
  884. .. _class_Material3D_property_depth_scale:
  885. .. rst-class:: classref-property
  886. :ref:`float<class_float>` **depth_scale**
  887. .. rst-class:: classref-property-setget
  888. - void **set_depth_scale** **(** :ref:`float<class_float>` value **)**
  889. - :ref:`float<class_float>` **get_depth_scale** **(** **)**
  890. Scales the depth offset effect. A higher number will create a larger depth.
  891. .. rst-class:: classref-item-separator
  892. ----
  893. .. _class_Material3D_property_depth_texture:
  894. .. rst-class:: classref-property
  895. :ref:`Texture<class_Texture>` **depth_texture**
  896. .. rst-class:: classref-property-setget
  897. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  898. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  899. Texture used to determine depth at a given pixel. Depth is always stored in the red channel.
  900. .. rst-class:: classref-item-separator
  901. ----
  902. .. _class_Material3D_property_detail_albedo:
  903. .. rst-class:: classref-property
  904. :ref:`Texture<class_Texture>` **detail_albedo**
  905. .. rst-class:: classref-property-setget
  906. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  907. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  908. Texture that specifies the color of the detail overlay.
  909. .. rst-class:: classref-item-separator
  910. ----
  911. .. _class_Material3D_property_detail_blend_mode:
  912. .. rst-class:: classref-property
  913. :ref:`BlendMode<enum_Material3D_BlendMode>` **detail_blend_mode**
  914. .. rst-class:: classref-property-setget
  915. - void **set_detail_blend_mode** **(** :ref:`BlendMode<enum_Material3D_BlendMode>` value **)**
  916. - :ref:`BlendMode<enum_Material3D_BlendMode>` **get_detail_blend_mode** **(** **)**
  917. Specifies how the :ref:`detail_albedo<class_Material3D_property_detail_albedo>` should blend with the current ``ALBEDO``. See :ref:`BlendMode<enum_Material3D_BlendMode>` for options.
  918. .. rst-class:: classref-item-separator
  919. ----
  920. .. _class_Material3D_property_detail_enabled:
  921. .. rst-class:: classref-property
  922. :ref:`bool<class_bool>` **detail_enabled** = ``false``
  923. .. rst-class:: classref-property-setget
  924. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  925. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  926. If ``true``, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on :ref:`detail_mask<class_Material3D_property_detail_mask>`. This can be used to add variation to objects, or to blend between two different albedo/normal textures.
  927. .. rst-class:: classref-item-separator
  928. ----
  929. .. _class_Material3D_property_detail_mask:
  930. .. rst-class:: classref-property
  931. :ref:`Texture<class_Texture>` **detail_mask**
  932. .. rst-class:: classref-property-setget
  933. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  934. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  935. Texture used to specify how the detail textures get blended with the base textures.
  936. .. rst-class:: classref-item-separator
  937. ----
  938. .. _class_Material3D_property_detail_normal:
  939. .. rst-class:: classref-property
  940. :ref:`Texture<class_Texture>` **detail_normal**
  941. .. rst-class:: classref-property-setget
  942. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  943. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  944. Texture that specifies the per-pixel normal of the detail overlay.
  945. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>`__ for a comparison of normal map coordinates expected by popular engines.
  946. .. rst-class:: classref-item-separator
  947. ----
  948. .. _class_Material3D_property_detail_uv_layer:
  949. .. rst-class:: classref-property
  950. :ref:`DetailUV<enum_Material3D_DetailUV>` **detail_uv_layer**
  951. .. rst-class:: classref-property-setget
  952. - void **set_detail_uv** **(** :ref:`DetailUV<enum_Material3D_DetailUV>` value **)**
  953. - :ref:`DetailUV<enum_Material3D_DetailUV>` **get_detail_uv** **(** **)**
  954. Specifies whether to use ``UV`` or ``UV2`` for the detail layer. See :ref:`DetailUV<enum_Material3D_DetailUV>` for options.
  955. .. rst-class:: classref-item-separator
  956. ----
  957. .. _class_Material3D_property_distance_fade_max_distance:
  958. .. rst-class:: classref-property
  959. :ref:`float<class_float>` **distance_fade_max_distance**
  960. .. rst-class:: classref-property-setget
  961. - void **set_distance_fade_max_distance** **(** :ref:`float<class_float>` value **)**
  962. - :ref:`float<class_float>` **get_distance_fade_max_distance** **(** **)**
  963. Distance at which the object appears fully opaque.
  964. \ **Note:** If ``distance_fade_max_distance`` is less than ``distance_fade_min_distance``, the behavior will be reversed. The object will start to fade away at ``distance_fade_max_distance`` and will fully disappear once it reaches ``distance_fade_min_distance``.
  965. .. rst-class:: classref-item-separator
  966. ----
  967. .. _class_Material3D_property_distance_fade_min_distance:
  968. .. rst-class:: classref-property
  969. :ref:`float<class_float>` **distance_fade_min_distance**
  970. .. rst-class:: classref-property-setget
  971. - void **set_distance_fade_min_distance** **(** :ref:`float<class_float>` value **)**
  972. - :ref:`float<class_float>` **get_distance_fade_min_distance** **(** **)**
  973. Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.
  974. \ **Note:** If ``distance_fade_min_distance`` is greater than ``distance_fade_max_distance``, the behavior will be reversed. The object will start to fade away at ``distance_fade_max_distance`` and will fully disappear once it reaches ``distance_fade_min_distance``.
  975. .. rst-class:: classref-item-separator
  976. ----
  977. .. _class_Material3D_property_distance_fade_mode:
  978. .. rst-class:: classref-property
  979. :ref:`DistanceFadeMode<enum_Material3D_DistanceFadeMode>` **distance_fade_mode** = ``0``
  980. .. rst-class:: classref-property-setget
  981. - void **set_distance_fade** **(** :ref:`DistanceFadeMode<enum_Material3D_DistanceFadeMode>` value **)**
  982. - :ref:`DistanceFadeMode<enum_Material3D_DistanceFadeMode>` **get_distance_fade** **(** **)**
  983. Specifies which type of fade to use. Can be any of the :ref:`DistanceFadeMode<enum_Material3D_DistanceFadeMode>`\ s.
  984. .. rst-class:: classref-item-separator
  985. ----
  986. .. _class_Material3D_property_emission:
  987. .. rst-class:: classref-property
  988. :ref:`Color<class_Color>` **emission**
  989. .. rst-class:: classref-property-setget
  990. - void **set_emission** **(** :ref:`Color<class_Color>` value **)**
  991. - :ref:`Color<class_Color>` **get_emission** **(** **)**
  992. The emitted light's color. See :ref:`emission_enabled<class_Material3D_property_emission_enabled>`.
  993. .. rst-class:: classref-item-separator
  994. ----
  995. .. _class_Material3D_property_emission_enabled:
  996. .. rst-class:: classref-property
  997. :ref:`bool<class_bool>` **emission_enabled** = ``false``
  998. .. rst-class:: classref-property-setget
  999. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1000. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  1001. If ``true``, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a :ref:`GIProbe<class_GIProbe>` or :ref:`BakedLightmap<class_BakedLightmap>` is used and this object is used in baked lighting.
  1002. .. rst-class:: classref-item-separator
  1003. ----
  1004. .. _class_Material3D_property_emission_energy:
  1005. .. rst-class:: classref-property
  1006. :ref:`float<class_float>` **emission_energy**
  1007. .. rst-class:: classref-property-setget
  1008. - void **set_emission_energy** **(** :ref:`float<class_float>` value **)**
  1009. - :ref:`float<class_float>` **get_emission_energy** **(** **)**
  1010. The emitted light's strength. See :ref:`emission_enabled<class_Material3D_property_emission_enabled>`.
  1011. .. rst-class:: classref-item-separator
  1012. ----
  1013. .. _class_Material3D_property_emission_on_uv2:
  1014. .. rst-class:: classref-property
  1015. :ref:`bool<class_bool>` **emission_on_uv2**
  1016. .. rst-class:: classref-property-setget
  1017. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1018. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1019. Use ``UV2`` to read from the :ref:`emission_texture<class_Material3D_property_emission_texture>`.
  1020. .. rst-class:: classref-item-separator
  1021. ----
  1022. .. _class_Material3D_property_emission_operator:
  1023. .. rst-class:: classref-property
  1024. :ref:`EmissionOperator<enum_Material3D_EmissionOperator>` **emission_operator**
  1025. .. rst-class:: classref-property-setget
  1026. - void **set_emission_operator** **(** :ref:`EmissionOperator<enum_Material3D_EmissionOperator>` value **)**
  1027. - :ref:`EmissionOperator<enum_Material3D_EmissionOperator>` **get_emission_operator** **(** **)**
  1028. Sets how :ref:`emission<class_Material3D_property_emission>` interacts with :ref:`emission_texture<class_Material3D_property_emission_texture>`. Can either add or multiply. See :ref:`EmissionOperator<enum_Material3D_EmissionOperator>` for options.
  1029. .. rst-class:: classref-item-separator
  1030. ----
  1031. .. _class_Material3D_property_emission_texture:
  1032. .. rst-class:: classref-property
  1033. :ref:`Texture<class_Texture>` **emission_texture**
  1034. .. rst-class:: classref-property-setget
  1035. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1036. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1037. Texture that specifies how much surface emits light at a given point.
  1038. .. rst-class:: classref-item-separator
  1039. ----
  1040. .. _class_Material3D_property_flags_albedo_tex_force_srgb:
  1041. .. rst-class:: classref-property
  1042. :ref:`bool<class_bool>` **flags_albedo_tex_force_srgb** = ``false``
  1043. .. rst-class:: classref-property-setget
  1044. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1045. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1046. Forces a conversion of the :ref:`albedo_texture<class_Material3D_property_albedo_texture>` from sRGB space to linear space.
  1047. .. rst-class:: classref-item-separator
  1048. ----
  1049. .. _class_Material3D_property_flags_albedo_tex_msdf:
  1050. .. rst-class:: classref-property
  1051. :ref:`bool<class_bool>` **flags_albedo_tex_msdf** = ``false``
  1052. .. rst-class:: classref-property-setget
  1053. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1054. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1055. Enables signed distance field rendering shader.
  1056. .. rst-class:: classref-item-separator
  1057. ----
  1058. .. _class_Material3D_property_flags_disable_ambient_light:
  1059. .. rst-class:: classref-property
  1060. :ref:`bool<class_bool>` **flags_disable_ambient_light** = ``false``
  1061. .. rst-class:: classref-property-setget
  1062. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1063. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1064. If ``true``, the object receives no ambient light.
  1065. .. rst-class:: classref-item-separator
  1066. ----
  1067. .. _class_Material3D_property_flags_do_not_receive_shadows:
  1068. .. rst-class:: classref-property
  1069. :ref:`bool<class_bool>` **flags_do_not_receive_shadows** = ``false``
  1070. .. rst-class:: classref-property-setget
  1071. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1072. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1073. If ``true``, the object receives no shadow that would otherwise be cast onto it.
  1074. .. rst-class:: classref-item-separator
  1075. ----
  1076. .. _class_Material3D_property_flags_ensure_correct_normals:
  1077. .. rst-class:: classref-property
  1078. :ref:`bool<class_bool>` **flags_ensure_correct_normals** = ``false``
  1079. .. rst-class:: classref-property-setget
  1080. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1081. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1082. If ``true``, the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling.
  1083. .. rst-class:: classref-item-separator
  1084. ----
  1085. .. _class_Material3D_property_flags_fixed_size:
  1086. .. rst-class:: classref-property
  1087. :ref:`bool<class_bool>` **flags_fixed_size** = ``false``
  1088. .. rst-class:: classref-property-setget
  1089. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1090. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1091. If ``true``, the object is rendered at the same size regardless of distance.
  1092. .. rst-class:: classref-item-separator
  1093. ----
  1094. .. _class_Material3D_property_flags_no_depth_test:
  1095. .. rst-class:: classref-property
  1096. :ref:`bool<class_bool>` **flags_no_depth_test** = ``false``
  1097. .. rst-class:: classref-property-setget
  1098. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1099. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1100. If ``true``, depth testing is disabled and the object will be drawn in render order.
  1101. .. rst-class:: classref-item-separator
  1102. ----
  1103. .. _class_Material3D_property_flags_transparent:
  1104. .. rst-class:: classref-property
  1105. :ref:`bool<class_bool>` **flags_transparent** = ``false``
  1106. .. rst-class:: classref-property-setget
  1107. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1108. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  1109. If ``true``, transparency is enabled on the body. See also :ref:`params_blend_mode<class_Material3D_property_params_blend_mode>`.
  1110. .. rst-class:: classref-item-separator
  1111. ----
  1112. .. _class_Material3D_property_flags_unshaded:
  1113. .. rst-class:: classref-property
  1114. :ref:`bool<class_bool>` **flags_unshaded** = ``false``
  1115. .. rst-class:: classref-property-setget
  1116. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1117. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1118. If ``true``, the object is unaffected by lighting.
  1119. .. rst-class:: classref-item-separator
  1120. ----
  1121. .. _class_Material3D_property_flags_use_point_size:
  1122. .. rst-class:: classref-property
  1123. :ref:`bool<class_bool>` **flags_use_point_size** = ``false``
  1124. .. rst-class:: classref-property-setget
  1125. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1126. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1127. If ``true``, render point size can be changed.
  1128. \ **Note:** This is only effective for objects whose geometry is point-based rather than triangle-based. See also :ref:`params_point_size<class_Material3D_property_params_point_size>`.
  1129. .. rst-class:: classref-item-separator
  1130. ----
  1131. .. _class_Material3D_property_flags_use_shadow_to_opacity:
  1132. .. rst-class:: classref-property
  1133. :ref:`bool<class_bool>` **flags_use_shadow_to_opacity** = ``false``
  1134. .. rst-class:: classref-property-setget
  1135. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1136. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1137. If ``true``, enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR.
  1138. .. rst-class:: classref-item-separator
  1139. ----
  1140. .. _class_Material3D_property_flags_vertex_lighting:
  1141. .. rst-class:: classref-property
  1142. :ref:`bool<class_bool>` **flags_vertex_lighting** = ``false``
  1143. .. rst-class:: classref-property-setget
  1144. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1145. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1146. If ``true``, lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices, especially for meshes with a lower polygon count. The downside is that shading becomes much less accurate, with visible linear interpolation between vertices that are joined together. This can be compensated by ensuring meshes have a sufficient level of subdivision (but not too much, to avoid reducing performance). Some material features are also not supported when vertex shading is enabled.
  1147. See also :ref:`ProjectSettings.rendering/quality/shading/force_vertex_shading<class_ProjectSettings_property_rendering/quality/shading/force_vertex_shading>` which can globally enable vertex shading on all materials.
  1148. \ **Note:** By default, vertex shading is enforced on mobile platforms by :ref:`ProjectSettings.rendering/quality/shading/force_vertex_shading<class_ProjectSettings_property_rendering/quality/shading/force_vertex_shading>`'s ``mobile`` override.
  1149. \ **Note:** :ref:`flags_vertex_lighting<class_Material3D_property_flags_vertex_lighting>` has no effect if :ref:`flags_unshaded<class_Material3D_property_flags_unshaded>` is ``true``.
  1150. .. rst-class:: classref-item-separator
  1151. ----
  1152. .. _class_Material3D_property_flags_world_triplanar:
  1153. .. rst-class:: classref-property
  1154. :ref:`bool<class_bool>` **flags_world_triplanar** = ``false``
  1155. .. rst-class:: classref-property-setget
  1156. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1157. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1158. If ``true``, triplanar mapping is calculated in world space rather than object local space. See also :ref:`uv1_triplanar<class_Material3D_property_uv1_triplanar>`.
  1159. .. rst-class:: classref-item-separator
  1160. ----
  1161. .. _class_Material3D_property_metallic:
  1162. .. rst-class:: classref-property
  1163. :ref:`float<class_float>` **metallic** = ``0.0``
  1164. .. rst-class:: classref-property-setget
  1165. - void **set_metallic** **(** :ref:`float<class_float>` value **)**
  1166. - :ref:`float<class_float>` **get_metallic** **(** **)**
  1167. A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between ``0`` and ``1`` should only be used for blending between metal and non-metal sections. To alter the amount of reflection use :ref:`roughness<class_Material3D_property_roughness>`.
  1168. .. rst-class:: classref-item-separator
  1169. ----
  1170. .. _class_Material3D_property_metallic_specular:
  1171. .. rst-class:: classref-property
  1172. :ref:`float<class_float>` **metallic_specular** = ``0.5``
  1173. .. rst-class:: classref-property-setget
  1174. - void **set_specular** **(** :ref:`float<class_float>` value **)**
  1175. - :ref:`float<class_float>` **get_specular** **(** **)**
  1176. Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.
  1177. \ **Note:** Unlike :ref:`metallic<class_Material3D_property_metallic>`, this is not energy-conserving, so it should be left at ``0.5`` in most cases. See also :ref:`roughness<class_Material3D_property_roughness>`.
  1178. .. rst-class:: classref-item-separator
  1179. ----
  1180. .. _class_Material3D_property_metallic_texture:
  1181. .. rst-class:: classref-property
  1182. :ref:`Texture<class_Texture>` **metallic_texture**
  1183. .. rst-class:: classref-property-setget
  1184. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1185. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1186. Texture used to specify metallic for an object. This is multiplied by :ref:`metallic<class_Material3D_property_metallic>`.
  1187. .. rst-class:: classref-item-separator
  1188. ----
  1189. .. _class_Material3D_property_metallic_texture_channel:
  1190. .. rst-class:: classref-property
  1191. :ref:`TextureChannel<enum_Material3D_TextureChannel>` **metallic_texture_channel** = ``0``
  1192. .. rst-class:: classref-property-setget
  1193. - void **set_metallic_texture_channel** **(** :ref:`TextureChannel<enum_Material3D_TextureChannel>` value **)**
  1194. - :ref:`TextureChannel<enum_Material3D_TextureChannel>` **get_metallic_texture_channel** **(** **)**
  1195. Specifies the channel of the :ref:`metallic_texture<class_Material3D_property_metallic_texture>` in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
  1196. .. rst-class:: classref-item-separator
  1197. ----
  1198. .. _class_Material3D_property_normal_enabled:
  1199. .. rst-class:: classref-property
  1200. :ref:`bool<class_bool>` **normal_enabled** = ``false``
  1201. .. rst-class:: classref-property-setget
  1202. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1203. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  1204. If ``true``, normal mapping is enabled.
  1205. .. rst-class:: classref-item-separator
  1206. ----
  1207. .. _class_Material3D_property_normal_scale:
  1208. .. rst-class:: classref-property
  1209. :ref:`float<class_float>` **normal_scale**
  1210. .. rst-class:: classref-property-setget
  1211. - void **set_normal_scale** **(** :ref:`float<class_float>` value **)**
  1212. - :ref:`float<class_float>` **get_normal_scale** **(** **)**
  1213. The strength of the normal map's effect.
  1214. .. rst-class:: classref-item-separator
  1215. ----
  1216. .. _class_Material3D_property_normal_texture:
  1217. .. rst-class:: classref-property
  1218. :ref:`Texture<class_Texture>` **normal_texture**
  1219. .. rst-class:: classref-property-setget
  1220. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1221. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1222. Texture used to specify the normal at a given pixel. The ``normal_texture`` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from ``normal_texture`` is oriented around the surface normal provided by the :ref:`Mesh<class_Mesh>`.
  1223. \ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with :ref:`SurfaceTool<class_SurfaceTool>`, you can use :ref:`SurfaceTool.generate_normals<class_SurfaceTool_method_generate_normals>` and :ref:`SurfaceTool.generate_tangents<class_SurfaceTool_method_generate_tangents>` to automatically generate normals and tangents respectively.
  1224. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>`__ for a comparison of normal map coordinates expected by popular engines.
  1225. .. rst-class:: classref-item-separator
  1226. ----
  1227. .. _class_Material3D_property_orm_texture:
  1228. .. rst-class:: classref-property
  1229. :ref:`Texture<class_Texture>` **orm_texture**
  1230. .. rst-class:: classref-property-setget
  1231. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1232. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1233. A single texture that combines information about AO, roughness and metallic. AO is stored in the red channel, roughness in the green channel and metallic in the blue channel.
  1234. .. rst-class:: classref-item-separator
  1235. ----
  1236. .. _class_Material3D_property_params_alpha_scissor_threshold:
  1237. .. rst-class:: classref-property
  1238. :ref:`float<class_float>` **params_alpha_scissor_threshold**
  1239. .. rst-class:: classref-property-setget
  1240. - void **set_alpha_scissor_threshold** **(** :ref:`float<class_float>` value **)**
  1241. - :ref:`float<class_float>` **get_alpha_scissor_threshold** **(** **)**
  1242. Threshold at which the alpha scissor will discard values.
  1243. .. rst-class:: classref-item-separator
  1244. ----
  1245. .. _class_Material3D_property_params_billboard_keep_scale:
  1246. .. rst-class:: classref-property
  1247. :ref:`bool<class_bool>` **params_billboard_keep_scale** = ``false``
  1248. .. rst-class:: classref-property-setget
  1249. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1250. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1251. If ``true``, the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when :ref:`params_billboard_mode<class_Material3D_property_params_billboard_mode>` is :ref:`BILLBOARD_ENABLED<class_Material3D_constant_BILLBOARD_ENABLED>`.
  1252. .. rst-class:: classref-item-separator
  1253. ----
  1254. .. _class_Material3D_property_params_billboard_mode:
  1255. .. rst-class:: classref-property
  1256. :ref:`BillboardMode<enum_Material3D_BillboardMode>` **params_billboard_mode** = ``0``
  1257. .. rst-class:: classref-property-setget
  1258. - void **set_billboard_mode** **(** :ref:`BillboardMode<enum_Material3D_BillboardMode>` value **)**
  1259. - :ref:`BillboardMode<enum_Material3D_BillboardMode>` **get_billboard_mode** **(** **)**
  1260. Controls how the object faces the camera. See :ref:`BillboardMode<enum_Material3D_BillboardMode>`.
  1261. \ **Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See `GitHub issue #41567 <https://github.com/godotengine/godot/issues/41567>`__ for details.
  1262. .. rst-class:: classref-item-separator
  1263. ----
  1264. .. _class_Material3D_property_params_blend_mode:
  1265. .. rst-class:: classref-property
  1266. :ref:`BlendMode<enum_Material3D_BlendMode>` **params_blend_mode** = ``0``
  1267. .. rst-class:: classref-property-setget
  1268. - void **set_blend_mode** **(** :ref:`BlendMode<enum_Material3D_BlendMode>` value **)**
  1269. - :ref:`BlendMode<enum_Material3D_BlendMode>` **get_blend_mode** **(** **)**
  1270. The material's blend mode.
  1271. \ **Note:** Values other than ``Mix`` force the object into the transparent pipeline. See :ref:`BlendMode<enum_Material3D_BlendMode>`.
  1272. .. rst-class:: classref-item-separator
  1273. ----
  1274. .. _class_Material3D_property_params_cull_mode:
  1275. .. rst-class:: classref-property
  1276. :ref:`CullMode<enum_Material3D_CullMode>` **params_cull_mode** = ``0``
  1277. .. rst-class:: classref-property-setget
  1278. - void **set_cull_mode** **(** :ref:`CullMode<enum_Material3D_CullMode>` value **)**
  1279. - :ref:`CullMode<enum_Material3D_CullMode>` **get_cull_mode** **(** **)**
  1280. Which side of the object is not drawn when backfaces are rendered. See :ref:`CullMode<enum_Material3D_CullMode>`.
  1281. .. rst-class:: classref-item-separator
  1282. ----
  1283. .. _class_Material3D_property_params_depth_draw_mode:
  1284. .. rst-class:: classref-property
  1285. :ref:`DepthDrawMode<enum_Material3D_DepthDrawMode>` **params_depth_draw_mode** = ``0``
  1286. .. rst-class:: classref-property-setget
  1287. - void **set_depth_draw_mode** **(** :ref:`DepthDrawMode<enum_Material3D_DepthDrawMode>` value **)**
  1288. - :ref:`DepthDrawMode<enum_Material3D_DepthDrawMode>` **get_depth_draw_mode** **(** **)**
  1289. Determines when depth rendering takes place. See :ref:`DepthDrawMode<enum_Material3D_DepthDrawMode>`. See also :ref:`flags_transparent<class_Material3D_property_flags_transparent>`.
  1290. .. rst-class:: classref-item-separator
  1291. ----
  1292. .. _class_Material3D_property_params_diffuse_mode:
  1293. .. rst-class:: classref-property
  1294. :ref:`DiffuseMode<enum_Material3D_DiffuseMode>` **params_diffuse_mode** = ``0``
  1295. .. rst-class:: classref-property-setget
  1296. - void **set_diffuse_mode** **(** :ref:`DiffuseMode<enum_Material3D_DiffuseMode>` value **)**
  1297. - :ref:`DiffuseMode<enum_Material3D_DiffuseMode>` **get_diffuse_mode** **(** **)**
  1298. The algorithm used for diffuse light scattering. See :ref:`DiffuseMode<enum_Material3D_DiffuseMode>`.
  1299. .. rst-class:: classref-item-separator
  1300. ----
  1301. .. _class_Material3D_property_params_grow:
  1302. .. rst-class:: classref-property
  1303. :ref:`bool<class_bool>` **params_grow** = ``false``
  1304. .. rst-class:: classref-property-setget
  1305. - void **set_grow_enabled** **(** :ref:`bool<class_bool>` value **)**
  1306. - :ref:`bool<class_bool>` **is_grow_enabled** **(** **)**
  1307. If ``true``, enables the vertex grow setting. See :ref:`params_grow_amount<class_Material3D_property_params_grow_amount>`.
  1308. .. rst-class:: classref-item-separator
  1309. ----
  1310. .. _class_Material3D_property_params_grow_amount:
  1311. .. rst-class:: classref-property
  1312. :ref:`float<class_float>` **params_grow_amount**
  1313. .. rst-class:: classref-property-setget
  1314. - void **set_grow** **(** :ref:`float<class_float>` value **)**
  1315. - :ref:`float<class_float>` **get_grow** **(** **)**
  1316. Grows object vertices in the direction of their normals.
  1317. .. rst-class:: classref-item-separator
  1318. ----
  1319. .. _class_Material3D_property_params_line_width:
  1320. .. rst-class:: classref-property
  1321. :ref:`float<class_float>` **params_line_width** = ``1.0``
  1322. .. rst-class:: classref-property-setget
  1323. - void **set_line_width** **(** :ref:`float<class_float>` value **)**
  1324. - :ref:`float<class_float>` **get_line_width** **(** **)**
  1325. Currently unimplemented in Godot.
  1326. .. rst-class:: classref-item-separator
  1327. ----
  1328. .. _class_Material3D_property_params_point_size:
  1329. .. rst-class:: classref-property
  1330. :ref:`float<class_float>` **params_point_size** = ``1.0``
  1331. .. rst-class:: classref-property-setget
  1332. - void **set_point_size** **(** :ref:`float<class_float>` value **)**
  1333. - :ref:`float<class_float>` **get_point_size** **(** **)**
  1334. The point size in pixels. See :ref:`flags_use_point_size<class_Material3D_property_flags_use_point_size>`.
  1335. .. rst-class:: classref-item-separator
  1336. ----
  1337. .. _class_Material3D_property_params_specular_mode:
  1338. .. rst-class:: classref-property
  1339. :ref:`SpecularMode<enum_Material3D_SpecularMode>` **params_specular_mode** = ``0``
  1340. .. rst-class:: classref-property-setget
  1341. - void **set_specular_mode** **(** :ref:`SpecularMode<enum_Material3D_SpecularMode>` value **)**
  1342. - :ref:`SpecularMode<enum_Material3D_SpecularMode>` **get_specular_mode** **(** **)**
  1343. The method for rendering the specular blob. See :ref:`SpecularMode<enum_Material3D_SpecularMode>`.
  1344. .. rst-class:: classref-item-separator
  1345. ----
  1346. .. _class_Material3D_property_params_use_alpha_scissor:
  1347. .. rst-class:: classref-property
  1348. :ref:`bool<class_bool>` **params_use_alpha_scissor** = ``false``
  1349. .. rst-class:: classref-property-setget
  1350. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1351. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1352. If ``true``, the shader will discard all pixels that have an alpha value less than :ref:`params_alpha_scissor_threshold<class_Material3D_property_params_alpha_scissor_threshold>`.
  1353. .. rst-class:: classref-item-separator
  1354. ----
  1355. .. _class_Material3D_property_particles_anim_h_frames:
  1356. .. rst-class:: classref-property
  1357. :ref:`int<class_int>` **particles_anim_h_frames**
  1358. .. rst-class:: classref-property-setget
  1359. - void **set_particles_anim_h_frames** **(** :ref:`int<class_int>` value **)**
  1360. - :ref:`int<class_int>` **get_particles_anim_h_frames** **(** **)**
  1361. The number of horizontal frames in the particle sprite sheet. Only enabled when using :ref:`BILLBOARD_PARTICLES<class_Material3D_constant_BILLBOARD_PARTICLES>`. See :ref:`params_billboard_mode<class_Material3D_property_params_billboard_mode>`.
  1362. .. rst-class:: classref-item-separator
  1363. ----
  1364. .. _class_Material3D_property_particles_anim_loop:
  1365. .. rst-class:: classref-property
  1366. :ref:`bool<class_bool>` **particles_anim_loop**
  1367. .. rst-class:: classref-property-setget
  1368. - void **set_particles_anim_loop** **(** :ref:`bool<class_bool>` value **)**
  1369. - :ref:`bool<class_bool>` **get_particles_anim_loop** **(** **)**
  1370. If ``true``, particle animations are looped. Only enabled when using :ref:`BILLBOARD_PARTICLES<class_Material3D_constant_BILLBOARD_PARTICLES>`. See :ref:`params_billboard_mode<class_Material3D_property_params_billboard_mode>`.
  1371. .. rst-class:: classref-item-separator
  1372. ----
  1373. .. _class_Material3D_property_particles_anim_v_frames:
  1374. .. rst-class:: classref-property
  1375. :ref:`int<class_int>` **particles_anim_v_frames**
  1376. .. rst-class:: classref-property-setget
  1377. - void **set_particles_anim_v_frames** **(** :ref:`int<class_int>` value **)**
  1378. - :ref:`int<class_int>` **get_particles_anim_v_frames** **(** **)**
  1379. The number of vertical frames in the particle sprite sheet. Only enabled when using :ref:`BILLBOARD_PARTICLES<class_Material3D_constant_BILLBOARD_PARTICLES>`. See :ref:`params_billboard_mode<class_Material3D_property_params_billboard_mode>`.
  1380. .. rst-class:: classref-item-separator
  1381. ----
  1382. .. _class_Material3D_property_proximity_fade_distance:
  1383. .. rst-class:: classref-property
  1384. :ref:`float<class_float>` **proximity_fade_distance**
  1385. .. rst-class:: classref-property-setget
  1386. - void **set_proximity_fade_distance** **(** :ref:`float<class_float>` value **)**
  1387. - :ref:`float<class_float>` **get_proximity_fade_distance** **(** **)**
  1388. Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade.
  1389. .. rst-class:: classref-item-separator
  1390. ----
  1391. .. _class_Material3D_property_proximity_fade_enable:
  1392. .. rst-class:: classref-property
  1393. :ref:`bool<class_bool>` **proximity_fade_enable** = ``false``
  1394. .. rst-class:: classref-property-setget
  1395. - void **set_proximity_fade** **(** :ref:`bool<class_bool>` value **)**
  1396. - :ref:`bool<class_bool>` **is_proximity_fade_enabled** **(** **)**
  1397. If ``true``, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object.
  1398. .. rst-class:: classref-item-separator
  1399. ----
  1400. .. _class_Material3D_property_refraction_enabled:
  1401. .. rst-class:: classref-property
  1402. :ref:`bool<class_bool>` **refraction_enabled** = ``false``
  1403. .. rst-class:: classref-property-setget
  1404. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1405. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  1406. If ``true``, the refraction effect is enabled. Refraction distorts transparency based on light from behind the object. When using the GLES3 backend, the material's roughness value will affect the blurriness of the refraction. Higher roughness values will make the refraction look blurrier.
  1407. .. rst-class:: classref-item-separator
  1408. ----
  1409. .. _class_Material3D_property_refraction_scale:
  1410. .. rst-class:: classref-property
  1411. :ref:`float<class_float>` **refraction_scale**
  1412. .. rst-class:: classref-property-setget
  1413. - void **set_refraction** **(** :ref:`float<class_float>` value **)**
  1414. - :ref:`float<class_float>` **get_refraction** **(** **)**
  1415. The strength of the refraction effect. Higher values result in a more distorted appearance for the refraction.
  1416. .. rst-class:: classref-item-separator
  1417. ----
  1418. .. _class_Material3D_property_refraction_texture:
  1419. .. rst-class:: classref-property
  1420. :ref:`Texture<class_Texture>` **refraction_texture**
  1421. .. rst-class:: classref-property-setget
  1422. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1423. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1424. Texture that controls the strength of the refraction per-pixel. Multiplied by :ref:`refraction_scale<class_Material3D_property_refraction_scale>`.
  1425. .. rst-class:: classref-item-separator
  1426. ----
  1427. .. _class_Material3D_property_refraction_texture_channel:
  1428. .. rst-class:: classref-property
  1429. :ref:`TextureChannel<enum_Material3D_TextureChannel>` **refraction_texture_channel**
  1430. .. rst-class:: classref-property-setget
  1431. - void **set_refraction_texture_channel** **(** :ref:`TextureChannel<enum_Material3D_TextureChannel>` value **)**
  1432. - :ref:`TextureChannel<enum_Material3D_TextureChannel>` **get_refraction_texture_channel** **(** **)**
  1433. Specifies the channel of the :ref:`refraction_texture<class_Material3D_property_refraction_texture>` in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
  1434. .. rst-class:: classref-item-separator
  1435. ----
  1436. .. _class_Material3D_property_rim:
  1437. .. rst-class:: classref-property
  1438. :ref:`float<class_float>` **rim**
  1439. .. rst-class:: classref-property-setget
  1440. - void **set_rim** **(** :ref:`float<class_float>` value **)**
  1441. - :ref:`float<class_float>` **get_rim** **(** **)**
  1442. Sets the strength of the rim lighting effect.
  1443. .. rst-class:: classref-item-separator
  1444. ----
  1445. .. _class_Material3D_property_rim_enabled:
  1446. .. rst-class:: classref-property
  1447. :ref:`bool<class_bool>` **rim_enabled** = ``false``
  1448. .. rst-class:: classref-property-setget
  1449. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1450. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  1451. If ``true``, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object.
  1452. \ **Note:** Rim lighting is not visible if the material has :ref:`flags_unshaded<class_Material3D_property_flags_unshaded>` set to ``true``.
  1453. .. rst-class:: classref-item-separator
  1454. ----
  1455. .. _class_Material3D_property_rim_texture:
  1456. .. rst-class:: classref-property
  1457. :ref:`Texture<class_Texture>` **rim_texture**
  1458. .. rst-class:: classref-property-setget
  1459. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1460. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1461. Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by :ref:`rim<class_Material3D_property_rim>`.
  1462. .. rst-class:: classref-item-separator
  1463. ----
  1464. .. _class_Material3D_property_rim_tint:
  1465. .. rst-class:: classref-property
  1466. :ref:`float<class_float>` **rim_tint**
  1467. .. rst-class:: classref-property-setget
  1468. - void **set_rim_tint** **(** :ref:`float<class_float>` value **)**
  1469. - :ref:`float<class_float>` **get_rim_tint** **(** **)**
  1470. The amount of to blend light and albedo color when rendering rim effect. If ``0`` the light color is used, while ``1`` means albedo color is used. An intermediate value generally works best.
  1471. .. rst-class:: classref-item-separator
  1472. ----
  1473. .. _class_Material3D_property_roughness:
  1474. .. rst-class:: classref-property
  1475. :ref:`float<class_float>` **roughness** = ``1.0``
  1476. .. rst-class:: classref-property-setget
  1477. - void **set_roughness** **(** :ref:`float<class_float>` value **)**
  1478. - :ref:`float<class_float>` **get_roughness** **(** **)**
  1479. Surface reflection. A value of ``0`` represents a perfect mirror while a value of ``1`` completely blurs the reflection. See also :ref:`metallic<class_Material3D_property_metallic>`.
  1480. .. rst-class:: classref-item-separator
  1481. ----
  1482. .. _class_Material3D_property_roughness_texture:
  1483. .. rst-class:: classref-property
  1484. :ref:`Texture<class_Texture>` **roughness_texture**
  1485. .. rst-class:: classref-property-setget
  1486. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1487. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1488. Texture used to control the roughness per-pixel. Multiplied by :ref:`roughness<class_Material3D_property_roughness>`.
  1489. .. rst-class:: classref-item-separator
  1490. ----
  1491. .. _class_Material3D_property_roughness_texture_channel:
  1492. .. rst-class:: classref-property
  1493. :ref:`TextureChannel<enum_Material3D_TextureChannel>` **roughness_texture_channel** = ``0``
  1494. .. rst-class:: classref-property-setget
  1495. - void **set_roughness_texture_channel** **(** :ref:`TextureChannel<enum_Material3D_TextureChannel>` value **)**
  1496. - :ref:`TextureChannel<enum_Material3D_TextureChannel>` **get_roughness_texture_channel** **(** **)**
  1497. Specifies the channel of the :ref:`ao_texture<class_Material3D_property_ao_texture>` in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
  1498. .. rst-class:: classref-item-separator
  1499. ----
  1500. .. _class_Material3D_property_subsurf_scatter_enabled:
  1501. .. rst-class:: classref-property
  1502. :ref:`bool<class_bool>` **subsurf_scatter_enabled** = ``false``
  1503. .. rst-class:: classref-property-setget
  1504. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1505. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  1506. If ``true``, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.
  1507. .. rst-class:: classref-item-separator
  1508. ----
  1509. .. _class_Material3D_property_subsurf_scatter_strength:
  1510. .. rst-class:: classref-property
  1511. :ref:`float<class_float>` **subsurf_scatter_strength**
  1512. .. rst-class:: classref-property-setget
  1513. - void **set_subsurface_scattering_strength** **(** :ref:`float<class_float>` value **)**
  1514. - :ref:`float<class_float>` **get_subsurface_scattering_strength** **(** **)**
  1515. The strength of the subsurface scattering effect.
  1516. .. rst-class:: classref-item-separator
  1517. ----
  1518. .. _class_Material3D_property_subsurf_scatter_texture:
  1519. .. rst-class:: classref-property
  1520. :ref:`Texture<class_Texture>` **subsurf_scatter_texture**
  1521. .. rst-class:: classref-property-setget
  1522. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1523. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1524. Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by :ref:`subsurf_scatter_strength<class_Material3D_property_subsurf_scatter_strength>`.
  1525. .. rst-class:: classref-item-separator
  1526. ----
  1527. .. _class_Material3D_property_transmission:
  1528. .. rst-class:: classref-property
  1529. :ref:`Color<class_Color>` **transmission**
  1530. .. rst-class:: classref-property-setget
  1531. - void **set_transmission** **(** :ref:`Color<class_Color>` value **)**
  1532. - :ref:`Color<class_Color>` **get_transmission** **(** **)**
  1533. The color used by the transmission effect. Represents the light passing through an object.
  1534. .. rst-class:: classref-item-separator
  1535. ----
  1536. .. _class_Material3D_property_transmission_enabled:
  1537. .. rst-class:: classref-property
  1538. :ref:`bool<class_bool>` **transmission_enabled** = ``false``
  1539. .. rst-class:: classref-property-setget
  1540. - void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1541. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  1542. If ``true``, the transmission effect is enabled.
  1543. .. rst-class:: classref-item-separator
  1544. ----
  1545. .. _class_Material3D_property_transmission_texture:
  1546. .. rst-class:: classref-property
  1547. :ref:`Texture<class_Texture>` **transmission_texture**
  1548. .. rst-class:: classref-property-setget
  1549. - void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1550. - :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1551. Texture used to control the transmission effect per-pixel. Added to :ref:`transmission<class_Material3D_property_transmission>`.
  1552. .. rst-class:: classref-item-separator
  1553. ----
  1554. .. _class_Material3D_property_uv1_offset:
  1555. .. rst-class:: classref-property
  1556. :ref:`Vector3<class_Vector3>` **uv1_offset** = ``Vector3( 0, 0, 0 )``
  1557. .. rst-class:: classref-property-setget
  1558. - void **set_uv1_offset** **(** :ref:`Vector3<class_Vector3>` value **)**
  1559. - :ref:`Vector3<class_Vector3>` **get_uv1_offset** **(** **)**
  1560. How much to offset the ``UV`` coordinates. This amount will be added to ``UV`` in the vertex function. This can be used to offset a texture.
  1561. .. rst-class:: classref-item-separator
  1562. ----
  1563. .. _class_Material3D_property_uv1_scale:
  1564. .. rst-class:: classref-property
  1565. :ref:`Vector3<class_Vector3>` **uv1_scale** = ``Vector3( 1, 1, 1 )``
  1566. .. rst-class:: classref-property-setget
  1567. - void **set_uv1_scale** **(** :ref:`Vector3<class_Vector3>` value **)**
  1568. - :ref:`Vector3<class_Vector3>` **get_uv1_scale** **(** **)**
  1569. How much to scale the ``UV`` coordinates. This is multiplied by ``UV`` in the vertex function.
  1570. .. rst-class:: classref-item-separator
  1571. ----
  1572. .. _class_Material3D_property_uv1_triplanar:
  1573. .. rst-class:: classref-property
  1574. :ref:`bool<class_bool>` **uv1_triplanar** = ``false``
  1575. .. rst-class:: classref-property-setget
  1576. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1577. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1578. If ``true``, instead of using ``UV`` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.
  1579. .. rst-class:: classref-item-separator
  1580. ----
  1581. .. _class_Material3D_property_uv1_triplanar_sharpness:
  1582. .. rst-class:: classref-property
  1583. :ref:`float<class_float>` **uv1_triplanar_sharpness**
  1584. .. rst-class:: classref-property-setget
  1585. - void **set_uv1_triplanar_blend_sharpness** **(** :ref:`float<class_float>` value **)**
  1586. - :ref:`float<class_float>` **get_uv1_triplanar_blend_sharpness** **(** **)**
  1587. A lower number blends the texture more softly while a higher number blends the texture more sharply.
  1588. \ **Note:** :ref:`uv1_triplanar_sharpness<class_Material3D_property_uv1_triplanar_sharpness>` is clamped between ``0.0`` and ``150.0`` (inclusive) as values outside that range can look broken depending on the mesh.
  1589. .. rst-class:: classref-item-separator
  1590. ----
  1591. .. _class_Material3D_property_uv2_offset:
  1592. .. rst-class:: classref-property
  1593. :ref:`Vector3<class_Vector3>` **uv2_offset** = ``Vector3( 0, 0, 0 )``
  1594. .. rst-class:: classref-property-setget
  1595. - void **set_uv2_offset** **(** :ref:`Vector3<class_Vector3>` value **)**
  1596. - :ref:`Vector3<class_Vector3>` **get_uv2_offset** **(** **)**
  1597. How much to offset the ``UV2`` coordinates. This amount will be added to ``UV2`` in the vertex function. This can be used to offset a texture.
  1598. .. rst-class:: classref-item-separator
  1599. ----
  1600. .. _class_Material3D_property_uv2_scale:
  1601. .. rst-class:: classref-property
  1602. :ref:`Vector3<class_Vector3>` **uv2_scale** = ``Vector3( 1, 1, 1 )``
  1603. .. rst-class:: classref-property-setget
  1604. - void **set_uv2_scale** **(** :ref:`Vector3<class_Vector3>` value **)**
  1605. - :ref:`Vector3<class_Vector3>` **get_uv2_scale** **(** **)**
  1606. How much to scale the ``UV2`` coordinates. This is multiplied by ``UV2`` in the vertex function.
  1607. .. rst-class:: classref-item-separator
  1608. ----
  1609. .. _class_Material3D_property_uv2_triplanar:
  1610. .. rst-class:: classref-property
  1611. :ref:`bool<class_bool>` **uv2_triplanar** = ``false``
  1612. .. rst-class:: classref-property-setget
  1613. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1614. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1615. If ``true``, instead of using ``UV2`` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.
  1616. .. rst-class:: classref-item-separator
  1617. ----
  1618. .. _class_Material3D_property_uv2_triplanar_sharpness:
  1619. .. rst-class:: classref-property
  1620. :ref:`float<class_float>` **uv2_triplanar_sharpness**
  1621. .. rst-class:: classref-property-setget
  1622. - void **set_uv2_triplanar_blend_sharpness** **(** :ref:`float<class_float>` value **)**
  1623. - :ref:`float<class_float>` **get_uv2_triplanar_blend_sharpness** **(** **)**
  1624. A lower number blends the texture more softly while a higher number blends the texture more sharply.
  1625. \ **Note:** :ref:`uv2_triplanar_sharpness<class_Material3D_property_uv2_triplanar_sharpness>` is clamped between ``0.0`` and ``150.0`` (inclusive) as values outside that range can look broken depending on the mesh.
  1626. .. rst-class:: classref-item-separator
  1627. ----
  1628. .. _class_Material3D_property_vertex_color_is_srgb:
  1629. .. rst-class:: classref-property
  1630. :ref:`bool<class_bool>` **vertex_color_is_srgb** = ``false``
  1631. .. rst-class:: classref-property-setget
  1632. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1633. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1634. If ``true``, the model's vertex colors are processed as sRGB mode.
  1635. .. rst-class:: classref-item-separator
  1636. ----
  1637. .. _class_Material3D_property_vertex_color_use_as_albedo:
  1638. .. rst-class:: classref-property
  1639. :ref:`bool<class_bool>` **vertex_color_use_as_albedo** = ``false``
  1640. .. rst-class:: classref-property-setget
  1641. - void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1642. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1643. If ``true``, the vertex color is used as albedo color.
  1644. .. rst-class:: classref-section-separator
  1645. ----
  1646. .. rst-class:: classref-descriptions-group
  1647. Method Descriptions
  1648. -------------------
  1649. .. _class_Material3D_method_get_feature:
  1650. .. rst-class:: classref-method
  1651. :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature **)** |const|
  1652. Returns ``true``, if the specified :ref:`Feature<enum_Material3D_Feature>` is enabled.
  1653. .. rst-class:: classref-item-separator
  1654. ----
  1655. .. _class_Material3D_method_get_flag:
  1656. .. rst-class:: classref-method
  1657. :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag **)** |const|
  1658. Returns ``true``, if the specified flag is enabled. See :ref:`Flags<enum_Material3D_Flags>` enumerator for options.
  1659. .. rst-class:: classref-item-separator
  1660. ----
  1661. .. _class_Material3D_method_get_texture:
  1662. .. rst-class:: classref-method
  1663. :ref:`Texture<class_Texture>` **get_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param **)** |const|
  1664. Returns the :ref:`Texture<class_Texture>` associated with the specified :ref:`TextureParam<enum_Material3D_TextureParam>`.
  1665. .. rst-class:: classref-item-separator
  1666. ----
  1667. .. _class_Material3D_method_set_feature:
  1668. .. rst-class:: classref-method
  1669. void **set_feature** **(** :ref:`Feature<enum_Material3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1670. If ``true``, enables the specified :ref:`Feature<enum_Material3D_Feature>`. Many features that are available in :ref:`SpatialMaterial<class_SpatialMaterial>`\ s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to ``true``.
  1671. .. rst-class:: classref-item-separator
  1672. ----
  1673. .. _class_Material3D_method_set_flag:
  1674. .. rst-class:: classref-method
  1675. void **set_flag** **(** :ref:`Flags<enum_Material3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1676. If ``true``, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to ``true``. See :ref:`Flags<enum_Material3D_Flags>` enumerator for options.
  1677. .. rst-class:: classref-item-separator
  1678. ----
  1679. .. _class_Material3D_method_set_texture:
  1680. .. rst-class:: classref-method
  1681. void **set_texture** **(** :ref:`TextureParam<enum_Material3D_TextureParam>` param, :ref:`Texture<class_Texture>` texture **)**
  1682. Sets the :ref:`Texture<class_Texture>` to be used by the specified :ref:`TextureParam<enum_Material3D_TextureParam>`. This function is called when setting members ending in ``*_texture``.
  1683. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1684. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1685. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1686. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`