[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / styles / debug-image-visual-shader-script.json
1 //******************************************************************************
2 //
3 // Default debug image visual shader script for dali-toolkit
4 // It will be used only if export DALI_DEBUG_IMAGE_VISUAL_SHADER=1
5 //
6 //******************************************************************************
7 {
8   // Version of this debug script
9   "version" : "1.0.0",
10
11   // Range of color rate for debug
12   "minimumColorRate": 0.2,
13   "maximumColorRate": "0.7",
14
15   // Extra attributes for debug
16   // It is list of attributes' type and name what you want to add, include semi-colon.
17   // For example, "extraAttributes": ["mediump float aDebug;", "highp vec3 aDebug2;"]
18   "extraAttributes":
19   [
20   ],
21
22   // Extra varyings for debug
23   // It is list of varyings' type and name what you want to add, include semi-colon.
24   // For example, "extraVaryings": ["mediump float vDebug;", "highp vec3 vDebug2;"]
25   "extraVaryings":
26   [
27   ],
28
29   // Extra uniforms for debug
30   // It is list of uniforms' type and name what you want to add, include semi-colon.
31   // For example, "extraUniforms": ["mediump float uDebug;", "highp vec3 uDebug2;"]
32   "extraUniforms":
33   [
34   ],
35
36   // Logic for varying calculation
37   // For example, "applyVaryingsCode" : ["vDebug = aDebug;", "vDebug2 = aDebug2 * gl_Position.xyz / gl_Position.w;"]
38   "applyVaryingsCode":
39   [
40   ],
41
42
43   // Logic for red. (It show if we use YUV image)
44   // We can use macro keyword was defined or not by ~~_BOOL value.
45   "redChannelCodes":
46   {
47     "triggerCode":
48     [
49       "return IS_REQUIRED_YUV_TO_RGB_BOOL;"
50     ],
51     "ratioCode": "return 1.0;"
52   },
53
54   // Logic for green. (It show if we use unified YUV and RGB shader)
55   "greenChannelCodes":
56   {
57     "triggerCode": "return IS_REQUIRED_UNIFIED_YUV_AND_RGB_BOOL;",
58     "ratioCode":
59     [
60       "return 1.0;"
61     ]
62   },
63
64   // Logic for blue. (It show when we use GPU masking)
65   // Note that we can seperate each line as array.
66   "blueChannelCodes":
67   {
68     "triggerCode":
69     [
70       "bool triggerReturn = IS_REQUIRED_ALPHA_MASKING_BOOL;",
71       "",
72       "return triggerReturn;"
73     ],
74     "ratioCode":
75     [
76       "mediump float alpha = originColor.a;",
77       "return step(0.5, alpha);"
78     ]
79   }
80 }