2 # Documentation for SCA_2DFilterActuator
3 from SCA_IActuator import *
4 from SCA_ILogicBrick import *
6 class SCA_2DFilterActuator(SCA_IActuator):
8 Create, enable and disable 2D filters
12 The following properties don't have an immediate effect.
13 You must active the actuator to get the result.
14 The actuator is not persistent: it automatically stops itself after setting up the filter
15 but the filter remains active. To stop a filter you must activate the actuator with 'type'
16 set to RAS_2DFILTER_DISABLED or RAS_2DFILTER_NOFILTER.
18 @ivar shaderText: shader source code for custom shader
19 @type shaderText: string
20 @ivar disableMotionBlur: action on motion blur: 0=enable, 1=disable
21 @type disableMotionBlur: integer
22 @ivar type: type of 2D filter, use one of the following constants:
23 RAS_2DFILTER_ENABLED (-2) : enable the filter that was previously disabled
24 RAS_2DFILTER_DISABLED (-1) : disable the filter that is currently active
25 RAS_2DFILTER_NOFILTER (0) : disable and destroy the filter that is currently active
26 RAS_2DFILTER_MOTIONBLUR (1) : create and enable preset filters
28 RAS_2DFILTER_SHARPEN (3)
29 RAS_2DFILTER_DILATION (4)
30 RAS_2DFILTER_EROSION (5)
31 RAS_2DFILTER_LAPLACIAN (6)
32 RAS_2DFILTER_SOBEL (7)
33 RAS_2DFILTER_PREWITT (8)
34 RAS_2DFILTER_GRAYSCALE (9)
35 RAS_2DFILTER_SEPIA (10)
36 RAS_2DFILTER_INVERT (11)
37 RAS_2DFILTER_CUSTOMFILTER (12) : customer filter, the code code is set via shaderText property
39 @ivar passNb: order number of filter in the stack of 2D filters. Filters are executed in increasing order of passNb.
40 Only be one filter can be defined per passNb.
41 @type passNb: integer (0-100)
42 @ivar value: argument for motion blur filter
43 @type value: float (0.0-100.0)