VisualShaderNodeTexture.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisualShaderNodeTexture" inherits="VisualShaderNode" version="4.0">
  3. <brief_description>
  4. Performs a 2D texture lookup within the visual shader graph.
  5. </brief_description>
  6. <description>
  7. Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <members>
  12. <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source" default="0">
  13. Determines the source for the lookup. See [enum Source] for options.
  14. </member>
  15. <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
  16. The source texture, if needed for the selected [member source].
  17. </member>
  18. <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTexture.TextureType" default="0">
  19. Specifies the type of the texture if [member source] is set to [constant SOURCE_TEXTURE]. See [enum TextureType] for options.
  20. </member>
  21. </members>
  22. <constants>
  23. <constant name="SOURCE_TEXTURE" value="0" enum="Source">
  24. Use the texture given as an argument for this function.
  25. </constant>
  26. <constant name="SOURCE_SCREEN" value="1" enum="Source">
  27. Use the current viewport's texture as the source.
  28. </constant>
  29. <constant name="SOURCE_2D_TEXTURE" value="2" enum="Source">
  30. Use the texture from this shader's texture built-in (e.g. a texture of a [Sprite2D]).
  31. </constant>
  32. <constant name="SOURCE_2D_NORMAL" value="3" enum="Source">
  33. Use the texture from this shader's normal map built-in.
  34. </constant>
  35. <constant name="SOURCE_DEPTH" value="4" enum="Source">
  36. Use the depth texture available for this shader.
  37. </constant>
  38. <constant name="SOURCE_PORT" value="5" enum="Source">
  39. Use the texture provided in the input port for this function.
  40. </constant>
  41. <constant name="SOURCE_MAX" value="6" enum="Source">
  42. Represents the size of the [enum Source] enum.
  43. </constant>
  44. <constant name="TYPE_DATA" value="0" enum="TextureType">
  45. No hints are added to the uniform declaration.
  46. </constant>
  47. <constant name="TYPE_COLOR" value="1" enum="TextureType">
  48. Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
  49. </constant>
  50. <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
  51. Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
  52. </constant>
  53. <constant name="TYPE_MAX" value="3" enum="TextureType">
  54. Represents the size of the [enum TextureType] enum.
  55. </constant>
  56. </constants>
  57. </class>