From 8c8c333bf2b36ad6a8f93aefb9788671d53f69d1 Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Thu, 26 Jan 2023 14:31:37 +0300 Subject: Add derivative functions with precision to shaders --- doc/classes/VisualShaderNodeDerivativeFunc.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/VisualShaderNodeDerivativeFunc.xml b/doc/classes/VisualShaderNodeDerivativeFunc.xml index 9a1ad53394..4a31969171 100644 --- a/doc/classes/VisualShaderNodeDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeDerivativeFunc.xml @@ -15,6 +15,9 @@ A type of operands and returned value. See [enum OpType] for options. + + 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. + @@ -44,5 +47,17 @@ Represents the size of the [enum Function] enum. + + 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. + + + 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. + + + 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. + + + Represents the size of the [enum Precision] enum. + -- cgit v1.2.3