VisualShaderNodeDerivativeFunc.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisualShaderNodeDerivativeFunc" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Calculates a derivative within the visual shader graph.
  5. </brief_description>
  6. <description>
  7. This node is only available in [code]Fragment[/code] and [code]Light[/code] visual shaders.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <members>
  12. <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeDerivativeFunc.Function" default="0">
  13. A derivative function type. See [enum Function] for options.
  14. </member>
  15. <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeDerivativeFunc.OpType" default="0">
  16. A type of operands and returned value. See [enum OpType] for options.
  17. </member>
  18. <member name="precision" type="int" setter="set_precision" getter="get_precision" enum="VisualShaderNodeDerivativeFunc.Precision" default="0">
  19. Sets the level of precision to use for the derivative function. See [enum Precision] for options. When using the GL Compatibility renderer, this setting has no effect.
  20. </member>
  21. </members>
  22. <constants>
  23. <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
  24. A floating-point scalar.
  25. </constant>
  26. <constant name="OP_TYPE_VECTOR_2D" value="1" enum="OpType">
  27. A 2D vector type.
  28. </constant>
  29. <constant name="OP_TYPE_VECTOR_3D" value="2" enum="OpType">
  30. A 3D vector type.
  31. </constant>
  32. <constant name="OP_TYPE_VECTOR_4D" value="3" enum="OpType">
  33. A 4D vector type.
  34. </constant>
  35. <constant name="OP_TYPE_MAX" value="4" enum="OpType">
  36. Represents the size of the [enum OpType] enum.
  37. </constant>
  38. <constant name="FUNC_SUM" value="0" enum="Function">
  39. Sum of absolute derivative in [code]x[/code] and [code]y[/code].
  40. </constant>
  41. <constant name="FUNC_X" value="1" enum="Function">
  42. Derivative in [code]x[/code] using local differencing.
  43. </constant>
  44. <constant name="FUNC_Y" value="2" enum="Function">
  45. Derivative in [code]y[/code] using local differencing.
  46. </constant>
  47. <constant name="FUNC_MAX" value="3" enum="Function">
  48. Represents the size of the [enum Function] enum.
  49. </constant>
  50. <constant name="PRECISION_NONE" value="0" enum="Precision">
  51. No precision is specified, the GPU driver is allowed to use whatever level of precision it chooses. This is the default option and is equivalent to using [code]dFdx()[/code] or [code]dFdy()[/code] in text shaders.
  52. </constant>
  53. <constant name="PRECISION_COARSE" value="1" enum="Precision">
  54. The derivative will be calculated using the current fragment's neighbors (which may not include the current fragment). This tends to be faster than using [constant PRECISION_FINE], but may not be suitable when more precision is needed. This is equivalent to using [code]dFdxCoarse()[/code] or [code]dFdyCoarse()[/code] in text shaders.
  55. </constant>
  56. <constant name="PRECISION_FINE" value="2" enum="Precision">
  57. The derivative will be calculated using the current fragment and its immediate neighbors. This tends to be slower than using [constant PRECISION_COARSE], but may be necessary when more precision is needed. This is equivalent to using [code]dFdxFine()[/code] or [code]dFdyFine()[/code] in text shaders.
  58. </constant>
  59. <constant name="PRECISION_MAX" value="3" enum="Precision">
  60. Represents the size of the [enum Precision] enum.
  61. </constant>
  62. </constants>
  63. </class>