6a2d0734-bd9e-4ddf-946e-caa52498cb75.json 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. {
  2. "__type__": "cc.EffectAsset",
  3. "_name": "pipeline/post-process/tone-mapping",
  4. "_objFlags": 0,
  5. "__editorExtras__": {},
  6. "_native": "",
  7. "techniques": [
  8. {
  9. "passes": [
  10. {
  11. "pass": "cc-tone-mapping",
  12. "rasterizerState": {
  13. "cullMode": 0
  14. },
  15. "program": "pipeline/post-process/tone-mapping|vs|fs-tonemap",
  16. "depthStencilState": {
  17. "depthTest": false,
  18. "depthWrite": false
  19. }
  20. },
  21. {
  22. "pass": "cc-tone-mapping",
  23. "rasterizerState": {
  24. "cullMode": 0
  25. },
  26. "program": "pipeline/post-process/tone-mapping|vs|fs-copy",
  27. "depthStencilState": {
  28. "depthTest": false,
  29. "depthWrite": false
  30. }
  31. }
  32. ]
  33. }
  34. ],
  35. "shaders": [
  36. {
  37. "blocks": [],
  38. "samplerTextures": [],
  39. "samplers": [],
  40. "textures": [],
  41. "buffers": [],
  42. "images": [],
  43. "subpassInputs": [],
  44. "attributes": [
  45. {
  46. "name": "a_position",
  47. "defines": [],
  48. "format": 32,
  49. "location": 0
  50. },
  51. {
  52. "name": "a_normal",
  53. "defines": [],
  54. "format": 32,
  55. "location": 1
  56. },
  57. {
  58. "name": "a_texCoord",
  59. "defines": [],
  60. "format": 21,
  61. "location": 2
  62. },
  63. {
  64. "name": "a_tangent",
  65. "defines": [],
  66. "format": 44,
  67. "location": 3
  68. },
  69. {
  70. "name": "a_joints",
  71. "defines": [
  72. "CC_USE_SKINNING"
  73. ],
  74. "location": 4
  75. },
  76. {
  77. "name": "a_weights",
  78. "defines": [
  79. "CC_USE_SKINNING"
  80. ],
  81. "format": 44,
  82. "location": 5
  83. },
  84. {
  85. "name": "a_jointAnimInfo",
  86. "defines": [
  87. "USE_INSTANCING",
  88. "CC_USE_BAKED_ANIMATION"
  89. ],
  90. "format": 44,
  91. "isInstanced": true,
  92. "location": 6
  93. },
  94. {
  95. "name": "a_matWorld0",
  96. "defines": [
  97. "USE_INSTANCING"
  98. ],
  99. "format": 44,
  100. "isInstanced": true,
  101. "location": 7
  102. },
  103. {
  104. "name": "a_matWorld1",
  105. "defines": [
  106. "USE_INSTANCING"
  107. ],
  108. "format": 44,
  109. "isInstanced": true,
  110. "location": 8
  111. },
  112. {
  113. "name": "a_matWorld2",
  114. "defines": [
  115. "USE_INSTANCING"
  116. ],
  117. "format": 44,
  118. "isInstanced": true,
  119. "location": 9
  120. },
  121. {
  122. "name": "a_lightingMapUVParam",
  123. "defines": [
  124. "USE_INSTANCING",
  125. "CC_USE_LIGHTMAP"
  126. ],
  127. "format": 44,
  128. "isInstanced": true,
  129. "location": 10
  130. },
  131. {
  132. "name": "a_localShadowBiasAndProbeId",
  133. "defines": [
  134. "USE_INSTANCING"
  135. ],
  136. "format": 44,
  137. "isInstanced": true,
  138. "location": 11
  139. },
  140. {
  141. "name": "a_reflectionProbeData",
  142. "defines": [
  143. "USE_INSTANCING",
  144. "CC_USE_REFLECTION_PROBE"
  145. ],
  146. "format": 44,
  147. "isInstanced": true,
  148. "location": 12
  149. },
  150. {
  151. "name": "a_sh_linear_const_r",
  152. "defines": [
  153. "USE_INSTANCING",
  154. "CC_USE_LIGHT_PROBE"
  155. ],
  156. "format": 44,
  157. "isInstanced": true,
  158. "location": 13
  159. },
  160. {
  161. "name": "a_sh_linear_const_g",
  162. "defines": [
  163. "USE_INSTANCING",
  164. "CC_USE_LIGHT_PROBE"
  165. ],
  166. "format": 44,
  167. "isInstanced": true,
  168. "location": 14
  169. },
  170. {
  171. "name": "a_sh_linear_const_b",
  172. "defines": [
  173. "USE_INSTANCING",
  174. "CC_USE_LIGHT_PROBE"
  175. ],
  176. "format": 44,
  177. "isInstanced": true,
  178. "location": 15
  179. },
  180. {
  181. "name": "a_vertexId",
  182. "defines": [
  183. "CC_USE_MORPH"
  184. ],
  185. "format": 11,
  186. "location": 16
  187. }
  188. ],
  189. "varyings": [
  190. {
  191. "name": "v_uv",
  192. "type": 14,
  193. "count": 1,
  194. "defines": [],
  195. "stageFlags": 17,
  196. "location": 0
  197. }
  198. ],
  199. "fragColors": [
  200. {
  201. "name": "fragColor",
  202. "typename": "vec4",
  203. "type": 16,
  204. "count": 1,
  205. "defines": [],
  206. "stageFlags": 16,
  207. "location": 0
  208. }
  209. ],
  210. "descriptors": [
  211. {
  212. "rate": 0,
  213. "blocks": [],
  214. "samplerTextures": [],
  215. "samplers": [],
  216. "textures": [],
  217. "buffers": [],
  218. "images": [],
  219. "subpassInputs": []
  220. },
  221. {
  222. "rate": 1,
  223. "blocks": [],
  224. "samplerTextures": [],
  225. "samplers": [],
  226. "textures": [],
  227. "buffers": [],
  228. "images": [],
  229. "subpassInputs": []
  230. },
  231. {
  232. "rate": 2,
  233. "blocks": [],
  234. "samplerTextures": [],
  235. "samplers": [],
  236. "textures": [],
  237. "buffers": [],
  238. "images": [],
  239. "subpassInputs": []
  240. },
  241. {
  242. "rate": 3,
  243. "blocks": [
  244. {
  245. "name": "Pipeline",
  246. "members": [
  247. {
  248. "name": "g_platform",
  249. "type": 16,
  250. "count": 1
  251. }
  252. ],
  253. "defines": [],
  254. "stageFlags": 1,
  255. "binding": 0
  256. }
  257. ],
  258. "samplerTextures": [
  259. {
  260. "name": "inputTexture",
  261. "type": 28,
  262. "count": 1,
  263. "defines": [],
  264. "stageFlags": 16,
  265. "sampleType": 0,
  266. "binding": 1
  267. }
  268. ],
  269. "samplers": [],
  270. "textures": [],
  271. "buffers": [],
  272. "images": [],
  273. "subpassInputs": []
  274. }
  275. ],
  276. "hash": 879047950,
  277. "glsl4": {
  278. "vert": "\nprecision highp float;\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\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 2) in vec2 a_texCoord;\nlayout(location = 3) in vec4 a_tangent;\n#if CC_USE_SKINNING\n layout(location = 4) in u32vec4 a_joints;\n layout(location = 5) in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n layout(location = 6) in highp vec4 a_jointAnimInfo;\n #endif\n layout(location = 7) in vec4 a_matWorld0;\n layout(location = 8) in vec4 a_matWorld1;\n layout(location = 9) in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n layout(location = 10) in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n layout(location = 11) in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n layout(location = 12) in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n layout(location = 13) in vec4 a_sh_linear_const_r;\n layout(location = 14) in vec4 a_sh_linear_const_g;\n layout(location = 15) in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n#endif\nlayout(set = 1, binding = 0) uniform Pipeline {\n vec4 g_platform;\n};\nlayout(location = 0) out vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  279. "frag": "\nprecision highp float;\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec3 ACESToneMap (vec3 color) {\n color = min(color, vec3(8.0));\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nvec3 HDRToLDR(vec3 color)\n{\n #if CC_USE_HDR\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING)\n #endif\n {\n #if CC_TONE_MAPPING_TYPE == HDR_TONE_MAPPING_ACES\n color.rgb = ACESToneMap(color.rgb);\n #endif\n }\n #endif\n return color;\n}\nlayout(location = 0) in vec2 v_uv;\nlayout(set = 1, binding = 1) uniform sampler2D inputTexture;\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n fragColor = texture(inputTexture, v_uv);\n #if CC_USE_FLOAT_OUTPUT\n fragColor.rgb = HDRToLDR(fragColor.rgb);\n fragColor.rgb = LinearToSRGB(fragColor.rgb);\n #endif\n}"
  280. },
  281. "glsl3": {
  282. "vert": "\nprecision highp float;\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\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nin vec3 a_position;\nin vec3 a_normal;\nin vec2 a_texCoord;\nin vec4 a_tangent;\n#if CC_USE_SKINNING\n in vec4 a_joints;\n in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n in highp vec4 a_jointAnimInfo;\n #endif\n in vec4 a_matWorld0;\n in vec4 a_matWorld1;\n in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n in vec4 a_sh_linear_const_r;\n in vec4 a_sh_linear_const_g;\n in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n in float a_vertexId;\n#endif\nlayout(std140) uniform Pipeline {\n vec4 g_platform;\n};\nout vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  283. "frag": "\nprecision highp float;\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec3 ACESToneMap (vec3 color) {\n color = min(color, vec3(8.0));\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nvec3 HDRToLDR(vec3 color)\n{\n #if CC_USE_HDR\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING)\n #endif\n {\n #if CC_TONE_MAPPING_TYPE == HDR_TONE_MAPPING_ACES\n color.rgb = ACESToneMap(color.rgb);\n #endif\n }\n #endif\n return color;\n}\nin vec2 v_uv;\nuniform sampler2D inputTexture;\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n fragColor = texture(inputTexture, v_uv);\n #if CC_USE_FLOAT_OUTPUT\n fragColor.rgb = HDRToLDR(fragColor.rgb);\n fragColor.rgb = LinearToSRGB(fragColor.rgb);\n #endif\n}"
  284. },
  285. "glsl1": {
  286. "vert": "\nprecision highp float;\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\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nattribute vec3 a_position;\nattribute vec3 a_normal;\nattribute vec2 a_texCoord;\nattribute vec4 a_tangent;\n#if CC_USE_SKINNING\n attribute vec4 a_joints;\n attribute vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n attribute highp vec4 a_jointAnimInfo;\n #endif\n attribute vec4 a_matWorld0;\n attribute vec4 a_matWorld1;\n attribute vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n attribute vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n attribute vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n attribute vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n attribute vec4 a_sh_linear_const_r;\n attribute vec4 a_sh_linear_const_g;\n attribute vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n attribute float a_vertexId;\n#endif\n uniform vec4 g_platform;\nvarying vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  287. "frag": "\nprecision highp float;\nvec3 LinearToSRGB(vec3 linear) {\n#ifdef CC_USE_SURFACE_SHADER\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (!IS_DEBUG_VIEW_COMPOSITE_ENABLE_GAMMA_CORRECTION) {\n return linear;\n }\n #endif\n#endif\n return sqrt(linear);\n}\nvec3 ACESToneMap (vec3 color) {\n color = min(color, vec3(8.0));\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nvec3 HDRToLDR(vec3 color)\n{\n #if CC_USE_HDR\n #if CC_USE_DEBUG_VIEW == CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC && CC_SURFACES_ENABLE_DEBUG_VIEW\n if (IS_DEBUG_VIEW_COMPOSITE_ENABLE_TONE_MAPPING)\n #endif\n {\n #if CC_TONE_MAPPING_TYPE == HDR_TONE_MAPPING_ACES\n color.rgb = ACESToneMap(color.rgb);\n #endif\n }\n #endif\n return color;\n}\nvarying vec2 v_uv;\nuniform sampler2D inputTexture;\nvoid main () {\n gl_FragColor = texture2D(inputTexture, v_uv);\n #if CC_USE_FLOAT_OUTPUT\n gl_FragColor.rgb = HDRToLDR(gl_FragColor.rgb);\n gl_FragColor.rgb = LinearToSRGB(gl_FragColor.rgb);\n #endif\n}"
  288. },
  289. "builtins": {
  290. "globals": {
  291. "blocks": [],
  292. "samplerTextures": [],
  293. "buffers": [],
  294. "images": []
  295. },
  296. "locals": {
  297. "blocks": [],
  298. "samplerTextures": [],
  299. "buffers": [],
  300. "images": []
  301. },
  302. "statistics": {
  303. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  304. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 0
  305. }
  306. },
  307. "defines": [
  308. {
  309. "name": "USE_INSTANCING",
  310. "type": "boolean",
  311. "defines": [],
  312. "editor": {
  313. "elevated": true
  314. }
  315. },
  316. {
  317. "name": "CC_USE_SKINNING",
  318. "type": "boolean",
  319. "defines": []
  320. },
  321. {
  322. "name": "CC_USE_BAKED_ANIMATION",
  323. "type": "boolean",
  324. "defines": [
  325. "USE_INSTANCING"
  326. ]
  327. },
  328. {
  329. "name": "CC_USE_LIGHTMAP",
  330. "type": "boolean",
  331. "defines": [
  332. "USE_INSTANCING"
  333. ]
  334. },
  335. {
  336. "name": "CC_USE_REFLECTION_PROBE",
  337. "type": "boolean",
  338. "defines": [
  339. "USE_INSTANCING"
  340. ]
  341. },
  342. {
  343. "name": "CC_RECEIVE_SHADOW",
  344. "type": "boolean",
  345. "defines": [
  346. "USE_INSTANCING"
  347. ]
  348. },
  349. {
  350. "name": "CC_USE_LIGHT_PROBE",
  351. "type": "boolean",
  352. "defines": [
  353. "USE_INSTANCING"
  354. ]
  355. },
  356. {
  357. "name": "CC_USE_MORPH",
  358. "type": "boolean",
  359. "defines": []
  360. },
  361. {
  362. "name": "CC_USE_DEBUG_VIEW",
  363. "type": "number",
  364. "defines": [],
  365. "range": [
  366. 0,
  367. 3
  368. ]
  369. },
  370. {
  371. "name": "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC",
  372. "type": "boolean",
  373. "defines": [
  374. "CC_USE_DEBUG_VIEW"
  375. ]
  376. },
  377. {
  378. "name": "CC_SURFACES_ENABLE_DEBUG_VIEW",
  379. "type": "boolean",
  380. "defines": [
  381. "CC_USE_DEBUG_VIEW",
  382. "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC"
  383. ]
  384. },
  385. {
  386. "name": "CC_USE_HDR",
  387. "type": "boolean",
  388. "defines": []
  389. },
  390. {
  391. "name": "CC_TONE_MAPPING_TYPE",
  392. "type": "number",
  393. "defines": [
  394. "CC_USE_HDR"
  395. ],
  396. "range": [
  397. 0,
  398. 3
  399. ]
  400. },
  401. {
  402. "name": "HDR_TONE_MAPPING_ACES",
  403. "type": "boolean",
  404. "defines": [
  405. "CC_TONE_MAPPING_TYPE",
  406. "CC_USE_HDR"
  407. ]
  408. },
  409. {
  410. "name": "CC_USE_FLOAT_OUTPUT",
  411. "type": "boolean",
  412. "defines": []
  413. }
  414. ],
  415. "name": "pipeline/post-process/tone-mapping|vs|fs-tonemap"
  416. },
  417. {
  418. "blocks": [],
  419. "samplerTextures": [],
  420. "samplers": [],
  421. "textures": [],
  422. "buffers": [],
  423. "images": [],
  424. "subpassInputs": [],
  425. "attributes": [
  426. {
  427. "name": "a_position",
  428. "defines": [],
  429. "format": 32,
  430. "location": 0
  431. },
  432. {
  433. "name": "a_normal",
  434. "defines": [],
  435. "format": 32,
  436. "location": 1
  437. },
  438. {
  439. "name": "a_texCoord",
  440. "defines": [],
  441. "format": 21,
  442. "location": 2
  443. },
  444. {
  445. "name": "a_tangent",
  446. "defines": [],
  447. "format": 44,
  448. "location": 3
  449. },
  450. {
  451. "name": "a_joints",
  452. "defines": [
  453. "CC_USE_SKINNING"
  454. ],
  455. "location": 4
  456. },
  457. {
  458. "name": "a_weights",
  459. "defines": [
  460. "CC_USE_SKINNING"
  461. ],
  462. "format": 44,
  463. "location": 5
  464. },
  465. {
  466. "name": "a_jointAnimInfo",
  467. "defines": [
  468. "USE_INSTANCING",
  469. "CC_USE_BAKED_ANIMATION"
  470. ],
  471. "format": 44,
  472. "isInstanced": true,
  473. "location": 6
  474. },
  475. {
  476. "name": "a_matWorld0",
  477. "defines": [
  478. "USE_INSTANCING"
  479. ],
  480. "format": 44,
  481. "isInstanced": true,
  482. "location": 7
  483. },
  484. {
  485. "name": "a_matWorld1",
  486. "defines": [
  487. "USE_INSTANCING"
  488. ],
  489. "format": 44,
  490. "isInstanced": true,
  491. "location": 8
  492. },
  493. {
  494. "name": "a_matWorld2",
  495. "defines": [
  496. "USE_INSTANCING"
  497. ],
  498. "format": 44,
  499. "isInstanced": true,
  500. "location": 9
  501. },
  502. {
  503. "name": "a_lightingMapUVParam",
  504. "defines": [
  505. "USE_INSTANCING",
  506. "CC_USE_LIGHTMAP"
  507. ],
  508. "format": 44,
  509. "isInstanced": true,
  510. "location": 10
  511. },
  512. {
  513. "name": "a_localShadowBiasAndProbeId",
  514. "defines": [
  515. "USE_INSTANCING"
  516. ],
  517. "format": 44,
  518. "isInstanced": true,
  519. "location": 11
  520. },
  521. {
  522. "name": "a_reflectionProbeData",
  523. "defines": [
  524. "USE_INSTANCING",
  525. "CC_USE_REFLECTION_PROBE"
  526. ],
  527. "format": 44,
  528. "isInstanced": true,
  529. "location": 12
  530. },
  531. {
  532. "name": "a_sh_linear_const_r",
  533. "defines": [
  534. "USE_INSTANCING",
  535. "CC_USE_LIGHT_PROBE"
  536. ],
  537. "format": 44,
  538. "isInstanced": true,
  539. "location": 13
  540. },
  541. {
  542. "name": "a_sh_linear_const_g",
  543. "defines": [
  544. "USE_INSTANCING",
  545. "CC_USE_LIGHT_PROBE"
  546. ],
  547. "format": 44,
  548. "isInstanced": true,
  549. "location": 14
  550. },
  551. {
  552. "name": "a_sh_linear_const_b",
  553. "defines": [
  554. "USE_INSTANCING",
  555. "CC_USE_LIGHT_PROBE"
  556. ],
  557. "format": 44,
  558. "isInstanced": true,
  559. "location": 15
  560. },
  561. {
  562. "name": "a_vertexId",
  563. "defines": [
  564. "CC_USE_MORPH"
  565. ],
  566. "format": 11,
  567. "location": 16
  568. }
  569. ],
  570. "varyings": [
  571. {
  572. "name": "v_uv",
  573. "type": 14,
  574. "count": 1,
  575. "defines": [],
  576. "stageFlags": 17,
  577. "location": 0
  578. }
  579. ],
  580. "fragColors": [
  581. {
  582. "name": "fragColor",
  583. "typename": "vec4",
  584. "type": 16,
  585. "count": 1,
  586. "defines": [],
  587. "stageFlags": 16,
  588. "location": 0
  589. }
  590. ],
  591. "descriptors": [
  592. {
  593. "rate": 0,
  594. "blocks": [],
  595. "samplerTextures": [],
  596. "samplers": [],
  597. "textures": [],
  598. "buffers": [],
  599. "images": [],
  600. "subpassInputs": []
  601. },
  602. {
  603. "rate": 1,
  604. "blocks": [],
  605. "samplerTextures": [],
  606. "samplers": [],
  607. "textures": [],
  608. "buffers": [],
  609. "images": [],
  610. "subpassInputs": []
  611. },
  612. {
  613. "rate": 2,
  614. "blocks": [],
  615. "samplerTextures": [],
  616. "samplers": [],
  617. "textures": [],
  618. "buffers": [],
  619. "images": [],
  620. "subpassInputs": []
  621. },
  622. {
  623. "rate": 3,
  624. "blocks": [
  625. {
  626. "name": "Pipeline",
  627. "members": [
  628. {
  629. "name": "g_platform",
  630. "type": 16,
  631. "count": 1
  632. }
  633. ],
  634. "defines": [],
  635. "stageFlags": 1,
  636. "binding": 0
  637. }
  638. ],
  639. "samplerTextures": [
  640. {
  641. "name": "inputTexture",
  642. "type": 28,
  643. "count": 1,
  644. "defines": [],
  645. "stageFlags": 16,
  646. "sampleType": 0,
  647. "binding": 1
  648. }
  649. ],
  650. "samplers": [],
  651. "textures": [],
  652. "buffers": [],
  653. "images": [],
  654. "subpassInputs": []
  655. }
  656. ],
  657. "hash": 4126709291,
  658. "glsl4": {
  659. "vert": "\nprecision highp float;\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\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec3 a_normal;\nlayout(location = 2) in vec2 a_texCoord;\nlayout(location = 3) in vec4 a_tangent;\n#if CC_USE_SKINNING\n layout(location = 4) in u32vec4 a_joints;\n layout(location = 5) in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n layout(location = 6) in highp vec4 a_jointAnimInfo;\n #endif\n layout(location = 7) in vec4 a_matWorld0;\n layout(location = 8) in vec4 a_matWorld1;\n layout(location = 9) in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n layout(location = 10) in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n layout(location = 11) in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n layout(location = 12) in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n layout(location = 13) in vec4 a_sh_linear_const_r;\n layout(location = 14) in vec4 a_sh_linear_const_g;\n layout(location = 15) in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n#endif\nlayout(set = 1, binding = 0) uniform Pipeline {\n vec4 g_platform;\n};\nlayout(location = 0) out vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  660. "frag": "\nprecision highp float;\nlayout(location = 0) in vec2 v_uv;\nlayout(set = 1, binding = 1) uniform sampler2D inputTexture;\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n fragColor = texture(inputTexture, v_uv);\n}"
  661. },
  662. "glsl3": {
  663. "vert": "\nprecision highp float;\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\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nin vec3 a_position;\nin vec3 a_normal;\nin vec2 a_texCoord;\nin vec4 a_tangent;\n#if CC_USE_SKINNING\n in vec4 a_joints;\n in vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n in highp vec4 a_jointAnimInfo;\n #endif\n in vec4 a_matWorld0;\n in vec4 a_matWorld1;\n in vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n in vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n in vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n in vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n in vec4 a_sh_linear_const_r;\n in vec4 a_sh_linear_const_g;\n in vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n in float a_vertexId;\n#endif\nlayout(std140) uniform Pipeline {\n vec4 g_platform;\n};\nout vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  664. "frag": "\nprecision highp float;\nin vec2 v_uv;\nuniform sampler2D inputTexture;\nlayout(location = 0) out vec4 fragColor;\nvoid main () {\n fragColor = texture(inputTexture, v_uv);\n}"
  665. },
  666. "glsl1": {
  667. "vert": "\nprecision highp float;\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\nstruct StandardVertInput {\n highp vec4 position;\n vec3 normal;\n vec4 tangent;\n};\nattribute vec3 a_position;\nattribute vec3 a_normal;\nattribute vec2 a_texCoord;\nattribute vec4 a_tangent;\n#if CC_USE_SKINNING\n attribute vec4 a_joints;\n attribute vec4 a_weights;\n#endif\n#if USE_INSTANCING\n #if CC_USE_BAKED_ANIMATION\n attribute highp vec4 a_jointAnimInfo;\n #endif\n attribute vec4 a_matWorld0;\n attribute vec4 a_matWorld1;\n attribute vec4 a_matWorld2;\n #if CC_USE_LIGHTMAP\n attribute vec4 a_lightingMapUVParam;\n #endif\n #if CC_USE_REFLECTION_PROBE || CC_RECEIVE_SHADOW\n #if CC_RECEIVE_SHADOW\n #endif\n attribute vec4 a_localShadowBiasAndProbeId;\n #endif\n #if CC_USE_REFLECTION_PROBE\n attribute vec4 a_reflectionProbeData;\n #endif\n #if CC_USE_LIGHT_PROBE\n attribute vec4 a_sh_linear_const_r;\n attribute vec4 a_sh_linear_const_g;\n attribute vec4 a_sh_linear_const_b;\n #endif\n#endif\n#if CC_USE_MORPH\n attribute float a_vertexId;\n#endif\n uniform vec4 g_platform;\nvarying vec2 v_uv;\nvoid main () {\n StandardVertInput In;\n In.position = vec4(a_position, 1.0);\n In.normal = a_normal;\n In.tangent = a_tangent;\n (In.position).y = g_platform.w == 0.0 ? -(In.position).y : (In.position).y;\n gl_Position = In.position;\n v_uv = a_texCoord;\n}",
  668. "frag": "\nprecision highp float;\nvarying vec2 v_uv;\nuniform sampler2D inputTexture;\nvoid main () {\n gl_FragColor = texture2D(inputTexture, v_uv);\n}"
  669. },
  670. "builtins": {
  671. "globals": {
  672. "blocks": [],
  673. "samplerTextures": [],
  674. "buffers": [],
  675. "images": []
  676. },
  677. "locals": {
  678. "blocks": [],
  679. "samplerTextures": [],
  680. "buffers": [],
  681. "images": []
  682. },
  683. "statistics": {
  684. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  685. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 0
  686. }
  687. },
  688. "defines": [
  689. {
  690. "name": "USE_INSTANCING",
  691. "type": "boolean",
  692. "defines": [],
  693. "editor": {
  694. "elevated": true
  695. }
  696. },
  697. {
  698. "name": "CC_USE_SKINNING",
  699. "type": "boolean",
  700. "defines": []
  701. },
  702. {
  703. "name": "CC_USE_BAKED_ANIMATION",
  704. "type": "boolean",
  705. "defines": [
  706. "USE_INSTANCING"
  707. ]
  708. },
  709. {
  710. "name": "CC_USE_LIGHTMAP",
  711. "type": "boolean",
  712. "defines": [
  713. "USE_INSTANCING"
  714. ]
  715. },
  716. {
  717. "name": "CC_USE_REFLECTION_PROBE",
  718. "type": "boolean",
  719. "defines": [
  720. "USE_INSTANCING"
  721. ]
  722. },
  723. {
  724. "name": "CC_RECEIVE_SHADOW",
  725. "type": "boolean",
  726. "defines": [
  727. "USE_INSTANCING"
  728. ]
  729. },
  730. {
  731. "name": "CC_USE_LIGHT_PROBE",
  732. "type": "boolean",
  733. "defines": [
  734. "USE_INSTANCING"
  735. ]
  736. },
  737. {
  738. "name": "CC_USE_MORPH",
  739. "type": "boolean",
  740. "defines": []
  741. }
  742. ],
  743. "name": "pipeline/post-process/tone-mapping|vs|fs-copy"
  744. }
  745. ],
  746. "combinations": [],
  747. "hideInEditor": false
  748. }