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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  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. "binding": 1
  266. }
  267. ],
  268. "samplers": [],
  269. "textures": [],
  270. "buffers": [],
  271. "images": [],
  272. "subpassInputs": []
  273. }
  274. ],
  275. "hash": 879047950,
  276. "glsl4": {
  277. "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}",
  278. "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}"
  279. },
  280. "glsl3": {
  281. "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}",
  282. "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}"
  283. },
  284. "glsl1": {
  285. "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}",
  286. "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}"
  287. },
  288. "builtins": {
  289. "globals": {
  290. "blocks": [],
  291. "samplerTextures": [],
  292. "buffers": [],
  293. "images": []
  294. },
  295. "locals": {
  296. "blocks": [],
  297. "samplerTextures": [],
  298. "buffers": [],
  299. "images": []
  300. },
  301. "statistics": {
  302. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  303. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 0
  304. }
  305. },
  306. "defines": [
  307. {
  308. "name": "USE_INSTANCING",
  309. "type": "boolean",
  310. "defines": [],
  311. "editor": {
  312. "elevated": true
  313. }
  314. },
  315. {
  316. "name": "CC_USE_SKINNING",
  317. "type": "boolean",
  318. "defines": []
  319. },
  320. {
  321. "name": "CC_USE_BAKED_ANIMATION",
  322. "type": "boolean",
  323. "defines": [
  324. "USE_INSTANCING"
  325. ]
  326. },
  327. {
  328. "name": "CC_USE_LIGHTMAP",
  329. "type": "boolean",
  330. "defines": [
  331. "USE_INSTANCING"
  332. ]
  333. },
  334. {
  335. "name": "CC_USE_REFLECTION_PROBE",
  336. "type": "boolean",
  337. "defines": [
  338. "USE_INSTANCING"
  339. ]
  340. },
  341. {
  342. "name": "CC_RECEIVE_SHADOW",
  343. "type": "boolean",
  344. "defines": [
  345. "USE_INSTANCING"
  346. ]
  347. },
  348. {
  349. "name": "CC_USE_LIGHT_PROBE",
  350. "type": "boolean",
  351. "defines": [
  352. "USE_INSTANCING"
  353. ]
  354. },
  355. {
  356. "name": "CC_USE_MORPH",
  357. "type": "boolean",
  358. "defines": []
  359. },
  360. {
  361. "name": "CC_USE_DEBUG_VIEW",
  362. "type": "number",
  363. "defines": [],
  364. "range": [
  365. 0,
  366. 3
  367. ]
  368. },
  369. {
  370. "name": "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC",
  371. "type": "boolean",
  372. "defines": [
  373. "CC_USE_DEBUG_VIEW"
  374. ]
  375. },
  376. {
  377. "name": "CC_SURFACES_ENABLE_DEBUG_VIEW",
  378. "type": "boolean",
  379. "defines": [
  380. "CC_USE_DEBUG_VIEW",
  381. "CC_SURFACES_DEBUG_VIEW_COMPOSITE_AND_MISC"
  382. ]
  383. },
  384. {
  385. "name": "CC_USE_HDR",
  386. "type": "boolean",
  387. "defines": []
  388. },
  389. {
  390. "name": "CC_TONE_MAPPING_TYPE",
  391. "type": "number",
  392. "defines": [
  393. "CC_USE_HDR"
  394. ],
  395. "range": [
  396. 0,
  397. 3
  398. ]
  399. },
  400. {
  401. "name": "HDR_TONE_MAPPING_ACES",
  402. "type": "boolean",
  403. "defines": [
  404. "CC_TONE_MAPPING_TYPE",
  405. "CC_USE_HDR"
  406. ]
  407. },
  408. {
  409. "name": "CC_USE_FLOAT_OUTPUT",
  410. "type": "boolean",
  411. "defines": []
  412. }
  413. ],
  414. "name": "pipeline/post-process/tone-mapping|vs|fs-tonemap"
  415. },
  416. {
  417. "blocks": [],
  418. "samplerTextures": [],
  419. "samplers": [],
  420. "textures": [],
  421. "buffers": [],
  422. "images": [],
  423. "subpassInputs": [],
  424. "attributes": [
  425. {
  426. "name": "a_position",
  427. "defines": [],
  428. "format": 32,
  429. "location": 0
  430. },
  431. {
  432. "name": "a_normal",
  433. "defines": [],
  434. "format": 32,
  435. "location": 1
  436. },
  437. {
  438. "name": "a_texCoord",
  439. "defines": [],
  440. "format": 21,
  441. "location": 2
  442. },
  443. {
  444. "name": "a_tangent",
  445. "defines": [],
  446. "format": 44,
  447. "location": 3
  448. },
  449. {
  450. "name": "a_joints",
  451. "defines": [
  452. "CC_USE_SKINNING"
  453. ],
  454. "location": 4
  455. },
  456. {
  457. "name": "a_weights",
  458. "defines": [
  459. "CC_USE_SKINNING"
  460. ],
  461. "format": 44,
  462. "location": 5
  463. },
  464. {
  465. "name": "a_jointAnimInfo",
  466. "defines": [
  467. "USE_INSTANCING",
  468. "CC_USE_BAKED_ANIMATION"
  469. ],
  470. "format": 44,
  471. "isInstanced": true,
  472. "location": 6
  473. },
  474. {
  475. "name": "a_matWorld0",
  476. "defines": [
  477. "USE_INSTANCING"
  478. ],
  479. "format": 44,
  480. "isInstanced": true,
  481. "location": 7
  482. },
  483. {
  484. "name": "a_matWorld1",
  485. "defines": [
  486. "USE_INSTANCING"
  487. ],
  488. "format": 44,
  489. "isInstanced": true,
  490. "location": 8
  491. },
  492. {
  493. "name": "a_matWorld2",
  494. "defines": [
  495. "USE_INSTANCING"
  496. ],
  497. "format": 44,
  498. "isInstanced": true,
  499. "location": 9
  500. },
  501. {
  502. "name": "a_lightingMapUVParam",
  503. "defines": [
  504. "USE_INSTANCING",
  505. "CC_USE_LIGHTMAP"
  506. ],
  507. "format": 44,
  508. "isInstanced": true,
  509. "location": 10
  510. },
  511. {
  512. "name": "a_localShadowBiasAndProbeId",
  513. "defines": [
  514. "USE_INSTANCING"
  515. ],
  516. "format": 44,
  517. "isInstanced": true,
  518. "location": 11
  519. },
  520. {
  521. "name": "a_reflectionProbeData",
  522. "defines": [
  523. "USE_INSTANCING",
  524. "CC_USE_REFLECTION_PROBE"
  525. ],
  526. "format": 44,
  527. "isInstanced": true,
  528. "location": 12
  529. },
  530. {
  531. "name": "a_sh_linear_const_r",
  532. "defines": [
  533. "USE_INSTANCING",
  534. "CC_USE_LIGHT_PROBE"
  535. ],
  536. "format": 44,
  537. "isInstanced": true,
  538. "location": 13
  539. },
  540. {
  541. "name": "a_sh_linear_const_g",
  542. "defines": [
  543. "USE_INSTANCING",
  544. "CC_USE_LIGHT_PROBE"
  545. ],
  546. "format": 44,
  547. "isInstanced": true,
  548. "location": 14
  549. },
  550. {
  551. "name": "a_sh_linear_const_b",
  552. "defines": [
  553. "USE_INSTANCING",
  554. "CC_USE_LIGHT_PROBE"
  555. ],
  556. "format": 44,
  557. "isInstanced": true,
  558. "location": 15
  559. },
  560. {
  561. "name": "a_vertexId",
  562. "defines": [
  563. "CC_USE_MORPH"
  564. ],
  565. "format": 11,
  566. "location": 16
  567. }
  568. ],
  569. "varyings": [
  570. {
  571. "name": "v_uv",
  572. "type": 14,
  573. "count": 1,
  574. "defines": [],
  575. "stageFlags": 17,
  576. "location": 0
  577. }
  578. ],
  579. "fragColors": [
  580. {
  581. "name": "fragColor",
  582. "typename": "vec4",
  583. "type": 16,
  584. "count": 1,
  585. "defines": [],
  586. "stageFlags": 16,
  587. "location": 0
  588. }
  589. ],
  590. "descriptors": [
  591. {
  592. "rate": 0,
  593. "blocks": [],
  594. "samplerTextures": [],
  595. "samplers": [],
  596. "textures": [],
  597. "buffers": [],
  598. "images": [],
  599. "subpassInputs": []
  600. },
  601. {
  602. "rate": 1,
  603. "blocks": [],
  604. "samplerTextures": [],
  605. "samplers": [],
  606. "textures": [],
  607. "buffers": [],
  608. "images": [],
  609. "subpassInputs": []
  610. },
  611. {
  612. "rate": 2,
  613. "blocks": [],
  614. "samplerTextures": [],
  615. "samplers": [],
  616. "textures": [],
  617. "buffers": [],
  618. "images": [],
  619. "subpassInputs": []
  620. },
  621. {
  622. "rate": 3,
  623. "blocks": [
  624. {
  625. "name": "Pipeline",
  626. "members": [
  627. {
  628. "name": "g_platform",
  629. "type": 16,
  630. "count": 1
  631. }
  632. ],
  633. "defines": [],
  634. "stageFlags": 1,
  635. "binding": 0
  636. }
  637. ],
  638. "samplerTextures": [
  639. {
  640. "name": "inputTexture",
  641. "type": 28,
  642. "count": 1,
  643. "defines": [],
  644. "stageFlags": 16,
  645. "binding": 1
  646. }
  647. ],
  648. "samplers": [],
  649. "textures": [],
  650. "buffers": [],
  651. "images": [],
  652. "subpassInputs": []
  653. }
  654. ],
  655. "hash": 4126709291,
  656. "glsl4": {
  657. "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}",
  658. "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}"
  659. },
  660. "glsl3": {
  661. "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}",
  662. "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}"
  663. },
  664. "glsl1": {
  665. "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}",
  666. "frag": "\nprecision highp float;\nvarying vec2 v_uv;\nuniform sampler2D inputTexture;\nvoid main () {\n gl_FragColor = texture2D(inputTexture, v_uv);\n}"
  667. },
  668. "builtins": {
  669. "globals": {
  670. "blocks": [],
  671. "samplerTextures": [],
  672. "buffers": [],
  673. "images": []
  674. },
  675. "locals": {
  676. "blocks": [],
  677. "samplerTextures": [],
  678. "buffers": [],
  679. "images": []
  680. },
  681. "statistics": {
  682. "CC_EFFECT_USED_VERTEX_UNIFORM_VECTORS": 1,
  683. "CC_EFFECT_USED_FRAGMENT_UNIFORM_VECTORS": 0
  684. }
  685. },
  686. "defines": [
  687. {
  688. "name": "USE_INSTANCING",
  689. "type": "boolean",
  690. "defines": [],
  691. "editor": {
  692. "elevated": true
  693. }
  694. },
  695. {
  696. "name": "CC_USE_SKINNING",
  697. "type": "boolean",
  698. "defines": []
  699. },
  700. {
  701. "name": "CC_USE_BAKED_ANIMATION",
  702. "type": "boolean",
  703. "defines": [
  704. "USE_INSTANCING"
  705. ]
  706. },
  707. {
  708. "name": "CC_USE_LIGHTMAP",
  709. "type": "boolean",
  710. "defines": [
  711. "USE_INSTANCING"
  712. ]
  713. },
  714. {
  715. "name": "CC_USE_REFLECTION_PROBE",
  716. "type": "boolean",
  717. "defines": [
  718. "USE_INSTANCING"
  719. ]
  720. },
  721. {
  722. "name": "CC_RECEIVE_SHADOW",
  723. "type": "boolean",
  724. "defines": [
  725. "USE_INSTANCING"
  726. ]
  727. },
  728. {
  729. "name": "CC_USE_LIGHT_PROBE",
  730. "type": "boolean",
  731. "defines": [
  732. "USE_INSTANCING"
  733. ]
  734. },
  735. {
  736. "name": "CC_USE_MORPH",
  737. "type": "boolean",
  738. "defines": []
  739. }
  740. ],
  741. "name": "pipeline/post-process/tone-mapping|vs|fs-copy"
  742. }
  743. ],
  744. "combinations": [],
  745. "hideInEditor": false
  746. }