Shader.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Shader" inherits="Resource" category="Core" version="3.1">
  3. <brief_description>
  4. A custom shader program.
  5. </brief_description>
  6. <description>
  7. This class allows you to define a custom shader program that can be used for various materials to render objects.
  8. </description>
  9. <tutorials>
  10. <link>https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link>
  11. </tutorials>
  12. <demos>
  13. </demos>
  14. <methods>
  15. <method name="get_default_texture_param" qualifiers="const">
  16. <return type="Texture">
  17. </return>
  18. <argument index="0" name="param" type="String">
  19. </argument>
  20. <description>
  21. </description>
  22. </method>
  23. <method name="get_mode" qualifiers="const">
  24. <return type="int" enum="Shader.Mode">
  25. </return>
  26. <description>
  27. Returns the shader mode for the shader, either [code]MODE_CANVAS_ITEM[/code], [code]MODE_SPATIAL[/code] or [code]MODE_PARTICLES[/code]
  28. </description>
  29. </method>
  30. <method name="has_param" qualifiers="const">
  31. <return type="bool">
  32. </return>
  33. <argument index="0" name="name" type="String">
  34. </argument>
  35. <description>
  36. </description>
  37. </method>
  38. <method name="set_default_texture_param">
  39. <return type="void">
  40. </return>
  41. <argument index="0" name="param" type="String">
  42. </argument>
  43. <argument index="1" name="texture" type="Texture">
  44. </argument>
  45. <description>
  46. </description>
  47. </method>
  48. </methods>
  49. <members>
  50. <member name="code" type="String" setter="set_code" getter="get_code">
  51. </member>
  52. </members>
  53. <constants>
  54. <constant name="MODE_SPATIAL" value="0" enum="Mode">
  55. </constant>
  56. <constant name="MODE_CANVAS_ITEM" value="1" enum="Mode">
  57. </constant>
  58. <constant name="MODE_PARTICLES" value="2" enum="Mode">
  59. </constant>
  60. </constants>
  61. </class>