ff9be190-20a4-4e48-b68c-76e3c7cff085.json 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "internal/builtin-debug-renderer",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "passes": [
  10. {
  11. "blendState": {
  12. "targets": [
  13. {
  14. "blend": true,
  15. "blendSrc": 2,
  16. "blendDst": 4,
  17. "blendDstAlpha": 4
  18. }
  19. ]
  20. },
  21. "rasterizerState": {
  22. "cullMode": 0
  23. },
  24. "program": "internal/builtin-debug-renderer|debug-renderer-vs:vert|debug-renderer-fs:frag",
  25. "priority": 255,
  26. "depthStencilState": {
  27. "depthTest": false,
  28. "depthWrite": false
  29. }
  30. }
  31. ]
  32. }
  33. ],
  34. "shaders": [
  35. {
  36. "blocks": [],
  37. "samplerTextures": [
  38. {
  39. "name": "mainTexture",
  40. "type": 28,
  41. "count": 1,
  42. "defines": [],
  43. "stageFlags": 16,
  44. "binding": 0
  45. }
  46. ],
  47. "samplers": [],
  48. "textures": [],
  49. "buffers": [],
  50. "images": [],
  51. "subpassInputs": [],
  52. "attributes": [
  53. {
  54. "name": "a_position",
  55. "defines": [],
  56. "format": 21,
  57. "location": 0
  58. },
  59. {
  60. "name": "a_texCoord",
  61. "defines": [],
  62. "format": 21,
  63. "location": 1
  64. },
  65. {
  66. "name": "a_color",
  67. "defines": [],
  68. "format": 44,
  69. "location": 2
  70. }
  71. ],
  72. "varyings": [
  73. {
  74. "name": "v_texCoord",
  75. "type": 14,
  76. "count": 1,
  77. "defines": [],
  78. "stageFlags": 17,
  79. "location": 0
  80. },
  81. {
  82. "name": "v_color",
  83. "type": 16,
  84. "count": 1,
  85. "defines": [],
  86. "stageFlags": 17,
  87. "location": 1
  88. }
  89. ],
  90. "fragColors": [
  91. {
  92. "name": "cc_FragColor",
  93. "typename": "vec4",
  94. "type": 16,
  95. "count": 1,
  96. "defines": [],
  97. "stageFlags": 16,
  98. "location": 0
  99. }
  100. ],
  101. "descriptors": [
  102. {
  103. "rate": 0,
  104. "blocks": [],
  105. "samplerTextures": [],
  106. "samplers": [],
  107. "textures": [],
  108. "buffers": [],
  109. "images": [],
  110. "subpassInputs": []
  111. },
  112. {
  113. "rate": 1,
  114. "blocks": [],
  115. "samplerTextures": [
  116. {
  117. "name": "mainTexture",
  118. "type": 28,
  119. "count": 1,
  120. "defines": [],
  121. "stageFlags": 16,
  122. "binding": 0
  123. }
  124. ],
  125. "samplers": [],
  126. "textures": [],
  127. "buffers": [],
  128. "images": [],
  129. "subpassInputs": []
  130. },
  131. {
  132. "rate": 2,
  133. "blocks": [],
  134. "samplerTextures": [],
  135. "samplers": [],
  136. "textures": [],
  137. "buffers": [],
  138. "images": [],
  139. "subpassInputs": []
  140. },
  141. {
  142. "rate": 3,
  143. "blocks": [
  144. {
  145. "tags": {
  146. "builtin": "global"
  147. },
  148. "name": "CCGlobal",
  149. "members": [
  150. {
  151. "name": "cc_time",
  152. "typename": "vec4",
  153. "type": 16,
  154. "count": 1,
  155. "precision": "highp "
  156. },
  157. {
  158. "name": "cc_screenSize",
  159. "typename": "vec4",
  160. "type": 16,
  161. "count": 1,
  162. "precision": "mediump "
  163. },
  164. {
  165. "name": "cc_nativeSize",
  166. "typename": "vec4",
  167. "type": 16,
  168. "count": 1,
  169. "precision": "mediump "
  170. },
  171. {
  172. "name": "cc_probeInfo",
  173. "typename": "vec4",
  174. "type": 16,
  175. "count": 1,
  176. "precision": "mediump "
  177. },
  178. {
  179. "name": "cc_debug_view_mode",
  180. "typename": "vec4",
  181. "type": 16,
  182. "count": 1,
  183. "precision": "mediump "
  184. }
  185. ],
  186. "defines": [],
  187. "stageFlags": 17
  188. },
  189. {
  190. "tags": {
  191. "builtin": "global"
  192. },
  193. "name": "CCCamera",
  194. "members": [
  195. {
  196. "name": "cc_matView",
  197. "typename": "mat4",
  198. "type": 25,
  199. "count": 1,
  200. "precision": "highp "
  201. },
  202. {
  203. "name": "cc_matViewInv",
  204. "typename": "mat4",
  205. "type": 25,
  206. "count": 1,
  207. "precision": "highp "
  208. },
  209. {
  210. "name": "cc_matProj",
  211. "typename": "mat4",
  212. "type": 25,
  213. "count": 1,
  214. "precision": "highp "
  215. },
  216. {
  217. "name": "cc_matProjInv",
  218. "typename": "mat4",
  219. "type": 25,
  220. "count": 1,
  221. "precision": "highp "
  222. },
  223. {
  224. "name": "cc_matViewProj",
  225. "typename": "mat4",
  226. "type": 25,
  227. "count": 1,
  228. "precision": "highp "
  229. },
  230. {
  231. "name": "cc_matViewProjInv",
  232. "typename": "mat4",
  233. "type": 25,
  234. "count": 1,
  235. "precision": "highp "
  236. },
  237. {
  238. "name": "cc_cameraPos",
  239. "typename": "vec4",
  240. "type": 16,
  241. "count": 1,
  242. "precision": "highp "
  243. },
  244. {
  245. "name": "cc_surfaceTransform",
  246. "typename": "vec4",
  247. "type": 16,
  248. "count": 1,
  249. "precision": "mediump "
  250. },
  251. {
  252. "name": "cc_screenScale",
  253. "typename": "vec4",
  254. "type": 16,
  255. "count": 1,
  256. "precision": "mediump "
  257. },
  258. {
  259. "name": "cc_exposure",
  260. "typename": "vec4",
  261. "type": 16,
  262. "count": 1,
  263. "precision": "mediump "
  264. },
  265. {
  266. "name": "cc_mainLitDir",
  267. "typename": "vec4",
  268. "type": 16,
  269. "count": 1,
  270. "precision": "mediump "
  271. },
  272. {
  273. "name": "cc_mainLitColor",
  274. "typename": "vec4",
  275. "type": 16,
  276. "count": 1,
  277. "precision": "mediump "
  278. },
  279. {
  280. "name": "cc_ambientSky",
  281. "typename": "vec4",
  282. "type": 16,
  283. "count": 1,
  284. "precision": "mediump "
  285. },
  286. {
  287. "name": "cc_ambientGround",
  288. "typename": "vec4",
  289. "type": 16,
  290. "count": 1,
  291. "precision": "mediump "
  292. },
  293. {
  294. "name": "cc_fogColor",
  295. "typename": "vec4",
  296. "type": 16,
  297. "count": 1,
  298. "precision": "mediump "
  299. },
  300. {
  301. "name": "cc_fogBase",
  302. "typename": "vec4",
  303. "type": 16,
  304. "count": 1,
  305. "precision": "mediump "
  306. },
  307. {
  308. "name": "cc_fogAdd",
  309. "typename": "vec4",
  310. "type": 16,
  311. "count": 1,
  312. "precision": "mediump "
  313. },
  314. {
  315. "name": "cc_nearFar",
  316. "typename": "vec4",
  317. "type": 16,
  318. "count": 1,
  319. "precision": "mediump "
  320. },
  321. {
  322. "name": "cc_viewPort",
  323. "typename": "vec4",
  324. "type": 16,
  325. "count": 1,
  326. "precision": "mediump "
  327. }
  328. ],
  329. "defines": [],
  330. "stageFlags": 17
  331. }
  332. ],
  333. "samplerTextures": [],
  334. "samplers": [],
  335. "textures": [],
  336. "buffers": [],
  337. "images": [],
  338. "subpassInputs": []
  339. }
  340. ],
  341. "hash": 2724889405,
  342. "glsl4": {
  343. "vert": "\nprecision mediump float;\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nlayout(location = 0) in vec2 a_position;\nlayout(location = 1) in vec2 a_texCoord;\nlayout(location = 2) in vec4 a_color;\nlayout(location = 0) out vec2 v_texCoord;\nlayout(location = 1) out vec4 v_color;\nvec4 vert () {\n int orientation = int(cc_surfaceTransform.x);\n vec4 transform = vec4(1.0, 0.0, 0.0, 1.0);\n if (orientation == 0) {\n transform = vec4(1.0, 0.0, 0.0, 1.0);\n } else if (orientation == 1) {\n transform = vec4(0.0, 1.0, -1.0, 0.0);\n } else if (orientation == 2) {\n transform = vec4(-1.0, 0.0, 0.0, -1.0);\n } else if (orientation == 3) {\n transform = vec4(0.0, -1.0, 1.0, 0.0);\n }\n vec2 invScreenSize = (orientation == 1 || orientation == 3) ? cc_screenSize.wz : cc_screenSize.zw;\n vec2 position = a_position * invScreenSize;\n position = position * vec2(2.0, -2.0) + vec2(-1.0, 1.0);\n vec2 clipPos = vec2(dot(transform.xy, position), dot(transform.zw, position));\n clipPos = cc_cameraPos.w == 0.0 ? vec2(clipPos.x, -clipPos.y) : clipPos;\n v_texCoord = a_texCoord;\n v_color = a_color;\n return vec4(clipPos, 0.0, 1.0);\n}\nvoid main() { gl_Position = vert(); }",
  344. "frag": "\nprecision mediump float;\nlayout(set = 0, binding = 0) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(set = 0, binding = 1) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nlayout(location = 0) in vec2 v_texCoord;\nlayout(location = 1) in vec4 v_color;\nlayout(set = 1, binding = 0) uniform sampler2D mainTexture;\nvec4 frag () {\n vec4 color = vec4(v_color.rgb, v_color.a * texture(mainTexture, v_texCoord).r);\n return CCFragOutput(color);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  345. },
  346. "glsl3": {
  347. "vert": "\nprecision mediump float;\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nin vec2 a_position;\nin vec2 a_texCoord;\nin vec4 a_color;\nout vec2 v_texCoord;\nout vec4 v_color;\nvec4 vert () {\n int orientation = int(cc_surfaceTransform.x);\n vec4 transform = vec4(1.0, 0.0, 0.0, 1.0);\n if (orientation == 0) {\n transform = vec4(1.0, 0.0, 0.0, 1.0);\n } else if (orientation == 1) {\n transform = vec4(0.0, 1.0, -1.0, 0.0);\n } else if (orientation == 2) {\n transform = vec4(-1.0, 0.0, 0.0, -1.0);\n } else if (orientation == 3) {\n transform = vec4(0.0, -1.0, 1.0, 0.0);\n }\n vec2 invScreenSize = (orientation == 1 || orientation == 3) ? cc_screenSize.wz : cc_screenSize.zw;\n vec2 position = a_position * invScreenSize;\n position = position * vec2(2.0, -2.0) + vec2(-1.0, 1.0);\n vec2 clipPos = vec2(dot(transform.xy, position), dot(transform.zw, position));\n clipPos = cc_cameraPos.w == 0.0 ? vec2(clipPos.x, -clipPos.y) : clipPos;\n v_texCoord = a_texCoord;\n v_color = a_color;\n return vec4(clipPos, 0.0, 1.0);\n}\nvoid main() { gl_Position = vert(); }",
  348. "frag": "\nprecision mediump float;\nlayout(std140) uniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_nativeSize;\n mediump vec4 cc_probeInfo;\n mediump vec4 cc_debug_view_mode;\n};\nlayout(std140) uniform CCCamera {\n highp mat4 cc_matView;\n highp mat4 cc_matViewInv;\n highp mat4 cc_matProj;\n highp mat4 cc_matProjInv;\n highp mat4 cc_matViewProj;\n highp mat4 cc_matViewProjInv;\n highp vec4 cc_cameraPos;\n mediump vec4 cc_surfaceTransform;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_exposure;\n mediump vec4 cc_mainLitDir;\n mediump vec4 cc_mainLitColor;\n mediump vec4 cc_ambientSky;\n mediump vec4 cc_ambientGround;\n mediump vec4 cc_fogColor;\n mediump vec4 cc_fogBase;\n mediump vec4 cc_fogAdd;\n mediump vec4 cc_nearFar;\n mediump vec4 cc_viewPort;\n};\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nin vec2 v_texCoord;\nin vec4 v_color;\nuniform sampler2D mainTexture;\nvec4 frag () {\n vec4 color = vec4(v_color.rgb, v_color.a * texture(mainTexture, v_texCoord).r);\n return CCFragOutput(color);\n}\nlayout(location = 0) out vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }"
  349. },
  350. "glsl1": {
  351. "vert": "\nprecision mediump float;\nuniform mediump vec4 cc_screenSize;\nuniform highp vec4 cc_cameraPos;\n uniform mediump vec4 cc_surfaceTransform;\n#define QUATER_PI 0.78539816340\n#define HALF_PI 1.57079632679\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI4 12.5663706144\n#define INV_QUATER_PI 1.27323954474\n#define INV_HALF_PI 0.63661977237\n#define INV_PI 0.31830988618\n#define INV_PI2 0.15915494309\n#define INV_PI4 0.07957747155\n#define EPSILON 1e-6\n#define EPSILON_LOWP 1e-4\n#define LOG2 1.442695\n#define EXP_VALUE 2.71828183\n#define FP_MAX 65504.0\n#define FP_SCALE 0.0009765625\n#define FP_SCALE_INV 1024.0\n#define GRAY_VECTOR vec3(0.299, 0.587, 0.114)\n#define LIGHT_MAP_TYPE_DISABLED 0\n#define LIGHT_MAP_TYPE_ALL_IN_ONE 1\n#define LIGHT_MAP_TYPE_INDIRECT_OCCLUSION 2\n#define REFLECTION_PROBE_TYPE_NONE 0\n#define REFLECTION_PROBE_TYPE_CUBE 1\n#define REFLECTION_PROBE_TYPE_PLANAR 2\n#define REFLECTION_PROBE_TYPE_BLEND 3\n#define REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX 4\n#define LIGHT_TYPE_DIRECTIONAL 0.0\n#define LIGHT_TYPE_SPHERE 1.0\n#define LIGHT_TYPE_SPOT 2.0\n#define LIGHT_TYPE_POINT 3.0\n#define LIGHT_TYPE_RANGED_DIRECTIONAL 4.0\n#define IS_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_DIRECTIONAL)) < EPSILON_LOWP)\n#define IS_SPHERE_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPHERE)) < EPSILON_LOWP)\n#define IS_SPOT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_SPOT)) < EPSILON_LOWP)\n#define IS_POINT_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_POINT)) < EPSILON_LOWP)\n#define IS_RANGED_DIRECTIONAL_LIGHT(light_type) (abs(float(light_type) - float(LIGHT_TYPE_RANGED_DIRECTIONAL)) < EPSILON_LOWP)\n#define TONE_MAPPING_ACES 0\n#define TONE_MAPPING_LINEAR 1\n#define SURFACES_MAX_TRANSMIT_DEPTH_VALUE 999999.0\n#ifndef CC_SURFACES_DEBUG_VIEW_SINGLE\n #define CC_SURFACES_DEBUG_VIEW_SINGLE 1\n#endif\n#ifndef CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC\n #define CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC 2\n#endif\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec4 a_color;\nvarying vec2 v_texCoord;\nvarying vec4 v_color;\nvec4 vert () {\n int orientation = int(cc_surfaceTransform.x);\n vec4 transform = vec4(1.0, 0.0, 0.0, 1.0);\n if (orientation == 0) {\n transform = vec4(1.0, 0.0, 0.0, 1.0);\n } else if (orientation == 1) {\n transform = vec4(0.0, 1.0, -1.0, 0.0);\n } else if (orientation == 2) {\n transform = vec4(-1.0, 0.0, 0.0, -1.0);\n } else if (orientation == 3) {\n transform = vec4(0.0, -1.0, 1.0, 0.0);\n }\n vec2 invScreenSize = (orientation == 1 || orientation == 3) ? cc_screenSize.wz : cc_screenSize.zw;\n vec2 position = a_position * invScreenSize;\n position = position * vec2(2.0, -2.0) + vec2(-1.0, 1.0);\n vec2 clipPos = vec2(dot(transform.xy, position), dot(transform.zw, position));\n clipPos = cc_cameraPos.w == 0.0 ? vec2(clipPos.x, -clipPos.y) : clipPos;\n v_texCoord = a_texCoord;\n v_color = a_color;\n return vec4(clipPos, 0.0, 1.0);\n}\nvoid main() { gl_Position = vert(); }",
  352. "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n return color;\n}\nvarying vec2 v_texCoord;\nvarying vec4 v_color;\nuniform sampler2D mainTexture;\nvec4 frag () {\n vec4 color = vec4(v_color.rgb, v_color.a * texture2D(mainTexture, v_texCoord).r);\n return CCFragOutput(color);\n}\nvoid main() { gl_FragColor = frag(); }"
  353. },
  354. "builtins": {
  355. "globals": {
  356. "blocks": [
  357. {
  358. "name": "CCGlobal",
  359. "defines": []
  360. },
  361. {
  362. "name": "CCCamera",
  363. "defines": []
  364. }
  365. ],
  366. "samplerTextures": [],
  367. "buffers": [],
  368. "images": []
  369. },
  370. "locals": {
  371. "blocks": [],
  372. "samplerTextures": [],
  373. "buffers": [],
  374. "images": []
  375. },
  376. "statistics": {
  377. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 42,
  378. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 42
  379. }
  380. },
  381. "defines": [],
  382. "name": "internal/builtin-debug-renderer|debug-renderer-vs:vert|debug-renderer-fs:frag"
  383. }
  384. ],
  385. "combinations": [],
  386. "hideInEditor": false
  387. }