1 //******************************************************************************
3 // Default debug image visual shader script for dali-toolkit
4 // It will be used only if export DALI_DEBUG_IMAGE_VISUAL_SHADER=1
6 //******************************************************************************
8 // Version of this debug script
11 // Range of color rate for debug
12 "minimumColorRate": 0.2,
13 "maximumColorRate": "0.7",
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;"]
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;"]
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;"]
36 // Logic for varying calculation
37 // For example, "applyVaryingsCode" : ["vDebug = aDebug;", "vDebug2 = aDebug2 * gl_Position.xyz / gl_Position.w;"]
43 // Logic for red. (It show if we use YUV image)
44 // We can use macro keyword was defined or not by ~~_BOOL value.
49 "return IS_REQUIRED_YUV_TO_RGB_BOOL;"
51 "ratioCode": "return 1.0;"
54 // Logic for green. (It show if we use unified YUV and RGB shader)
57 "triggerCode": "return IS_REQUIRED_UNIFIED_YUV_AND_RGB_BOOL;",
64 // Logic for blue. (It show when we use GPU masking)
65 // Note that we can seperate each line as array.
70 "bool triggerReturn = IS_REQUIRED_ALPHA_MASKING_BOOL;",
72 "return triggerReturn;"
76 "mediump float alpha = originColor.a;",
77 "return step(0.5, alpha);"