0.2.0-dev Download ZIP
63 lines ·3.4 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="VisualShaderNodeDerivativeFunc" inherits="VisualShaderNode" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/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. |
| 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. |
| 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. When using the 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> |