Compare commits

..

320 Commits

Author SHA1 Message Date
mob-sakai 7ed4146b2e release v3.2.0 2019-07-17 02:05:34 +09:00
mob-sakai 06ec169183 update documents for v3.2.0 2019-07-17 02:05:33 +09:00
mob-sakai 47898e2233 fix demo scene path 2019-07-17 01:58:38 +09:00
mob-sakai b84de47aa3 fix #165; UIShiny effect remain on screen after calling Stop() 2019-07-17 01:46:09 +09:00
mob-sakai 555baa5c4a close #166; Add demo for Unity 2018+ and TMPro 1.2+ 2019-07-17 00:27:19 +09:00
mob-sakai 4bcfb7bc11 Add demo 2019-07-16 22:55:50 +09:00
mob-sakai 977f513276 Remove unused directory 2019-07-16 22:55:40 +09:00
mob-sakai 90478b7eba fix #183; UIDissolve's "Reverse Play" option works only in OnEnable 2019-07-13 21:23:22 +09:00
mob-sakai 27515f18d3 Fix dissolve shader for CanvasGroup.Alpha 2019-07-13 21:13:38 +09:00
Takashi Sakai 79534a8c00 Merge pull request #176 from Oskiii/bugfix/fix-error-during-tmpro-spriteasset-check
Add a null check to TMPro sprite asset material checking
2019-07-05 08:51:39 +09:00
Oskari Liukku 84ac701d44 Add a null check to TMPro sprite asset material checking 2019-07-04 19:21:07 +03:00
mob-sakai 29532e0a8d fix #163; Material caching is not working properly 2019-06-30 23:12:06 +09:00
mob-sakai 0c43f44236 close #161; UICapturedImage: Immediate capturing option is removed as it does not work on many platforms 2019-06-30 23:12:06 +09:00
Takashi Sakai cde5b6b0e8 Update FUNDING.yml 2019-06-24 15:49:28 +09:00
Takashi Sakai 17a54f558f Create FUNDING.yml 2019-06-24 15:44:47 +09:00
mob-sakai 0e7b2be220 Refactor shaders 2019-03-12 20:56:32 +09:00
mob-sakai 5410478497 Refactor shaders 2019-03-12 20:51:45 +09:00
mob-sakai e6f648e1b4 Refactor shaders 2019-03-12 15:56:31 +09:00
mob-sakai 669188d866 release v3.1.0 2019-03-10 23:13:28 +09:00
mob-sakai 9fdcf5be6d update documents for v3.1.0 2019-03-10 23:13:28 +09:00
Takashi Sakai bf87aebc47 Merge pull request #153 from antpaw/reverse-animation-dissolve
add reverse animation option to UIDissolve
2019-03-10 21:25:14 +09:00
Takashi Sakai 24a3cbbf90 Merge branch 'develop' into reverse-animation-dissolve 2019-03-10 21:24:51 +09:00
mob-sakai 4ceb771176 Change a symbol for TextMeshPro to TMP_PRESENT 2019-03-10 21:19:48 +09:00
Anton Pawlik 3589a45b46 add reverse animation option to UIDissolve 2019-03-10 12:45:06 +01:00
mob-sakai 8d92abae45 Update readme 2019-03-10 20:39:16 +09:00
mob-sakai 1e9997cf0a Fix additional channels 2019-03-06 21:13:11 +09:00
mob-sakai b380a8cbbb Support TMPro underlay 2019-03-06 21:12:14 +09:00
mob-sakai 7d1d918c29 Move files 2019-03-05 14:16:10 +09:00
mob-sakai af2cc4aca7 Support TMPro 2019-02-28 11:14:10 +09:00
mob-sakai 64d7aab46a Move demo 2019-02-28 11:14:09 +09:00
mob-sakai 8c2eebf719 Support TMPro 2019-02-28 11:14:10 +09:00
mob-sakai 36a36b8d2b pkgtest 2019-02-24 09:16:08 +09:00
mob-sakai 7fcfab6b6f test prj 2019-02-24 09:16:08 +09:00
mob-sakai e5f0be5085 Add package test project 2019-02-24 09:16:08 +09:00
mob-sakai ec3576d3b6 release v3.0.4 2019-02-15 21:36:38 +09:00
mob-sakai ed0095de55 update documents for v3.0.4 2019-02-15 21:36:38 +09:00
mob-sakai 410cfa0973 Add documents for UnityList 2019-02-15 20:50:32 +09:00
mob-sakai 40fa78d401 Delete documents 2019-02-15 20:50:02 +09:00
mob-sakai 4e048ff93c fix #148; UIEffectCapturedImage.effectColor does not work as expected 2019-02-15 20:48:10 +09:00
Takashi Sakai f119ca608b Merge pull request #147 from antpaw/initial-animation-delay
add initial play animation delay option to UIShiny
2019-02-15 20:28:20 +09:00
mob-sakai 62f80258ec Disable warning for .Net 4.x 2019-02-15 16:32:57 +09:00
Anton Pawlik 87cacfa3ff add initial play animation delay option to UIShiny 2019-02-13 10:42:15 +01:00
Anton Pawlik 03fb998bfb fix warnings 2019-01-21 15:33:10 +01:00
mob-sakai 086ad3fd35 release v3.0.3 2019-01-21 20:36:47 +09:00
mob-sakai f196dc3bb5 update change log 2019-01-21 20:36:47 +09:00
mob-sakai 8685c63286 Update release protocol 2019-01-21 19:26:36 +09:00
mob-sakai f60ba8f0fa fix #145; UIHsvModifier works only on gamma-space 2019-01-21 19:23:34 +09:00
mob-sakai 178db32947 Ignore TMPro dir 2019-01-21 19:23:26 +09:00
mob-sakai eb9e6c712a Add documents 2019-01-18 19:48:52 +09:00
mob-sakai f99962a538 Delete documents 2019-01-16 08:57:43 +09:00
mob-sakai 07f85474f4 release v3.0.2 2019-01-16 08:22:36 +09:00
mob-sakai b80abd9636 update change log 2019-01-16 08:22:36 +09:00
mob-sakai 7ff2a4e509 Fix change log 2019-01-15 22:58:06 +09:00
mob-sakai 39dd9acaa9 fix #144; UIEffect & UIHsvModifier & UITransitionEffect Strange action 2019-01-15 22:57:28 +09:00
mob-sakai 7ff21981a9 Use temporary render texture 2019-01-15 22:57:28 +09:00
Takashi Sakai 40a76a2fb2 Update README.md 2019-01-10 22:15:00 +09:00
Takashi Sakai f77839ab49 Update README.md 2019-01-10 22:12:22 +09:00
mob-sakai 99375cce90 release v3.0.1 2018-11-07 15:56:59 +09:00
mob-sakai a13f4702da update change log 2018-11-07 15:56:59 +09:00
mob-sakai 8247a34341 Fix for warning 2018-11-07 15:03:31 +09:00
mob-sakai 175011211e fix #139; Compile error in 2018.3 2018-11-07 15:03:31 +09:00
mob-sakai 5ff0de7354 release v3.0.0 2018-10-10 08:44:38 +09:00
mob-sakai 1709f2de26 update change log 2018-10-10 08:44:38 +09:00
mob-sakai 9266e4c50f Refactor 2018-10-10 08:30:11 +09:00
mob-sakai eaba40fc29 Update readme 2018-10-10 08:30:11 +09:00
mob-sakai 47d9f2978d Update demo 2018-10-10 08:30:11 +09:00
mob-sakai 950b07cfcc close #136; UIEffectCapturedImage: Remove 'TargetTexture' feature 2018-10-08 10:05:50 +09:00
mob-sakai 0a85f355c1 UIEffectCapturedImage: Reduce GC 2018-10-08 10:05:50 +09:00
mob-sakai c7782686ae Refactor 2018-10-08 10:05:50 +09:00
mob-sakai c9809ff1f4 close #135; UITransitionEffect: "Pass ray on hidden" option 2018-10-08 10:05:50 +09:00
mob-sakai b9e0da1316 Refactor 2018-10-06 21:39:09 +09:00
mob-sakai 9e79f18613 close #133; Add component menu in editor 2018-10-06 21:29:30 +09:00
mob-sakai 8c4dc5d996 Improve effect player 2018-10-06 21:29:29 +09:00
mob-sakai 850ae8e7e4 Add editors 2018-10-06 21:29:29 +09:00
mob-sakai 7724d5a9ed close #132; UITransitionEffect: Add Show/Hide method 2018-10-06 21:29:29 +09:00
mob-sakai 3215160a8f Effect runner 2018-10-06 21:29:29 +09:00
mob-sakai 0c1468b257 Fix shadow 2018-10-06 21:29:29 +09:00
mob-sakai 5de1ff78a4 close #92; Add tooltip 2018-10-06 21:29:29 +09:00
mob-sakai 896ea1ab93 Refactor 2018-10-06 21:29:29 +09:00
mob-sakai cdd8e2b7b0 close #61; Change: Change ToneMode to EffectMode 2018-10-05 16:57:36 +09:00
mob-sakai e660c8233d Refactor 2018-10-05 16:57:36 +09:00
mob-sakai b0f7ad390a close #130; UIEffectCapturedImage: Immediate capturing 2018-10-05 11:30:28 +09:00
mob-sakai 51f8e13949 Update demo 2018-10-05 11:27:51 +09:00
mob-sakai 8682783932 Update readme 2018-10-05 08:38:36 +09:00
mob-sakai a854d5d561 Add issue template 2018-09-30 11:00:07 +09:00
mob-sakai d9361ebf74 Refactor 2018-09-29 22:59:07 +09:00
mob-sakai 5f1fdedb3c Update demo 2018-09-29 22:59:07 +09:00
mob-sakai 33881e7c6a Delete UITransitionEffect.None 2018-09-29 22:59:06 +09:00
mob-sakai b3a3edd30a Improve effect runner 2018-09-29 22:59:06 +09:00
mob-sakai da9f36397d Improve editor 2018-09-29 22:59:06 +09:00
mob-sakai ff0ea5d24c Add DeprecatedRemover 2018-09-29 22:59:06 +09:00
mob-sakai 67c0bf9f6d close #98; Remove 'custom effect' feature in UIEffect component 2018-09-29 22:59:06 +09:00
mob-sakai a2ad00041b Improve parameter texture 2018-09-29 22:59:06 +09:00
mob-sakai 97a6f48ac1 UITransitionEffect: Add 'Dissolve' mode 2018-09-29 22:59:06 +09:00
mob-sakai bfc3468705 Fix fade transition 2018-09-29 22:59:06 +09:00
mob-sakai 66516f0e2d Fix Shadow color 2018-09-29 22:59:06 +09:00
mob-sakai 20717fdca6 close #95; Improve blurring for atlas 2018-09-29 22:59:06 +09:00
mob-sakai 4f179ea5fc close #110; Remove 'additional shadow' in UIShadow component 2018-09-29 22:59:06 +09:00
mob-sakai a073a70582 close #63; New architecture: Shared texture for effect parameter 2018-09-29 22:59:06 +09:00
mob-sakai 91830e2b20 close #98; Remove 'custom effect' feature in UIEffect component 2018-09-29 22:59:06 +09:00
mob-sakai cd970b05a9 close #78; Remove 'cutoff' and 'mono' effect in UIEffect component 2018-09-29 22:59:06 +09:00
mob-sakai 7be2f6f8d7 close #91; Remove 'hue' effect in UIEffect component 2018-09-29 22:59:06 +09:00
mob-sakai 9903cce242 close #93; UIShiny: Change parameter name highlight to gloss 2018-09-29 22:59:06 +09:00
mob-sakai 21f8af7668 Upgrade tool 2018-09-29 22:59:06 +09:00
mob-sakai ee0c1ceee3 close #97; Obsolete shadow effect in UIEffect component 2018-09-29 22:59:06 +09:00
Takashi Sakai 8b31489593 close #50; Use the graphic color as effect color, to reduce parameters 2018-09-29 22:59:06 +09:00
mob-sakai 76bfd259cf close #87; Use Canvas.willRenderCanvases event instead of Update method 2018-09-29 22:59:06 +09:00
mob-sakai aeb6d562ed release v2.8.3 2018-09-29 11:03:31 +09:00
mob-sakai 01e5f05118 update change log 2018-09-29 11:03:31 +09:00
mob-sakai a92aa327b5 fix #131; UIEffectCapturedImage: Black screen with Unity 2018.1+ editor on Windows 2018-09-29 10:43:26 +09:00
mob-sakai ea7d98dc5e release v2.8.2 2018-09-26 22:40:48 +09:00
mob-sakai 77ebcf2b7a update change log 2018-09-26 22:40:48 +09:00
mob-sakai 773f8cf4ae High Serria 2018-09-26 22:09:40 +09:00
mob-sakai c792be9626 Update readme 2018-09-26 22:02:43 +09:00
mob-sakai 1110bf3dad Update gitignore 2018-09-26 16:51:12 +09:00
mob-sakai 4dfdcd76ab fix #125; UICapturedEffectImage does not work with Lightweight Render Pipeline LWRP 2018-09-26 16:51:12 +09:00
mob-sakai 385c082fb4 fix #126; When "UI-Effect.mat" is created automatically, Unity hangs up 2018-09-25 10:49:10 +09:00
mob-sakai d84d9747bc release v2.8.1 2018-08-17 10:25:59 +09:00
mob-sakai 318fc18597 update change log 2018-08-17 10:25:59 +09:00
mob-sakai d93a83d577 fix #119; (Demo) "Transition capture & dissolve" is incorrect 2018-08-17 10:21:42 +09:00
mob-sakai c94b3965af release v2.8.0 2018-08-14 17:14:30 +09:00
mob-sakai 9990f640c7 update change log 2018-08-14 17:14:29 +09:00
mob-sakai d840a76759 Update demo 2018-08-14 17:06:21 +09:00
mob-sakai 5bf0df0f66 Update readme 2018-08-14 17:06:21 +09:00
mob-sakai 84df2f4cf6 Refactor 2018-08-14 17:06:20 +09:00
mob-sakai 27e8bc8117 close #114; UIEffectCapturedImage: Keep aspect ratio 2018-08-14 17:05:22 +09:00
mob-sakai 362f881f73 close #116; UIEffectCapturedImage: change parameter name keepCanvasSize to fitToScreen 2018-08-14 17:05:22 +09:00
mob-sakai 7fe79bb11f close #115; UIEffectCapturedImage: Supports 'ScreenSpace - Overlay' 2018-08-14 17:05:22 +09:00
mob-sakai 65166ecdbd close #113; UIEffectCapturedImage: 'Capture on enable' option 2018-08-08 11:02:20 +09:00
mob-sakai 9a580b2132 close #111; UITransitionEffect: Change transition texture 2018-08-07 15:51:48 +09:00
mob-sakai 4236fcc0da release v2.7.1 2018-08-06 10:42:52 +09:00
mob-sakai ecad03cb37 update change log 2018-08-06 10:42:52 +09:00
Takashi Sakai 61879b86db fix #112; In v2.7.0, UIEffectCapturedImage is flipped vertically on Windows 2018-08-04 03:34:06 +09:00
mob-sakai 4c5f01c7f3 release v2.7.0 2018-07-26 20:48:41 +09:00
mob-sakai 3c3d47aede update change log 2018-07-26 20:48:41 +09:00
mob-sakai ed0a02b8d6 Update readme 2018-07-26 20:43:37 +09:00
mob-sakai 9cdd8558b1 Update demo 2018-07-26 20:43:37 +09:00
mob-sakai b38358f867 UIEffectCapturedImage: Default capture quality is 'Detail' 2018-07-26 20:43:35 +09:00
mob-sakai 71c6b4c314 UIEffectCapturedImage: 'Iteration' means blur iteration 2018-07-26 19:46:02 +09:00
mob-sakai 9c7e068374 close #108; UIEffectCapturedImage: Support target RenderTexture to use external component 2018-07-26 19:46:02 +09:00
mob-sakai 9081598259 Fix #109; UIEffectCapturedImage: ColorMode is not working 2018-07-26 19:46:02 +09:00
mob-sakai a135c7e23c UIEffectCapturedImage: Show warning message for overlay rendering in inspector 2018-07-26 19:46:02 +09:00
mob-sakai fb3b0a4312 close #96; UIEffectCapturedImage: Use multi-pass blurring to capture screenshot 2018-07-26 19:46:02 +09:00
mob-sakai 4240974c81 UIEffectCapturedImage: Fix keeping root canvas size 2018-07-26 19:46:02 +09:00
mob-sakai beaaef3208 close #105; Transition effect as other component 2018-07-26 19:46:02 +09:00
mob-sakai f9e6477114 fix #101; UIDissolve is not maskable 2018-07-26 19:46:02 +09:00
mob-sakai fad4c847e6 Add extensions for EffectArea 2018-07-26 19:46:01 +09:00
mob-sakai 5fb19badb3 close #44; HSV modifier 2018-07-26 19:46:01 +09:00
mob-sakai 60d0df6171 release v2.6.2 2018-07-18 10:53:23 +09:00
mob-sakai e031e57f23 update change log 2018-07-18 10:53:23 +09:00
mob-sakai c919449629 fix #99; Shader has compile errors in D3D9 or D3D11_9X(WSA) 2018-07-18 10:46:55 +09:00
mob-sakai 6bfc676bee update release script 2018-07-17 17:28:11 +09:00
mob-sakai 346b1c8ec6 release 2018-06-14 18:15:29 +09:00
mob-sakai be86d169bf update change log 2018-06-14 18:15:28 +09:00
mob-sakai ee452d6794 fix #90; Errors occurred on build (v2.6.0) 2018-06-14 18:10:57 +09:00
Takashi Sakai e0c660773f Update CHANGELOG.md 2018-06-14 17:58:20 +09:00
mob-sakai 0369fa1a25 release 2018-06-14 17:48:58 +09:00
mob-sakai cec7f8e995 update change log 2018-06-14 17:48:58 +09:00
mob-sakai 64a31982f7 Update demo 2018-06-14 17:14:52 +09:00
mob-sakai 84d20aefd4 Update readme 2018-06-14 16:55:44 +09:00
mob-sakai 7a59e35843 close #88; Improve blurring performance 2018-06-14 16:52:09 +09:00
mob-sakai fcd7f68831 close #86; Separate the effect with a character 2018-06-14 16:52:09 +09:00
mob-sakai 35e2ac5677 close #75; UIDissolve: Change noise texture from inspector or script 2018-06-14 16:52:09 +09:00
mob-sakai ec63fd905d Update bundled material 2018-06-14 16:52:09 +09:00
mob-sakai 481d4e8e63 close #83; Refactoring to prepare v3.0.0 2018-06-14 16:52:09 +09:00
mob-sakai 321a47b4d3 release 2018-06-07 21:28:27 +09:00
mob-sakai a03b6fdf2c update change log 2018-06-07 21:28:26 +09:00
mob-sakai 7e04e08bb3 Update readme 2018-06-07 21:26:36 +09:00
mob-sakai 844d6b2d71 fix #85; When UIEFFECT_SEPARATE symbol is defined, UIDissolve does not work well 2018-06-07 21:26:02 +09:00
Takashi Sakai e7ce12353b Update README.md 2018-06-06 00:21:27 +09:00
mob-sakai 4a5557185d Update readme 2018-06-01 10:59:02 +09:00
mob-sakai 7f42441d76 release 2018-05-31 20:04:13 +09:00
mob-sakai 58c668769c update change log 2018-05-31 20:04:13 +09:00
mob-sakai d35167fc96 Fix #82; Fix demo 2018-05-31 20:02:42 +09:00
mob-sakai 949bfbf7ab Fix scene path 2018-05-31 18:53:41 +09:00
mob-sakai 95182bf539 Fix readme link 2018-05-31 18:21:21 +09:00
mob-sakai 9934287b2f update release script 2018-05-31 18:17:40 +09:00
mob-sakai 0967940528 release 2018-05-31 18:13:17 +09:00
mob-sakai e502cb48b1 update change log 2018-05-31 18:13:17 +09:00
mob-sakai 0442702395 update release script 2018-05-31 18:11:48 +09:00
mob-sakai cda11cc638 Update demo 2018-05-31 18:04:11 +09:00
mob-sakai 813b0f4454 close #81; UIDissolve: Play effect from script/inspector 2018-05-31 18:01:51 +09:00
mob-sakai b1588400d5 close #80; UIShiny: Play effect from script/inspector 2018-05-31 18:01:51 +09:00
mob-sakai b383492d79 Add material bundle generator for export package 2018-05-31 15:42:23 +09:00
mob-sakai 156049cc07 Update readme 2018-05-31 15:29:22 +09:00
mob-sakai bdd455ba56 close #56; Change directory structure 2018-05-31 14:28:28 +09:00
mob-sakai 81d64e414d Clean up demo 2018-05-31 14:14:21 +09:00
mob-sakai 9b727a9542 Update readme 2018-05-31 13:14:28 +09:00
mob-sakai eec29bb7e3 Update demo 2018-05-30 16:41:45 +09:00
mob-sakai 538fe5de67 fix #79; UIDissolve: When width=1 and location=0, image is lacked 2018-05-30 16:13:32 +09:00
mob-sakai 578b93af95 Fixed: color effect is not applied on shadow 2018-05-30 13:04:04 +09:00
mob-sakai 1a251ecada Update demo 2018-05-30 09:06:58 +09:00
mob-sakai 882e19aea0 close #60; Add Custom effect as other component 2018-05-30 09:06:58 +09:00
mob-sakai 65e36cfe80 close #74; UIEffect inherit UIEffectBase 2018-05-30 09:06:57 +09:00
mob-sakai caccf19e00 close #73; During play mode, you can change the effect type, color type, and blur type (in Editor) 2018-05-29 23:34:43 +09:00
mob-sakai caff7bd005 update release script 2018-05-29 22:59:24 +09:00
mob-sakai 9073d31634 close #72: Add shadow effect component 2018-05-29 22:57:58 +09:00
mob-sakai 7b3314ff57 Update demo 2018-05-29 22:39:00 +09:00
mob-sakai 1d0e92c8e7 close #68: UIShiny : Visual update 2018-05-29 22:38:15 +09:00
mob-sakai 23b4bac85b update project files 2018-05-29 19:17:56 +09:00
mob-sakai ef89675c6b release 2018-05-29 18:32:32 +09:00
mob-sakai ee7c799ea6 update change log 2018-05-29 18:32:32 +09:00
mob-sakai 0570c22385 update release script 2018-05-29 18:31:12 +09:00
mob-sakai 7112636409 fix #69 : UIEffectCapturedImage: The result image is flipped vertically 2018-05-29 18:31:12 +09:00
Takashi Sakai db8839f3e0 release v2.4.0 2018-05-21 16:45:32 +09:00
Takashi Sakai 3aa186aeaf update change log 2018-05-21 16:45:32 +09:00
Takashi Sakai 237dab7639 Update readme 2018-05-21 16:02:21 +09:00
Takashi Sakai 45520d98c5 Update demo for v.2.4.0 2018-05-21 16:02:21 +09:00
Takashi Sakai 9e830f61f0 Remove shader keyword in material 2018-05-21 16:02:21 +09:00
Takashi Sakai ed9a68c1fa Resolved #64 : UIDissolve: Add color mode option. 2018-05-21 15:23:05 +09:00
Takashi Sakai 772297abd0 release v2.3.2 2018-05-21 15:13:20 +09:00
Takashi Sakai b4cb57e097 update change log 2018-05-21 15:13:19 +09:00
Takashi Sakai 923f74d047 Update release script (use 5.5.0p4 to export package) 2018-05-21 15:09:56 +09:00
Takashi Sakai be90296be7 Add UNITY_STANDALONE_WIN symbol 2018-05-19 13:48:31 +09:00
Takashi Sakai e6027fbec2 Fixed #65 : UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically (other method) 2018-05-19 13:23:29 +09:00
Takashi Sakai 72e2149f70 Revert "Fixed: UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically (on Windows) #62"
This reverts commit 9d911eb581.
2018-05-19 12:12:43 +09:00
Takashi Sakai 8490d11762 Update README.md 2018-05-11 20:39:13 +09:00
Takashi Sakai ed3fce5fa5 release v2.3.1 2018-05-10 12:44:18 +09:00
Takashi Sakai 4bbe569248 update change log 2018-05-10 12:44:18 +09:00
Takashi Sakai 9d911eb581 Fixed: UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically (on Windows) #62 2018-05-10 12:34:39 +09:00
Takashi Sakai bc87c42cdd Remove docs dir 2018-05-08 21:19:12 +09:00
Takashi Sakai 972235ec44 Update readme 2018-05-08 21:10:44 +09:00
Takashi Sakai e4fa6aff30 release v2.3.0 2018-05-08 20:45:21 +09:00
Takashi Sakai b80ff1498e update change log 2018-05-08 20:45:20 +09:00
Takashi Sakai ea83602102 Update release script 2018-05-08 20:43:54 +09:00
Takashi Sakai df5f723e11 Upload demo to github pages 2018-05-07 14:31:54 +09:00
Takashi Sakai 32293858bf Update demo 2018-05-07 14:31:53 +09:00
Takashi Sakai e7bec9849b Update readme 2018-05-07 14:31:52 +09:00
Takashi Sakai 8ae051b7b2 Feature: Flip horizontal/vertical #47 2018-05-07 14:31:52 +09:00
Takashi Sakai bb300bef59 update release script 2018-04-24 13:14:34 +09:00
Takashi Sakai 30884fd349 [WIP]Feature: Dissolve 2018-04-23 21:45:08 +09:00
Takashi Sakai f477f1174a Feature: Shining effect #9 2018-04-20 19:58:42 +09:00
Takashi Sakai aaf79b76a9 release v2.2.0 2018-04-12 09:13:00 +09:00
Takashi Sakai 2c8b994aa0 update change log 2018-04-12 09:12:59 +09:00
Takashi Sakai 49c3855c49 Change: Reduce the pixelation effect when tone level = 1. #57 2018-04-12 09:01:02 +09:00
Takashi Sakai 537784c0f3 Update release script 2018-04-12 08:25:46 +09:00
Takashi Sakai bf8b4833fd Update README 2018-04-12 08:25:46 +09:00
Takashi Sakai c78bc86cf1 Refactor: Add shader struct 2018-04-12 08:25:46 +09:00
Takashi Sakai 0ad6bd7693 Fixed: Color effect on shadow is incorrect. #55 2018-04-12 08:25:46 +09:00
Takashi Sakai 3fda891b35 Feature: Customize shader/material. #46 2018-04-12 08:25:45 +09:00
Takashi Sakai efefad1a73 Feature: UIEffectCapturedImage supports keep canvas size. #54 2018-04-12 08:25:45 +09:00
Takashi Sakai 1e9cea00cb Feature: UIEffectCapturedImage supports Quality Type to easy setup. #53 2018-04-12 08:25:45 +09:00
Takashi Sakai f17183d1b0 release v2.1.0 2018-04-04 21:05:27 +09:00
Takashi Sakai 7d699f08db update change log 2018-04-04 21:05:27 +09:00
Takashi Sakai db98e1f0ce Add release script for Github 2018-04-04 21:04:21 +09:00
Takashi Sakai eaa78e2bb4 Feature: UIEffectCapturedImage support iterative operation. 2018-04-04 20:49:35 +09:00
Takashi Sakai 068783767a Change to symbolic 2018-04-03 18:53:30 +09:00
Takashi Sakai fe18d0f82f Delete files 2018-04-03 18:51:10 +09:00
Takashi Sakai f529ccdef7 Merge pull request #43 from mob-sakai/develop
Release 2.0.0
2018-01-25 16:48:44 +09:00
Takashi Sakai f9a7e317fe Release 2.0.0 2018-01-25 15:39:34 +09:00
Takashi Sakai 1a8265ecfa Refactoring 2018-01-25 15:39:33 +09:00
Takashi Sakai 75f6939385 Changed: Change namespace to Coffee.UIExtensions. 2018-01-25 15:39:33 +09:00
Takashi Sakai 44579dfb40 Changed: Unity 5.3.x & 5.4.x are no longer supported. 2018-01-25 15:39:33 +09:00
Takashi Sakai bd29ae6e9f Changed: Default is "Combined material". 2018-01-25 15:39:32 +09:00
Takashi Sakai 15ebd63b8c Feature: Switch separated/combined materials by script symbol "UIEFFECT_SEPARATE". 2018-01-25 15:39:32 +09:00
Takashi Sakai 49fa49c249 Update readme: How to improve performance? 2018-01-25 14:52:41 +09:00
Takashi Sakai 4ae260f0a3 Merge pull request #42 from mob-sakai/hotfix
Release 1.6.1
2018-01-25 11:12:16 +09:00
Takashi Sakai 5ea4461082 Release 1.6.1 2018-01-25 10:40:00 +09:00
Takashi Sakai 21c416aa5b Update readme and license 2018-01-25 10:39:59 +09:00
Takashi Sakai 995e03987b Delete symbolic readme and license 2018-01-25 10:39:59 +09:00
Takashi Sakai f33ab503d6 Fixed: Cannot access protected member UnityEngine.UI.BaseMeshEffect.graphic in Unity5.6+. 2018-01-25 10:39:59 +09:00
Takashi Sakai ab5f988cf1 Merge pull request #38 from mob-sakai/develop
Release 1.6.0
2018-01-18 13:02:10 +09:00
Takashi Sakai 5ab1e0f300 Release 1.6.0 2018-01-18 12:57:40 +09:00
Takashi Sakai 79f8e34c3c Changed: UIEffect inherit BaseMeshEffect. 2018-01-18 12:41:37 +09:00
Takashi Sakai 3217c7f015 Fixed: Pixelization is incorrect. 2018-01-18 12:41:37 +09:00
Takashi Sakai 72eb81de95 Changed: ShadowMode -> ShadowStyle. 2018-01-18 11:57:29 +09:00
Takashi Sakai 314313a45d Changed: Blur level is range [0-1]. 2018-01-18 11:57:29 +09:00
Takashi Sakai f27b3c0541 Merge pull request #37 from mob-sakai/hotfix
Release 1.5.1
2018-01-18 11:55:19 +09:00
Takashi Sakai 7779af835a Release 1.5.1 2018-01-18 11:51:20 +09:00
Takashi Sakai 6123ac3bd4 Fixed: An error occurs when no effect is specified for UICapturedImage. #36 2018-01-18 11:17:26 +09:00
Takashi Sakai 2d46d47566 Merge pull request #31 from mob-sakai/release
Release 1.5.0
2018-01-16 14:51:01 +09:00
Takashi Sakai ac2ef42521 Release 1.5.0 2018-01-16 14:47:45 +09:00
Takashi Sakai 5648bd6020 Demo: Add hue shift, shadow3, gradient 2018-01-16 11:54:42 +09:00
Takashi Sakai 9d4a2e64f9 Merge pull request #30 from mob-sakai/master
Merge 1.4.4
2018-01-16 11:53:24 +09:00
Takashi Sakai 3a295f8677 Merge pull request #29 from mob-sakai/hotfix
Release 1.4.4
2018-01-16 11:43:12 +09:00
Takashi Sakai b2c4e58de2 Release 1.4.4 2018-01-16 11:38:34 +09:00
Takashi Sakai f8eeb4a5db Fixed: Error has occur on edit prefab. #27 2018-01-16 11:37:45 +09:00
Takashi Sakai 55b8de2855 Merge pull request #23 from mob-sakai/feature/shadow3
Feature: Add ShadowMode: Shadow3. #11
2018-01-15 15:54:00 +09:00
Takashi Sakai 303fcfbe64 Feature: Add ShadowMode: Shadow3. #11 2018-01-15 15:52:49 +09:00
Takashi Sakai 782ae2b1c3 Merge pull request #24 from mob-sakai/feature/gradient
Feature: Gradient. #7
2018-01-15 15:52:29 +09:00
Takashi Sakai b18c3bf387 Feature: Gradient. #7 2018-01-15 15:50:53 +09:00
Takashi Sakai bf4116b9ab Merge pull request #17 from mob-sakai/feature/hue
Feature: Add tone effect `Hue Shift`. #8
2018-01-15 15:46:46 +09:00
Takashi Sakai deb632081e Feature: Add tone effect Hue Shift. #8 2018-01-15 15:40:33 +09:00
Takashi Sakai 674c1e858b Merge pull request #22 from mob-sakai/hotfix
Release 1.4.3
2018-01-15 09:11:39 +09:00
Takashi Sakai 67c35affec Release 1.4.3 2018-01-15 08:56:58 +09:00
Takashi Sakai 7fe0b44e56 Fixed: Color effect is incorrect. #19 2018-01-15 08:56:25 +09:00
Takashi Sakai 0c2a515abc Export 1.4.2 2018-01-15 01:39:03 +09:00
Takashi Sakai 2c7df2a749 Fixed: Error has occur on after deserialize. 2018-01-15 01:34:20 +09:00
Takashi Sakai cc02d8945b Export 1.4.1 2018-01-10 12:11:46 +09:00
Takashi Sakai 866cf34048 Fixed: Demo link is broken. 2018-01-10 12:11:34 +09:00
Takashi Sakai c5836f81f5 Export 1.4.0 2018-01-07 21:44:07 +09:00
Takashi Sakai d9fc2be699 Demo: Update scene 2018-01-07 12:04:27 +09:00
Takashi Sakai ed3f43e8e8 Add: Add many materials for shader variant, but exclude unused materials from build. 2018-01-07 12:04:19 +09:00
Takashi Sakai 8179346170 Feature: Exclude unused shader variant from build. 2018-01-07 12:04:11 +09:00
酒井峰志 c391278a2e Export 1.3.0 2018-01-06 22:47:59 +09:00
Takashi Sakai 9ec1982a71 Demo: Add transition blur button & dialog with captured image. 2018-01-06 22:47:59 +09:00
Takashi Sakai 81a99d491d Refactoring: Shader refactoring. 2018-01-06 10:33:56 +09:00
Takashi Sakai 93e9c5aa51 Feature: Capture image with effect, like post effect. 2018-01-06 10:33:55 +09:00
Takashi Sakai ccd6637a27 Export 1.2.0 2018-01-05 13:51:24 +09:00
Takashi Sakai 5f5257cc5c Add: License file is included in package. 2018-01-05 13:23:19 +09:00
Takashi Sakai 1a7cf1090a Demo: Add transition button & multiple shadows. 2018-01-04 23:54:19 +09:00
Takashi Sakai 7e220e0159 Changed: Blur range is [0-2]. 2018-01-04 23:54:18 +09:00
Takashi Sakai 35a8c65e8b Refactoring: Shader refactoring. 2018-01-04 23:54:16 +09:00
Takashi Sakai ba819d8ba8 Feature: Fix button to enable TexCoord1 of Canvas.additionalShaderChannels to use UIEffect. 2018-01-04 23:51:26 +09:00
Takashi Sakai 6eb94706e3 Changed : UIEffect.color is obsolete, use UIEffect.effectColor instead. 2018-01-04 16:18:18 +09:00
Takashi Sakai cdb04036f5 Feature: Supports multiple shadow effect for reduce rendering vertices. 2018-01-04 16:18:16 +09:00
Takashi Sakai 25d8d4c1b1 Fixed: Cutoff alpha is incorrect. 2018-01-04 14:59:15 +09:00
Takashi Sakai 107c348fe2 Feature: New blur effect mode : Medium. 2018-01-04 14:59:08 +09:00
Takashi Sakai c9ab0e70dc Fixed : Pixelaration shifts to the lower right. 2018-01-04 14:57:52 +09:00
Takashi Sakai fc75ab1b3e Add unitypackage 2017-08-17 15:33:40 +09:00
Takashi Sakai 25e12d470c BuildSettings for UnityCloudBuild 2017-08-17 15:32:21 +09:00
Takashi Sakai 40eaf05041 Change root Readme.md to symbolic link. 2017-08-17 15:32:21 +09:00
Takashi Sakai cfa3a10e3d Update Readme 2017-08-17 15:32:20 +09:00
Takashi Sakai dc20b8ca91 Update demo 2017-08-17 12:33:45 +09:00
Takashi Sakai 08c2600d2f Add Effects(Pixelation, Mono, Cutoff) 2017-08-17 12:32:30 +09:00
Takashi Sakai ac4f4d6a0d Automatically export package 2017-08-17 12:30:22 +09:00
Takashi Sakai ea3bc4c563 Update ProjectSettings 2017-08-17 12:29:15 +09:00
Takashi Sakai 046ec7aadc Update README for performance test 2017-03-01 15:46:37 +09:00
Takashi Sakai c9e2328e43 ver 1.0.0 2017-02-28 14:48:22 +09:00
酒井 峰志 a9c4ec4e72 Initial commit 2017-02-27 22:49:29 +09:00
568 changed files with 108540 additions and 102677 deletions
-212
View File
@@ -1,212 +0,0 @@
root = true
[*.json]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
[*.asmdef]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
# C# files
[*.cs]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
csharp_style_namespace_declarations = block_scoped
csharp_style_implicit_object_creation_when_type_is_apparent = false
resharper_object_creation_when_type_evident = explicitly_typed
# Keep
csharp_keep_existing_attribute_arrangement = true
csharp_keep_existing_embedded_arrangement = true
csharp_keep_user_linebreaks = true
csharp_keep_existing_linebreaks = true
csharp_place_simple_embedded_statement_on_same_line = false
csharp_place_simple_blocks_on_single_line = false
csharp_keep_existing_initializer_arrangement = true
csharp_keep_existing_arrangement = true
# Standard properties
end_of_line = lf
insert_final_newline = true
# Brace preferences
csharp_brace_style = next_line
csharp_braces_for_ifelse = required_for_multiline_statement
csharp_braces_for_for = required
csharp_braces_for_foreach = required
csharp_braces_for_while = required
csharp_braces_for_dowhile = required
csharp_braces_for_using = required
csharp_case_block_braces = next_line
csharp_initializer_braces = next_line
# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current
# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
# avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
# Types: use keywords instead of BCL types, and permit var only when the type is clear
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:none
csharp_style_var_elsewhere = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
#
resharper_keep_existing_embedded_arrangement = true
# Arguments
csharp_arguments_literal = named:suggestion
csharp_arguments_string_literal = named:suggestion
# Naming: public and protected fields -> camelCase
dotnet_naming_rule.protected_public_fields.severity = suggestion
dotnet_naming_rule.protected_public_fields.symbols = protected_public_fields
dotnet_naming_rule.protected_public_fields.style = camel_case
dotnet_naming_symbols.protected_public_fields.applicable_kinds = field, event
dotnet_naming_symbols.protected_public_fields.applicable_accessibilities = public, protected
dotnet_naming_style.camel_case.capitalization = camel_case
# Naming: properties -> camelCase
dotnet_naming_rule.properties.severity = suggestion
dotnet_naming_rule.properties.symbols = properties
dotnet_naming_rule.properties.style = camel_case
dotnet_naming_symbols.properties.applicable_kinds = property
# Naming: constant fields -> k_PascalCase
dotnet_naming_rule.constant_fields.severity = suggestion
dotnet_naming_rule.constant_fields.symbols = constant_fields
dotnet_naming_rule.constant_fields.style = k_pascal_case
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_style.k_pascal_case.required_prefix = k_
dotnet_naming_style.k_pascal_case.capitalization = pascal_case
# Naming: static fields -> s_PascalCase
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
dotnet_naming_rule.static_fields_should_have_prefix.style = s_pascal_case
dotnet_naming_symbols.static_fields.applicable_kinds = field, property
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
dotnet_naming_style.s_pascal_case.required_prefix = s_
dotnet_naming_style.s_pascal_case.capitalization = pascal_case
# Naming: internal and private fields -> _camelCase
dotnet_naming_rule.private_internal_fields.severity = suggestion
dotnet_naming_rule.private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.private_internal_fields.style = _camel_case
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_style._camel_case.required_prefix = _
dotnet_naming_style._camel_case.capitalization = camel_case
# Code style defaults
dotnet_sort_system_directives_first = true
csharp_preserve_single_line_statements = false
csharp_prefer_static_local_function = true:suggestion
csharp_prefer_simple_using_statement = false:none
csharp_style_prefer_switch_expression = true:suggestion
dotnet_style_readonly_field = true:suggestion
# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
csharp_prefer_simple_default_expression = true:suggestion
# Expression-bodied members
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
csharp_style_expression_bodied_methods = false:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_operators = false:suggestion
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
csharp_style_expression_bodied_indexers = false:suggestion
csharp_style_expression_bodied_lambdas = when_on_single_line:silent
csharp_style_expression_bodied_local_functions = false:suggestion
# Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
# Null checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Other features
csharp_style_prefer_index_operator = false:none
csharp_style_prefer_range_operator = false:none
csharp_style_pattern_local_over_anonymous_function = false:none
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# ReSharper inspection severities
resharper_check_namespace_highlighting = none
resharper_for_can_be_converted_to_foreach_highlighting = none
resharper_xmldoc_indent_text = ZeroIndent
-6
View File
@@ -1,6 +0,0 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.
# https://docs.github.com/ja/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
# Default owners
* @mob-sakai
+3 -3
View File
@@ -1,7 +1,7 @@
# These are supported funding model platforms
github: mob-sakai # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: mob_sakai # Replace with a single Patreon username
github: # [mob-sakai]
patreon: mob_sakai
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
custom: # Replace with a single custom sponsorship URL
+3 -15
View File
@@ -1,14 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: mob-sakai
---
NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
**Describe the bug**
A clear and concise description of what the bug is.
@@ -19,17 +14,10 @@ Steps to reproduce the behavior:
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment (please complete the following information):**
- Version [e.g. 1.0.0]
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
- Unity version: [e.g. 2018.2.8f1]
- Build options: [e.g. IL2CPP, .Net 4.x, LWRP]
- Unity: [e.g. 2018.2.8f1]
- UIEffect: [e.g. v3.0.0]
**Additional context**
Add any other context about the problem here.
Add any other context, screenshots or gif animations about the bug here.
+1 -6
View File
@@ -1,14 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: mob-sakai
---
NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
@@ -19,4 +14,4 @@ A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context, screenshots or gif animations about the feature request here.
+8 -8
View File
@@ -1,16 +1,16 @@
---
name: Question
about: Ask a question about this project
title: ''
labels: question
assignees: mob-sakai
about: Feel free to ask us any question.
---
NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
**Describe the question**
A clear and concise description of what the question is.
**Describe what help do you need**
A description of the question.
**Environment (please complete the following information):**
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
- Unity: [e.g. 2018.2.8f1]
- UIEffect: [e.g. v3.0.0]
**Additional context**
Add any other context or screenshots about the question here.
Add any other context, screenshots or gif animations about the question here.
-37
View File
@@ -1,37 +0,0 @@
# Pull Request Template
## Description
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context.
- List any dependencies that are required for this change.
Fixes #{issue_number}
## Type of change
Please write the commit message in the format corresponding to the change type.
Please see [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for more information.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Update documentations
- [ ] Others (refactoring, style changes, etc.)
## Test environment
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
- Unity version: [e.g. 2022.2.0f1]
- Build options: [e.g. IL2CPP, .Net 4.x, URP/HDRP]
## Checklist
- [ ] This pull request is for merging into the `develop` branch
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have checked my code and corrected any misspellings
-28
View File
@@ -1,28 +0,0 @@
name: 🚀 Deploy with Zip
on:
workflow_dispatch:
inputs:
zip:
description: "The url to the zip file"
required: true
jobs:
deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: 📦 Download zip file To '_site'
run: |
curl -L ${{ github.event.inputs.zip }} -o _site.zip
unzip _site.zip -d _site
find _site -name __MACOSX | xargs rm -rf
- name: 📦 Upload '_site'
uses: actions/upload-pages-artifact@v3
- name: 🚀 Deploy To GitHub Pages
uses: actions/deploy-pages@v4
-44
View File
@@ -1,44 +0,0 @@
name: 🔖 Release
run-name: 🔖 Release (${{ github.ref_name }})
on:
workflow_dispatch:
push:
branches:
- preview
- main
- v*.x
tags-ignore:
- "**"
jobs:
release:
name: 🔖 Release (${{ github.ref_name }})
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
outputs:
channel: ${{ steps.release.outputs.new_release_channel }}
released: ${{ steps.release.outputs.new_release_published }}
tag: ${{ steps.release.outputs.new_release_git_tag }}
steps:
- name: 🚚 Checkout (${{ github.ref_name }})
uses: actions/checkout@v4
- name: 🔖 Run semantic release
uses: cycjimmy/semantic-release-action@v4
id: release
with:
working_directory: Packages/src
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- run: |
echo "🔖 New release published: '${{ steps.release.outputs.new_release_published }}'" | tee -a $GITHUB_STEP_SUMMARY
echo "🔖 New release channel: '${{ steps.release.outputs.new_release_channel }}'" | tee -a $GITHUB_STEP_SUMMARY
echo "🔖 New release git tag: '${{ steps.release.outputs.new_release_git_tag }}'" | tee -a $GITHUB_STEP_SUMMARY
-124
View File
@@ -1,124 +0,0 @@
# Required secrets
# UNITY_LICENSE: The contents of Unity license file
# UNITY_EMAIL: Unity user email to login
# UNITY_PASSWORD: Unity user password to login
name: 🧪 Test
run-name: 🧪 Test (${{ github.event.pull_request.title || github.ref_name }})
env:
# MINIMUM_VERSION: The minimum version of Unity.
MINIMUM_VERSION: 2020.3
# EXCLUDE_FILTER: The excluded versions of Unity.
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.3)"
on:
workflow_dispatch:
inputs:
usePeriodVersions:
description: "Use the period versions (.0f1, .10f1, 20f1, ...)."
required: false
default: "true"
push:
branches:
- develop
- "develop-*"
tags:
- "!*"
paths-ignore:
- "**.md"
pull_request_target:
types:
- opened
- reopened
- synchronize
paths-ignore:
- "**.md"
jobs:
setup:
name: ⚙️ Setup
runs-on: ubuntu-latest
outputs:
unityVersions: ${{ steps.setup.outputs.unityVersions }}
steps:
- name: ⚙️ Find target Unity versions
id: setup
run: |
echo "==== Target Unity Versions ===="
LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
else
ADDITIONAL_VERSIONS=[]
fi
VERSIONS=`echo "[${LATEST_VERSIONS}, ${ADDITIONAL_VERSIONS}]" \
| jq -c '[ flatten | sort | unique | .[] | select( test("${{ env.EXCLUDE_FILTER }}") | not ) ]'`
echo "unityVersions=${VERSIONS}" | tee $GITHUB_OUTPUT
test:
name: 🧪 Run tests
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
needs: setup
strategy:
fail-fast: false
max-parallel: 6
matrix:
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
steps:
- name: 🚚 Checkout ($${{ github.ref }})
if: github.event_name == 'push'
uses: actions/checkout@v4
- name: 🚚 Checkout pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: 🚚 Marge pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git merge origin/${{ github.event.pull_request.base.ref }} --no-edit
- name: 📥 Cache library
uses: actions/cache@v4
with:
path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
restore-keys: |
Library-${{ matrix.unityVersion }}-
Library-
- name: 🛠️ Build Unity Project (Test)
uses: game-ci/unity-builder@v4
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
targetPlatform: StandaloneLinux64
allowDirtyBuild: true
customParameters: -nographics
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
- name: 🧪 Run tests
uses: game-ci/unity-test-runner@v4
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
# unityVersion: ${{ matrix.unityVersion }}
customParameters: -nographics
checkName: ${{ matrix.unityVersion }} Test Results
githubToken: ${{ github.token }}
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
+3
View File
@@ -0,0 +1,3 @@
issues-wo-labels=false
pr-wo-labels=false
exclude_labels=duplicate,question,invalid,wontfix,Duplicate,Question,Invalid,Wontfix,Meta: Exclude From Changelog
+40 -24
View File
@@ -1,29 +1,45 @@
# Windows
Thumbs.db
Desktop.ini
/*.csproj
/*.sln
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
# macOS
.DS_Store
# Autogenerated VS/MD solution and project files
ExportedObj/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
# Vim
*.swp
# Unity
/Logs
/Library
/Temp
Assets/Plugins.meta
Assets/Plugins/
# Unity3D generated meta files
*.pidb.meta
# Unity3D Generated File On Crash Reports
sysinfo.txt
# Mac
*.DS_Store
# Builds
*.apk
# Packages
build.app
unity.log
# VS
.vs/
.vscode/
.idea/
obj/
bin/
UserSettings/
*.app/
Build/
Assets/TextMeshPro Support*
_Android/
_iOS/
_WebGL/
_Standalone/
Assets/TextMesh Pro.meta
Assets/TextMesh Pro
+2 -2
View File
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 731f1baa9d144a9897cb1d341c2092b8
guid: b3793e133930146e397ceaa2825b0e59
folderAsset: yes
timeCreated: 1442040525
timeCreated: 1527743850
licenseType: Pro
DefaultImporter:
userData:
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 512a49d95c0c4332bdd98131869c23c9
guid: ec120f87945eb495c9eaed9dddf97997
folderAsset: yes
timeCreated: 1441876896
timeCreated: 1527743870
licenseType: Pro
DefaultImporter:
userData:
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 4aecb92fff08436c8303b10eab8da368
guid: 96837540e9d9b4d199c332f11ef9047a
folderAsset: yes
timeCreated: 1441876950
timeCreated: 1487124681
licenseType: Pro
DefaultImporter:
userData:
@@ -0,0 +1,498 @@
# Changelog
## [v3.2.0](https://github.com/mob-sakai/UIEffect/tree/v3.2.0) (2019-07-17)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.1.0...v3.2.0)
**Breaking changes:**
- UICapturedImage: Immediate capturing option is removed as it does not work on many platforms [\#161](https://github.com/mob-sakai/UIEffect/issues/161)
**Implemented enhancements:**
- Add demo for Unity 2018+ and TMPro 1.2+ [\#166](https://github.com/mob-sakai/UIEffect/issues/166)
**Fixed bugs:**
- UIDissolve's "Reverse Play" option works only in OnEnable [\#183](https://github.com/mob-sakai/UIEffect/issues/183)
- CanvasGroup.alpha does not affect [\#180](https://github.com/mob-sakai/UIEffect/issues/180)
- UIShiny effect remain on screen after calling Stop\(\) [\#165](https://github.com/mob-sakai/UIEffect/issues/165)
- Material caching is not working properly [\#163](https://github.com/mob-sakai/UIEffect/issues/163)
- Add a null check to TMPro sprite asset material checking [\#176](https://github.com/mob-sakai/UIEffect/pull/176) ([Oskiii](https://github.com/Oskiii))
## [v3.1.0](https://github.com/mob-sakai/UIEffect/tree/v3.1.0) (2019-03-10)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.4...v3.1.0)
## Support TextMeshPro!
* All components are supported
* Advanced blur is supported for Unity 2017.1+
![](https://user-images.githubusercontent.com/12690315/53533025-8495d800-3b3c-11e9-9e94-320f3ec7ad74.png)
For details to use, see [Usage with TextMeshPro](https://github.com/mob-sakai/UIEffect#usage-with-textmeshpro)
**NOTE: Unity 5.x will not be supported in the near future**
**Implemented enhancements:**
- Support TextMeshPro [\#137](https://github.com/mob-sakai/UIEffect/issues/137)
- add reverse animation option to UIDissolve [\#153](https://github.com/mob-sakai/UIEffect/pull/153) ([antpaw](https://github.com/antpaw))
## [v3.0.4](https://github.com/mob-sakai/UIEffect/tree/v3.0.4) (2019-02-15)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.3...v3.0.4)
**Implemented enhancements:**
- add initial play animation delay option to UIShiny [\#147](https://github.com/mob-sakai/UIEffect/pull/147) ([antpaw](https://github.com/antpaw))
**Fixed bugs:**
- UIEffectCapturedImage.effectColor does not work as expected [\#148](https://github.com/mob-sakai/UIEffect/issues/148)
- fix warnings [\#146](https://github.com/mob-sakai/UIEffect/pull/146) ([antpaw](https://github.com/antpaw))
## [v3.0.3](https://github.com/mob-sakai/UIEffect/tree/v3.0.3) (2019-01-21)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.2...v3.0.3)
**Fixed bugs:**
- UIHsvModifier works only on gamma-space [\#145](https://github.com/mob-sakai/UIEffect/issues/145)
## [v3.0.2](https://github.com/mob-sakai/UIEffect/tree/v3.0.2) (2019-01-15)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.1...v3.0.2)
**Fixed bugs:**
- UIEffect & UIHsvModifier & UITransitionEffect Strange action [\#144](https://github.com/mob-sakai/UIEffect/issues/144)
## [v3.0.1](https://github.com/mob-sakai/UIEffect/tree/v3.0.1) (2018-11-07)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v3.0.0...v3.0.1)
**Fixed bugs:**
- Compile error in 2018.3 [\#139](https://github.com/mob-sakai/UIEffect/issues/139)
## [v3.0.0](https://github.com/mob-sakai/UIEffect/tree/v3.0.0) (2018-10-09)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.3...v3.0.0)
### New architecture: easier, faster and more beautiful.
* Simple & easy-to-use
* 20% faster
* High precision parameter
### Immediate capturing (UIEffectCapturedImage option)
* Capture the previous frame immediately without any camera.
* You no longer have to wait one frame to capture!
* *NOTE: LWRP, WebGL and Unity 5.x for iOS/Mac are not supported.*
### Advanced blur (UIEffect option)
* Remove common artifacts in the blur effect for uGUI.
![](https://user-images.githubusercontent.com/12690315/42547121-80134788-84fb-11e8-97a0-048bba9634ea.png)
* It is effective for small padding size atlases, including dynamic fonts!
**Breaking changes:**
- UIEffectCapturedImage: Remove 'TargetTexture' feature [\#136](https://github.com/mob-sakai/UIEffect/issues/136)
- Remove 'additional shadow' in UIShadow component [\#110](https://github.com/mob-sakai/UIEffect/issues/110)
- Remove 'custom effect' feature in UIEffect component [\#98](https://github.com/mob-sakai/UIEffect/issues/98)
- Remove 'shadow effect' feature in UIEffect component [\#97](https://github.com/mob-sakai/UIEffect/issues/97)
- Remove 'hue effect' in UIEffect component [\#91](https://github.com/mob-sakai/UIEffect/issues/91)
- Remove 'cutoff' and 'mono' effect in UIEffect component [\#78](https://github.com/mob-sakai/UIEffect/issues/78)
- New architecture: Shared texture for effect parameter [\#63](https://github.com/mob-sakai/UIEffect/issues/63)
- Change: Change `ToneMode` to `EffectMode` [\#61](https://github.com/mob-sakai/UIEffect/issues/61)
- Separate shadow effect to other component [\#52](https://github.com/mob-sakai/UIEffect/issues/52)
- Use the graphic color as effect color, to reduce parameters [\#50](https://github.com/mob-sakai/UIEffect/issues/50)
**Implemented enhancements:**
- UITransitionEffect: "Pass ray on hidden" option [\#135](https://github.com/mob-sakai/UIEffect/issues/135)
- Add component menu in editor [\#133](https://github.com/mob-sakai/UIEffect/issues/133)
- UITransitionEffect: Add Show/Hide method [\#132](https://github.com/mob-sakai/UIEffect/issues/132)
- UIEffectCapturedImage: Immediate capturing [\#130](https://github.com/mob-sakai/UIEffect/issues/130)
- Improve blurring for atlas [\#95](https://github.com/mob-sakai/UIEffect/issues/95)
- Use Canvas.willRenderCanvases event instead of Update method [\#87](https://github.com/mob-sakai/UIEffect/issues/87)
**Closed issues:**
- Add tooltip [\#92](https://github.com/mob-sakai/UIEffect/issues/92)
- UIShiny: change parameter name `highlight` to `gloss` [\#93](https://github.com/mob-sakai/UIEffect/issues/93)
## [v2.8.3](https://github.com/mob-sakai/UIEffect/tree/v2.8.3) (2018-09-29)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.2...v2.8.3)
**Fixed bugs:**
- UIEffectCapturedImage: Black screen with Unity 2018.1+ editor on Windows [\#131](https://github.com/mob-sakai/UIEffect/issues/131)
## [v2.8.2](https://github.com/mob-sakai/UIEffect/tree/v2.8.2) (2018-09-26)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.1...v2.8.2)
**Fixed bugs:**
- UICapturedEffectImage does not work with 'ScreenSpace - Overlay' in edit mode [\#128](https://github.com/mob-sakai/UIEffect/issues/128)
- The UIEffectCapturedImage is upside down with 'ScreenSpace - Overlay' mode [\#127](https://github.com/mob-sakai/UIEffect/issues/127)
- When "UI-Effect.mat" is created automatically, Unity hangs up. [\#126](https://github.com/mob-sakai/UIEffect/issues/126)
- UICapturedEffectImage does not work with Lightweight Render Pipeline LWRP [\#125](https://github.com/mob-sakai/UIEffect/issues/125)
## [v2.8.1](https://github.com/mob-sakai/UIEffect/tree/v2.8.1) (2018-08-17)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.8.0...v2.8.1)
**Fixed bugs:**
- \(Demo\) "Transition capture & dissolve" is incorrect [\#119](https://github.com/mob-sakai/UIEffect/issues/119)
## [v2.8.0](https://github.com/mob-sakai/UIEffect/tree/v2.8.0) (2018-08-14)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.7.1...v2.8.0)
* Create a screen transition!
![8 -08-2018 19-29-38](https://user-images.githubusercontent.com/12690315/43832265-dbdecc98-9b41-11e8-8ab5-9f49420a6a16.gif)
* Some updates make UIEffectCapturedImage easier to use!
**Implemented enhancements:**
- UIEffectCapturedImage: Supports 'ScreenSpace - Overlay' [\#115](https://github.com/mob-sakai/UIEffect/issues/115)
- UIEffectCapturedImage: Keep aspect ratio [\#114](https://github.com/mob-sakai/UIEffect/issues/114)
- UIEffectCapturedImage: 'Capture on enable' option [\#113](https://github.com/mob-sakai/UIEffect/issues/113)
- UITransitionEffect: Change transition texture [\#111](https://github.com/mob-sakai/UIEffect/issues/111)
**Closed issues:**
- UIEffectCapturedImage: change parameter name `keepCanvasSize` to `fitToScreen` [\#116](https://github.com/mob-sakai/UIEffect/issues/116)
## [v2.7.1](https://github.com/mob-sakai/UIEffect/tree/v2.7.1) (2018-08-06)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.7.0...v2.7.1)
**Fixed bugs:**
- In v2.7.0, UIEffectCapturedImage is flipped vertically on Windows [\#112](https://github.com/mob-sakai/UIEffect/issues/112)
## [v2.7.0](https://github.com/mob-sakai/UIEffect/tree/v2.7.0) (2018-07-26)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.6.2...v2.7.0)
UIHsvModifier: Modify hue, saturation, and value as you like!
![](https://user-images.githubusercontent.com/12690315/43200006-d6e2bf54-904e-11e8-9f22-0c0f9ce5912f.gif)
* Note: `Hue` mode in UIEffect component will be obsolete in the near future. Please use UIHsvModifier component instead.
* Note: `Cutoff` and `Mono` mode in UIEffect component will be obsolete in the near future. Please use UITransitionEffect component instead.
**Implemented enhancements:**
- UIEffectCapturedImage: Support target RenderTexture to use external component [\#108](https://github.com/mob-sakai/UIEffect/issues/108)
- Transition effect as other component [\#105](https://github.com/mob-sakai/UIEffect/issues/105)
- Use multi-pass blurring to capture screenshot [\#96](https://github.com/mob-sakai/UIEffect/issues/96)
- Feature: HSV modifier [\#44](https://github.com/mob-sakai/UIEffect/issues/44)
**Fixed bugs:**
- UIEffectCapturedImage: ColorMode is not working [\#109](https://github.com/mob-sakai/UIEffect/issues/109)
- UIDissolve is not maskable [\#101](https://github.com/mob-sakai/UIEffect/issues/101)
## [v2.6.2](https://github.com/mob-sakai/UIEffect/tree/v2.6.2) (2018-07-18)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.6.1...v2.6.2)
**Fixed bugs:**
- Shader has compile errors in D3D9 or D3D11\_9X\(WSA\) [\#99](https://github.com/mob-sakai/UIEffect/issues/99)
## [v2.6.1](https://github.com/mob-sakai/UIEffect/tree/v2.6.1) (2018-06-14)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.6.0...v2.6.1)
**Fixed bugs:**
- Errors occurred on build \(v2.6.0\) [\#90](https://github.com/mob-sakai/UIEffect/issues/90)
## [v2.6.0](https://github.com/mob-sakai/UIEffect/tree/v2.6.0) (2018-06-14)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.5.2...v2.6.0)
Blurring effect has been improved about 6 times faster!
![](https://user-images.githubusercontent.com/12690315/41393724-08420b1e-6fe2-11e8-8741-721789c2d029.png)
You can change noise texture for dissolve effect from inspector or script!
![](https://user-images.githubusercontent.com/12690315/41397570-99bda636-6fef-11e8-827b-932d7a8e74c1.gif)
**Implemented enhancements:**
- Improve blurring performance [\#88](https://github.com/mob-sakai/UIEffect/issues/88)
- Separate the effect with a character [\#86](https://github.com/mob-sakai/UIEffect/issues/86)
- Change dissolve texture [\#75](https://github.com/mob-sakai/UIEffect/issues/75)
**Closed issues:**
- Change BlurMode correctly [\#84](https://github.com/mob-sakai/UIEffect/issues/84)
- Refactoring to prepare v3.0.0 [\#83](https://github.com/mob-sakai/UIEffect/issues/83)
- Change ColorMode correctly [\#51](https://github.com/mob-sakai/UIEffect/issues/51)
## [v2.5.2](https://github.com/mob-sakai/UIEffect/tree/v2.5.2) (2018-06-07)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.5.1...v2.5.2)
**Fixed bugs:**
- When `UIEFFECT\_SEPARATE` symbol is defined, UIDissolve does not work well [\#85](https://github.com/mob-sakai/UIEffect/issues/85)
## [v2.5.1](https://github.com/mob-sakai/UIEffect/tree/v2.5.1) (2018-05-31)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.5.0...v2.5.1)
**Fixed bugs:**
- Fix demo [\#82](https://github.com/mob-sakai/UIEffect/issues/82)
## [v2.5.0](https://github.com/mob-sakai/UIEffect/tree/v2.5.0) (2018-05-31)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.4.1...v2.5.0)
Shiny effect has been update!
![v2.5.0](https://user-images.githubusercontent.com/12690315/40654533-8877c99c-6379-11e8-8ae7-b91995fc230b.gif)
* NOTE: `UIEffect.shadow***` will be obsolete in the near future. Please use `UIShadow` component instead.
* NOTE: `UIEffect.custom***` will be obsolete in the near future. Please use `UICustomEffect` component (experimental) instead.
**Implemented enhancements:**
- UIDissolve: Play effect from script/inspector [\#81](https://github.com/mob-sakai/UIEffect/issues/81)
- UIShiny: Play effect from script/inspector [\#80](https://github.com/mob-sakai/UIEffect/issues/80)
- During play mode, you can change the effect type, color type, and blur type \(in Editor\) [\#73](https://github.com/mob-sakai/UIEffect/issues/73)
- Add shadow effect as other component [\#72](https://github.com/mob-sakai/UIEffect/issues/72)
- UIShiny : Visual update [\#68](https://github.com/mob-sakai/UIEffect/issues/68)
- Add Custom effect as other component [\#60](https://github.com/mob-sakai/UIEffect/issues/60)
**Fixed bugs:**
- UIDissolve: When width=1 and location=0, image is lacked [\#79](https://github.com/mob-sakai/UIEffect/issues/79)
**Closed issues:**
- UIEffect inherit UIEffectBase [\#74](https://github.com/mob-sakai/UIEffect/issues/74)
- Change directory structure [\#56](https://github.com/mob-sakai/UIEffect/issues/56)
## [v2.4.1](https://github.com/mob-sakai/UIEffect/tree/v2.4.1) (2018-05-29)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.4.0...v2.4.1)
**Fixed bugs:**
- UIEffectCapturedImage: The result image is flipped vertically [\#69](https://github.com/mob-sakai/UIEffect/issues/69)
## [v2.4.0](https://github.com/mob-sakai/UIEffect/tree/v2.4.0) (2018-05-21)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.3.2...v2.4.0)
UIDissolve has been updated!
![v2.4.0](https://user-images.githubusercontent.com/12690315/40294019-a0bfb8aa-5d0e-11e8-8451-873502db6a99.gif)
![editor](https://user-images.githubusercontent.com/12690315/40294212-9e1b1ce2-5d0f-11e8-88ce-78a8c0523dc2.png)
**Implemented enhancements:**
- UIDissolve: Add color mode option. [\#64](https://github.com/mob-sakai/UIEffect/issues/64)
## [v2.3.2](https://github.com/mob-sakai/UIEffect/tree/v2.3.2) (2018-05-21)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.3.1...v2.3.2)
**Closed issues:**
- Fixed: UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically \(other method\) [\#65](https://github.com/mob-sakai/UIEffect/issues/65)
## [v2.3.1](https://github.com/mob-sakai/UIEffect/tree/v2.3.1) (2018-05-10)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.3.0...v2.3.1)
**Fixed bugs:**
- UIEffectCapturedImage: When iteration count is even. the result image is flipped vertically \(on Windows\) [\#62](https://github.com/mob-sakai/UIEffect/issues/62)
## [v2.3.0](https://github.com/mob-sakai/UIEffect/tree/v2.3.0) (2018-05-08)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.2.0...v2.3.0)
New components has been available!
* **UIShiny** : Shiny effect WITHOUT Mask component. This will suppress extra draw calls and improve performance.
* **UIDissolve** : Dissolve effect WITHOUT material instancing. This will suppress extra draw calls and improve performance.
* **UIFlip** : Flip graphic horizontal/vertical.
![v2.3.0](https://user-images.githubusercontent.com/12690315/40706142-cb98d2d0-6427-11e8-96fc-5cc5fd9c553a.gif)
**Implemented enhancements:**
- Feature: Flip horizontal/vertical [\#47](https://github.com/mob-sakai/UIEffect/issues/47)
- Feature: Dissolve [\#45](https://github.com/mob-sakai/UIEffect/issues/45)
- Feature: Shining effect [\#9](https://github.com/mob-sakai/UIEffect/issues/9)
## [v2.2.0](https://github.com/mob-sakai/UIEffect/tree/v2.2.0) (2018-04-12)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.1.0...v2.2.0)
**Implemented enhancements:**
- Feature: Customize shader/material. You can create a custom ui shader and control it with UIEffct. [\#46](https://github.com/mob-sakai/UIEffect/issues/46)
- Feature: UIEffectCapturedImage supports keep canvas size. [\#54](https://github.com/mob-sakai/UIEffect/issues/54)
- Feature: UIEffectCapturedImage supports `Quality Type` to easy setup. [\#53](https://github.com/mob-sakai/UIEffect/issues/53)
**Fixed bugs:**
- Bug: Color effect on shadow is incorrect. [\#55](https://github.com/mob-sakai/UIEffect/issues/55)
**Closed issues:**
- Change: Reduce the pixelation effect when tone level = 1. [\#57](https://github.com/mob-sakai/UIEffect/issues/57)
## [v2.1.0](https://github.com/mob-sakai/UIEffect/tree/v2.1.0) (2018-04-04)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v2.0.0...v2.1.0)
**Implemented enhancements:**
- Feature: UIEffectCapturedImage support iterative operation [\#48](https://github.com/mob-sakai/UIEffect/issues/48)
## [v2.0.0](https://github.com/mob-sakai/UIEffect/tree/v2.0.0) (2018-01-25)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.6.1...v2.0.0)
**Breaking changes:**
- Important: Unity 5.3.x & 5.4.x are no longer supported. [\#40](https://github.com/mob-sakai/UIEffect/issues/40)
**Implemented enhancements:**
- Improve: Reduce the materials. Too many effect materials are exist. [\#15](https://github.com/mob-sakai/UIEffect/issues/15)
**Closed issues:**
- Change: Change namespace to Coffee.UIExtensions [\#6](https://github.com/mob-sakai/UIEffect/issues/6)
## [v1.6.1](https://github.com/mob-sakai/UIEffect/tree/v1.6.1) (2018-01-25)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.6.0...v1.6.1)
**Fixed bugs:**
- Bug: Cannot access protected member `UnityEngine.UI.BaseMeshEffect.graphic` [\#41](https://github.com/mob-sakai/UIEffect/issues/41)
## [v1.6.0](https://github.com/mob-sakai/UIEffect/tree/v1.6.0) (2018-01-18)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.5.1...v1.6.0)
**Fixed bugs:**
- Bug: Pixelization is incorrect. [\#34](https://github.com/mob-sakai/UIEffect/issues/34)
**Closed issues:**
- Change: UIEffect inherit BaseMeshEffect. [\#35](https://github.com/mob-sakai/UIEffect/issues/35)
- Change: Blur level range to \[0-1\] [\#32](https://github.com/mob-sakai/UIEffect/issues/32)
- Change: ShadowMode -\> ShadowStyle [\#18](https://github.com/mob-sakai/UIEffect/issues/18)
## [v1.5.1](https://github.com/mob-sakai/UIEffect/tree/v1.5.1) (2018-01-18)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.5.0...v1.5.1)
**Fixed bugs:**
- Bug: An error occurs when no effect is specified for UICapturedImage. [\#36](https://github.com/mob-sakai/UIEffect/issues/36)
## [v1.5.0](https://github.com/mob-sakai/UIEffect/tree/v1.5.0) (2018-01-16)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.4...v1.5.0)
**Implemented enhancements:**
- Feature: ShadowMode 'Shadow 3' [\#11](https://github.com/mob-sakai/UIEffect/issues/11)
- Feature: Hue [\#8](https://github.com/mob-sakai/UIEffect/issues/8)
- Feature: Gradient [\#7](https://github.com/mob-sakai/UIEffect/issues/7)
## [v1.4.4](https://github.com/mob-sakai/UIEffect/tree/v1.4.4) (2018-01-16)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.3...v1.4.4)
**Fixed bugs:**
- Bug: Error has occur on edit prefab. [\#27](https://github.com/mob-sakai/UIEffect/issues/27)
## [v1.4.3](https://github.com/mob-sakai/UIEffect/tree/v1.4.3) (2018-01-15)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.2...v1.4.3)
**Fixed bugs:**
- Bug: Color effect is incorrect. [\#19](https://github.com/mob-sakai/UIEffect/issues/19)
## [v1.4.2](https://github.com/mob-sakai/UIEffect/tree/v1.4.2) (2018-01-14)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.1...v1.4.2)
**Implemented enhancements:**
- Feature: ColorMode `Override` [\#12](https://github.com/mob-sakai/UIEffect/issues/12)
**Fixed bugs:**
- Bug: Error has occur OnAfterDeserialize in editor. [\#16](https://github.com/mob-sakai/UIEffect/issues/16)
## [v1.4.1](https://github.com/mob-sakai/UIEffect/tree/v1.4.1) (2018-01-10)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.4.0...v1.4.1)
## [v1.4.0](https://github.com/mob-sakai/UIEffect/tree/v1.4.0) (2018-01-07)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.3.0...v1.4.0)
**Implemented enhancements:**
- Feature: Exclude unused shader variants from build. [\#5](https://github.com/mob-sakai/UIEffect/issues/5)
## [v1.3.0](https://github.com/mob-sakai/UIEffect/tree/v1.3.0) (2018-01-06)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.2.0...v1.3.0)
## [v1.2.0](https://github.com/mob-sakai/UIEffect/tree/v1.2.0) (2018-01-05)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.1.0...v1.2.0)
**Implemented enhancements:**
- Feature: Fast multiple shadow effect. [\#2](https://github.com/mob-sakai/UIEffect/issues/2)
**Fixed bugs:**
- Pixelaration shifts to the lower right. [\#4](https://github.com/mob-sakai/UIEffect/issues/4)
## [v1.1.0](https://github.com/mob-sakai/UIEffect/tree/v1.1.0) (2017-08-17)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/v1.0.0...v1.1.0)
**Implemented enhancements:**
- Feature: Pixelization effect [\#1](https://github.com/mob-sakai/UIEffect/issues/1)
## [v1.0.0](https://github.com/mob-sakai/UIEffect/tree/v1.0.0) (2017-03-01)
[Full Changelog](https://github.com/mob-sakai/UIEffect/compare/a9c4ec4e72a055ca5e5c24f6a75c6720f0f6fd7f...v1.0.0)
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f8316adc5942148aaa478bb0bd261b07
guid: 37c4bd2925c96431b827a2031f76add8
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -1,8 +1,9 @@
fileFormatVersion: 2
guid: 962016ab124fa4720be1e24ff58c8522
guid: b00cb7cc19de648f38332743361bdacb
folderAsset: yes
timeCreated: 1547811341
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,169 @@
#if TMP_PRESENT
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro.EditorUtilities;
using UnityEditor;
using Coffee.UIExtensions;
using System.IO;
using System.Linq;
using System;
namespace Coffee.UIEffect.Editors
{
public class TMP_SDFShaderGUI : TMPro.EditorUtilities.TMP_SDFShaderGUI
{
static GUIStyle s_PanelTitle;
Material currentMaterial;
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
{
currentMaterial = materialEditor.target as Material;
base.OnGUI(materialEditor, properties);
}
protected override void DoGUI()
{
if (currentMaterial.HasProperty("_FaceColor"))
{
base.DoGUI();
}
else
{
DrawSpritePanel();
}
var name = currentMaterial.shader.name;
if (name.EndsWith("(UIEffect)"))
{
DrawEffectPanel();
}
else if (name.EndsWith("(UIDissolve)"))
{
DrawDissolvePanel();
}
else if (name.EndsWith("(UIShiny)"))
{
DrawShinyPanel();
}
else if (name.EndsWith("(UITransition)"))
{
DrawTransitionPanel();
}
}
void DrawSpritePanel()
{
if (BeginTmpPanel("Sprite", true))
{
EditorGUI.indentLevel += 1;
DoTexture2D("_MainTex", "Texture");
DoColor("_Color", "Color");
EditorGUI.indentLevel -= 1;
}
EndTmpPanel();
}
void DrawDissolvePanel()
{
if (BeginTmpPanel("Dissolve", true))
{
EditorGUI.indentLevel += 1;
DoTexture2D("_NoiseTex", "Texture");
DrawEnum<ColorMode>(currentMaterial);
EditorGUI.indentLevel -= 1;
}
EndTmpPanel();
}
void DrawShinyPanel()
{
}
void DrawTransitionPanel()
{
if (BeginTmpPanel("Transition", true))
{
EditorGUI.indentLevel += 1;
DoTexture2D("_NoiseTex", "Texture");
DrawEnum<UITransitionEffect.EffectMode>(currentMaterial);
EditorGUI.indentLevel -= 1;
}
EndTmpPanel();
}
void DrawEffectPanel()
{
if (BeginTmpPanel("Effect", true))
{
EditorGUI.indentLevel += 1;
DrawEnum<EffectMode>(currentMaterial);
DrawEnum<ColorMode>(currentMaterial);
DrawEnum<BlurMode>(currentMaterial);
DrawToggleKeyword(currentMaterial, "Advanced Blur", "EX");
EditorGUI.indentLevel -= 1;
}
EndTmpPanel();
}
static void DrawEnum<T>(Material mat)
{
Type type = typeof(T);
string[] names = System.Enum.GetNames(type);
int[] values = System.Enum.GetValues(type) as int[];
int mode = 0;
for (int i = 0; i < names.Length; i++)
{
if (mat.IsKeywordEnabled(names[i].ToUpper()))
mode = values[i];
}
var newMode = EditorGUILayout.IntPopup(ObjectNames.NicifyVariableName(type.Name), mode, names, values);
if (mode != newMode)
{
Array.IndexOf<int>(values, mode);
mat.DisableKeyword(names[Array.IndexOf<int>(values, mode)].ToUpper());
if (newMode != 0)
mat.EnableKeyword(names[Array.IndexOf<int>(values, newMode)].ToUpper());
}
}
static void DrawToggleKeyword(Material mat, string label, string keyword)
{
bool value = mat.IsKeywordEnabled(keyword);
if (EditorGUILayout.Toggle(label, value) != value)
{
if (value)
mat.DisableKeyword(keyword);
else
mat.EnableKeyword(keyword);
}
}
static bool BeginTmpPanel(string panel, bool expanded)
{
if (s_PanelTitle == null)
{
s_PanelTitle = new GUIStyle(EditorStyles.label) { fontStyle = FontStyle.Bold };
}
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
Rect position = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20f, 18f));
position.x += 20;
position.width += 6f;
expanded = GUI.Toggle(position, expanded, panel, s_PanelTitle);
EditorGUI.indentLevel++;
EditorGUI.BeginDisabledGroup(false);
return expanded;
}
static void EndTmpPanel()
{
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel--;
EditorGUILayout.EndVertical();
}
}
}
#endif
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3fbf547b561114807adbec486aa2b977
guid: 0163d601911a448eea37923cb9fd6760
MonoImporter:
externalObjects: {}
serializedVersion: 2
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e9f693669af91aa45ad615fc681ed29f
guid: 1045b92cbd63c45bab65c540449a8ad3
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -0,0 +1,157 @@
Shader "TextMeshPro/Distance Field (UIDissolve)" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(-1,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment frag
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc"
#define UI_DISSOLVE 1
#define DISSOLVE 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
#pragma shader_feature __ ADD SUBTRACT FILL
fixed4 frag(pixel_t IN) : SV_Target
{
half4 color = PixShader(IN);
// Dissolve
color = ApplyTransitionEffect(color, IN.eParam);
color.rgb *= color.a;
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color * IN.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field (UIDissolve)"
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 983d3d7238f4540e3af421a4abb25e26
ShaderImporter:
externalObjects: {}
defaultTextures:
- _FaceTex: {instanceID: 0}
- _OutlineTex: {instanceID: 0}
- _BumpMap: {instanceID: 0}
- _Cube: {instanceID: 0}
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,173 @@
Shader "TextMeshPro/Distance Field (UIEffect)" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(-1,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment frag
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL
#pragma shader_feature __ ADD SUBTRACT FILL
#pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR
#pragma shader_feature __ EX
float4 _MainTex_TexelSize;
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc"
#define UI_EFFECT 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
fixed4 frag(pixel_t IN) : SV_Target
{
fixed4 param = tex2D(_ParamTex, float2(0.5, IN.eParam));
fixed effectFactor = param.x;
fixed colorFactor = param.y;
fixed blurFactor = param.z;
#if PIXEL
half2 pixelSize = max(2, (1-effectFactor*0.95) * float2(_TextureWidth, _TextureHeight));
UV(IN).xy = round(UV(IN).xy * pixelSize) / pixelSize;
#endif
#if defined(UI_BLUR) && EX
half4 color = Tex2DBlurring(IN, blurFactor * float2(1/_TextureWidth, 1/_TextureHeight) * 4, IN.uvMask);
#elif defined(UI_BLUR)
half4 color = Tex2DBlurring(IN, blurFactor * float2(1/_TextureWidth, 1/_TextureHeight) * 4);
#else
half4 color = PixShader(IN) * IN.color.a;
#endif
#if defined (UI_TONE)
color = ApplyToneEffect(color, effectFactor);
#endif
color = ApplyColorEffect(color, fixed4(IN.color.rgb, colorFactor));
color.rgb *= color.a;
return color * IN.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field (UIEffect)"
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: fdc3d2db3815548ae9eea37e1be79f36
ShaderImporter:
externalObjects: {}
defaultTextures:
- _FaceTex: {instanceID: 0}
- _OutlineTex: {instanceID: 0}
- _BumpMap: {instanceID: 0}
- _Cube: {instanceID: 0}
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,156 @@
Shader "TextMeshPro/Distance Field (UIHsvModifier)" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(-1,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment frag
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc"
#define UI_HSV_MODIFIER 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
fixed4 frag(pixel_t IN) : SV_Target
{
half4 color = PixShader(IN);
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
// Hsv
color = ApplyHsvEffect(color, IN.eParam);
color.rgb *= IN.color.rgb;
return color * IN.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field (UIHsv)"
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 58c5c12ea67b943f2bb08cdba8767f41
ShaderImporter:
externalObjects: {}
defaultTextures:
- _FaceTex: {instanceID: 0}
- _OutlineTex: {instanceID: 0}
- _BumpMap: {instanceID: 0}
- _Cube: {instanceID: 0}
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,154 @@
Shader "TextMeshPro/Distance Field (UIShiny)" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(-1,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment frag
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc"
#define UI_SHINY 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
fixed4 frag(pixel_t IN) : SV_Target
{
half4 color = PixShader(IN);
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
// Shiny
color = ApplyShinyEffect(color, IN.eParam);
return color * IN.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field (UIShiny)"
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 7a9c01b59189f4a738528999fa0aa9fe
ShaderImporter:
externalObjects: {}
defaultTextures:
- _FaceTex: {instanceID: 0}
- _OutlineTex: {instanceID: 0}
- _BumpMap: {instanceID: 0}
- _Cube: {instanceID: 0}
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,157 @@
Shader "TextMeshPro/Distance Field (UITransition)" {
Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(-1,1)) = 0
_Bevel ("Bevel", Range(0,1)) = 0.5
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
_Ambient ("Ambient", Range(1,0)) = 0.5
_BumpMap ("Normal map", 2D) = "bump" {}
_BumpOutline ("Bump Outline", Range(0,1)) = 0
_BumpFace ("Bump Face", Range(0,1)) = 0
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1)
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
_GlowPower ("Falloff", Range(1, 0)) = 0.75
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = 0.5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5.0
_ScaleX ("Scale X", float) = 1.0
_ScaleY ("Scale Y", float) = 1.0
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
#pragma fragment frag
#pragma shader_feature __ BEVEL_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma shader_feature __ GLOW_ON
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc"
#define ADD 1
#define UI_TRANSITION 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
#pragma shader_feature __ FADE CUTOFF DISSOLVE
fixed4 frag(pixel_t IN) : SV_Target
{
half4 color = PixShader(IN);
// Transition
color = ApplyTransitionEffect(color, IN.eParam);
color.rgb *= color.a;
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color * IN.color.a;
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field (UITransition)"
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: fa7d8d6e393ae4a9b94b2331c7d0097c
ShaderImporter:
externalObjects: {}
defaultTextures:
- _FaceTex: {instanceID: 0}
- _OutlineTex: {instanceID: 0}
- _BumpMap: {instanceID: 0}
- _Cube: {instanceID: 0}
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,122 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field (UIDissolve)" {
Properties {
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment frag
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#define MOBILE 1
#define UI_DISSOLVE 1
#define DISSOLVE 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
#pragma shader_feature __ ADD SUBTRACT FILL
fixed4 frag(pixel_t IN) : SV_Target
{
half4 color = PixShader(IN);
// Dissolve
color = ApplyTransitionEffect(color, IN.eParam);
color.rgb *= color.a;
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color * IN.color.a;
}
ENDCG
}
}
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 15b053e7702f54708a75b82db8303cba
ShaderImporter:
externalObjects: {}
defaultTextures:
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,140 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field (UIEffect)" {
Properties {
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment frag
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL
#pragma shader_feature __ ADD SUBTRACT FILL
#pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR
#pragma shader_feature __ EX
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#define MOBILE 1
#define UI_EFFECT 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
fixed4 frag(pixel_t IN) : SV_Target
{
fixed4 param = tex2D(_ParamTex, float2(0.5, IN.eParam));
fixed effectFactor = param.x;
fixed colorFactor = param.y;
fixed blurFactor = param.z;
#if PIXEL
half2 pixelSize = max(2, (1-effectFactor*0.95) * float2(_TextureWidth, _TextureHeight));
UV(IN).xy = round(UV(IN).xy * pixelSize) / pixelSize;
#endif
#if defined(UI_BLUR) && EX
half4 color = Tex2DBlurring(IN, blurFactor * float2(1/_TextureWidth, 1/_TextureHeight) * 4, IN.uvMask);
#elif defined(UI_BLUR)
half4 color = Tex2DBlurring(IN, blurFactor * float2(1/_TextureWidth, 1/_TextureHeight) * 4);
#else
half4 color = PixShader(IN) * IN.color.a;
#endif
#if defined (UI_TONE)
color = ApplyToneEffect(color, effectFactor);
#endif
color = ApplyColorEffect(color, fixed4(IN.color.rgb, colorFactor));
color.rgb *= color.a;
return color * IN.color.a;
}
ENDCG
}
}
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: af5de66855c8d4b758264103262d4883
ShaderImporter:
externalObjects: {}
defaultTextures:
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,120 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field (UIHsvModifier)" {
Properties {
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment frag
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#define MOBILE 1
#define UI_HSV_MODIFIER 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
fixed4 frag(pixel_t IN) : SV_Target
{
half4 color = PixShader(IN);
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
// Hsv
color = ApplyHsvEffect(color, IN.eParam);
color.rgb *= IN.color.rgb;
return color * IN.color.a;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 374467ba16b434455b8886b70c293a0d
ShaderImporter:
externalObjects: {}
defaultTextures:
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,19 +1,19 @@
// Simplified SDF shader:
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field SSD" {
Shader "TextMeshPro/Mobile/Distance Field (UIShiny)" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
@@ -34,7 +34,6 @@ Properties {
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
@@ -42,34 +41,32 @@ Properties {
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_MaskTex ("Mask Texture", 2D) = "white" {}
_MaskInverse ("Inverse", float) = 0
_MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
_MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
_MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader {
Tags {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
@@ -85,7 +82,7 @@ SubShader {
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma fragment frag
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
@@ -94,10 +91,26 @@ SubShader {
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#define MOBILE 1
#define UI_SHINY 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
#include "TMPro_Mobile.cginc"
fixed4 frag(pixel_t IN) : SV_Target
{
half4 color = PixShader(IN);
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
// Shiny
color = ApplyShinyEffect(color, IN.eParam);
return color * IN.color.a;
}
ENDCG
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f852f73c234534dbc9da0e57e661dc9d
ShaderImporter:
externalObjects: {}
defaultTextures:
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,122 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field (UITransition)" {
Properties {
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader {
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment frag
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc"
#define MOBILE 1
#define ADD 1
#define UI_TRANSITION 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "UI-Effect-TMPro.cginc"
#pragma shader_feature __ FADE CUTOFF DISSOLVE
fixed4 frag(pixel_t IN) : SV_Target
{
half4 color = PixShader(IN);
// Transition
color = ApplyTransitionEffect(color, IN.eParam);
color.rgb *= color.a;
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color * IN.color.a;
}
ENDCG
}
}
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3158328dfc0344d72bc0e7eaa29cac0e
ShaderImporter:
externalObjects: {}
defaultTextures:
- _MainTex: {instanceID: 0}
- _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,8 +1,8 @@
Shader "TextMeshPro/Sprite"
Shader "TextMeshPro/Sprite (UIDissolve)"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
@@ -10,12 +10,13 @@ Shader "TextMeshPro/Sprite"
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader
@@ -38,7 +39,7 @@ Shader "TextMeshPro/Sprite"
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
@@ -47,70 +48,43 @@ Shader "TextMeshPro/Sprite"
Pass
{
Name "Default"
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#define TMP_SPRITE 1
#define UI_DISSOLVE 1
#define DISSOLVE 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc"
#pragma shader_feature __ ADD SUBTRACT FILL
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
fixed4 _Color;
fixed4 _TextureSampleAdd;
float4 _ClipRect;
float4 _MainTex_ST;
v2f vert(appdata_t v)
{
v2f OUT;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
OUT.worldPosition = v.vertex;
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
OUT.color = v.color * _Color;
return OUT;
}
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
#ifdef UNITY_UI_CLIP_RECT
#if UNITY_UI_CLIP_RECT
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#endif
#ifdef UNITY_UI_ALPHACLIP
clip (color.a - 0.001);
#endif
// Dissolve
color = ApplyTransitionEffect(color, IN.eParam);
return color;
}
ENDCG
}
}
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: 48bb5f55d8670e349b6e614913f9d910
guid: 43184227f35f24905865f36834c4fea9
timeCreated: 1450517184
licenseType: Pro
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,110 @@
Shader "TextMeshPro/Sprite (UIEffect)"
{
Properties
{
_MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL
#pragma shader_feature __ ADD SUBTRACT FILL
#pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR
#pragma shader_feature __ EX
#define TMP_SPRITE 1
#define UI_EFFECT 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc"
fixed4 frag(v2f IN) : SV_Target
{
fixed4 param = tex2D(_ParamTex, float2(0.5, IN.eParam));
fixed effectFactor = param.x;
fixed colorFactor = param.y;
fixed blurFactor = param.z;
#if PIXEL
half2 pixelSize = max(2, (1-effectFactor*0.95) * _MainTex_TexelSize.zw);
IN.texcoord = round(IN.texcoord * pixelSize) / pixelSize;
#endif
#if defined(UI_BLUR) && EX
half4 color = (Tex2DBlurring(_MainTex, IN.texcoord, blurFactor * _MainTex_TexelSize.xy * 2, IN.uvMask) + _TextureSampleAdd);
#elif defined(UI_BLUR)
half4 color = (Tex2DBlurring(_MainTex, IN.texcoord, blurFactor * _MainTex_TexelSize.xy * 2) + _TextureSampleAdd);
#else
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd);
#endif
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#if UNITY_UI_ALPHACLIP
clip (color.a - 0.001);
#endif
#if defined (UI_TONE)
color = ApplyToneEffect(color, effectFactor);
#endif
color = ApplyColorEffect(color, fixed4(IN.color.rgb, colorFactor));
color.a *= IN.color.a;
return color;
}
ENDCG
}
}
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: 1e3b057af24249748ff873be7fafee47
guid: 466007890ce83421082c2d58b0121dcd
timeCreated: 1450517184
licenseType: Pro
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,87 @@
Shader "TextMeshPro/Sprite (UIHsvModifier)"
{
Properties
{
_MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#define TMP_SPRITE 1
#define UI_HSV_MODIFIER 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc"
fixed4 frag(v2f IN) : SV_Target
{
half4 color = tex2D(_MainTex, IN.texcoord);// + _TextureSampleAdd) * IN.color;
#if UNITY_UI_CLIP_RECT
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#endif
#ifdef UNITY_UI_ALPHACLIP
clip (color.a - 0.001);
#endif
// Hsv
color = (ApplyHsvEffect(color, IN.eParam)+ _TextureSampleAdd) * IN.color;
return color;
}
ENDCG
}
}
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: 128e987d567d4e2c824d754223b3f3b0
guid: 1c6bc77283bff44c7aad3f18690f024b
timeCreated: 1450517184
licenseType: Pro
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,87 @@
Shader "TextMeshPro/Sprite (UIShiny)"
{
Properties
{
_MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#define TMP_SPRITE 1
#define UI_SHINY 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc"
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
#if UNITY_UI_CLIP_RECT
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#endif
#ifdef UNITY_UI_ALPHACLIP
clip (color.a - 0.001);
#endif
// Shiny
color = ApplyShinyEffect(color, IN.eParam);
return color;
}
ENDCG
}
}
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: dd89cf5b9246416f84610a006f916af7
guid: c518dd47762104054aeb15fbb2092350
timeCreated: 1450517184
licenseType: Pro
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,90 @@
Shader "TextMeshPro/Sprite (UITransition)"
{
Properties
{
_MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
_NoiseTex("Noise Texture (A)", 2D) = "white" {}
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#define TMP_SPRITE 1
#define UI_TRANSITION 1
#define ADD 1
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc"
#include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc"
#pragma shader_feature __ FADE CUTOFF DISSOLVE
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
#if UNITY_UI_CLIP_RECT
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#endif
#ifdef UNITY_UI_ALPHACLIP
clip (color.a - 0.001);
#endif
// Transition
color = ApplyTransitionEffect(color, IN.eParam);
color.rgb *= color.a;
return color;
}
ENDCG
}
}
CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI"
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8a91c64bfdfa7448cb176a87750a6b64
timeCreated: 1450517184
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,452 @@
#ifndef UI_EFFECT_TMPRO_INCLUDED
#define UI_EFFECT_TMPRO_INCLUDED
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
#if MOBILE
#define UV(x) x.texcoord0
#define UV2(x) x.texcoord1
struct vertex_t {
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
#if EX
float2 uvMask : TEXCOORD2;
#endif
};
struct pixel_t {
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
fixed4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
fixed4 color : COLOR2;
#if UI_DISSOLVE || UI_TRANSITION
half3 eParam : TEXCOORD5;
#elif UI_SHINY
half2 eParam : TEXCOORD5;
#else
half eParam : TEXCOORD5;
#endif
#if EX
half4 uvMask : TEXCOORD6;
#endif
};
pixel_t VertShader(vertex_t input)
{
float bold = step(input.texcoord1.y, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * 1.5;
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float layerScale = scale;
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
// float opacity = input.color.a;
//#if (UNDERLAY_ON | UNDERLAY_INNER)
// opacity = 1.0;
//#endif
fixed4 faceColor = input.color * _FaceColor;
// fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
// faceColor.rgb *= faceColor.a;
fixed4 outlineColor = _OutlineColor;
// outlineColor.a *= opacity;
// outlineColor.rgb *= outlineColor.a;
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Structure for pixel shader
#if UI_DISSOLVE || UI_TRANSITION
half3 param = UnpackToVec3(input.texcoord0.y);
#elif UI_SHINY
half2 param = UnpackToVec2(input.texcoord0.y);
#else
half param = input.texcoord0.y;
#endif
#if UI_EFFECT
input.texcoord0 = UnpackToVec2(input.texcoord0.x) * 2 - 0.5;
#else
input.texcoord0 = UnpackToVec2(input.texcoord0.x);
#endif
pixel_t output = {
vPosition,
faceColor,
outlineColor,
float4(input.texcoord0, maskUV.x, maskUV.y),
half4(scale, bias - outline, bias + outline, bias),
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)),
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4(input.texcoord0 + layerOffset, input.color.a, 0),
half2(layerScale, layerBias),
#endif
input.color,
param,
#if EX
half4(UnpackToVec2(input.uvMask.x), UnpackToVec2(input.uvMask.y)),
#endif
};
return output;
}
// PIXEL SHADER
fixed4 PixShader(pixel_t input) : SV_Target
{
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.w);
#ifdef OUTLINE_ON
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
c *= saturate(d - input.param.y);
#endif
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
#endif
#if (UNDERLAY_ON | UNDERLAY_INNER)
// c *= input.texcoord1.z;
#endif
// Dissolve
//c = ApplyTransitionEffect(c, input.eParam);
//c.rgb *= c.a;
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
return c;
}
#else
#define UV(x) x.atlas
#define UV2(x) x.texcoord2
struct vertex_t {
float4 position : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
#if EX
float2 uvMask : TEXCOORD2;
#endif
};
struct pixel_t {
float4 position : SV_POSITION;
fixed4 color : COLOR;
float2 atlas : TEXCOORD0; // Atlas
float4 param : TEXCOORD1; // alphaClip, scale, bias, weight
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias
fixed4 underlayColor : COLOR1;
#endif
float4 textures : TEXCOORD5;
#if UI_DISSOLVE || UI_TRANSITION
half3 eParam : TEXCOORD6;
#elif UI_SHINY
half2 eParam : TEXCOORD6;
#else
half eParam : TEXCOORD6;
#endif
#if EX
half4 uvMask : TEXCOORD7;
#endif
};
pixel_t VertShader(vertex_t input)
{
float bold = step(input.texcoord1.y, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * 1.5;
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float bias =(.5 - weight) + (.5 / scale);
float alphaClip = (1.0 - _OutlineWidth*_ScaleRatioA - _OutlineSoftness*_ScaleRatioA);
#if GLOW_ON
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB);
#endif
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
float bScale = scale;
bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale);
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
#if UI_DISSOLVE || UI_TRANSITION
half3 param = UnpackToVec3(input.texcoord0.y);
#elif UI_SHINY
half2 param = UnpackToVec2(input.texcoord0.y);
#else
half param = input.texcoord0.y;
#endif
#if UI_EFFECT
input.texcoord0 = UnpackToVec2(input.texcoord0.x) * 2 - 0.5;
#else
input.texcoord0 = UnpackToVec2(input.texcoord0.x);
#endif
pixel_t output = {
vPosition,
input.color,
input.texcoord0,
float4(alphaClip, scale, bias, weight),
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)),
mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz),
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4(input.texcoord0 + bOffset, bScale, bBias),
underlayColor,
#endif
float4(faceUV, outlineUV),
param,
#if EX
half4(UnpackToVec2(input.uvMask.x), UnpackToVec2(input.uvMask.y)),
#endif
};
return output;
}
fixed4 PixShader(pixel_t input)// : SV_Target
{
float c = tex2D(_MainTex, input.atlas).a;
// #ifndef UNDERLAY_ON
// clip(c - input.param.x);
// #endif
float scale = input.param.y;
float bias = input.param.z;
float weight = input.param.w;
float sd = (bias - c) * scale;
float outline = (_OutlineWidth * _ScaleRatioA) * scale;
float softness = (_OutlineSoftness * _ScaleRatioA) * scale;
half4 faceColor = _FaceColor;
half4 outlineColor = _OutlineColor;
// faceColor.rgb *= input.color.rgb;
faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y);
outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y);
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz;
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
n = normalize(n- bump);
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0));
float3 col = GetSpecular(n, light);
faceColor.rgb += col*faceColor.a;
faceColor.rgb *= 1-(dot(n, light)*_Diffuse);
faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z);
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a);
#endif
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
faceColor *= m.x * m.y;
#endif
//#if UNITY_UI_ALPHACLIP
// clip(faceColor.a - 0.001);
//#endif
return faceColor;
}
#endif
#if defined(UI_BLUR)
fixed4 Tex2DBlurring (pixel_t IN, half2 blur, half4 mask)
{
#if FASTBLUR && EX
const int KERNEL_SIZE = 5;
const float KERNEL_[5] = { 0.2486, 0.7046, 1.0, 0.7046, 0.2486};
#elif MEDIUMBLUR && EX
const int KERNEL_SIZE = 9;
const float KERNEL_[9] = { 0.0438, 0.1719, 0.4566, 0.8204, 1.0, 0.8204, 0.4566, 0.1719, 0.0438};
#elif DETAILBLUR && EX
const int KERNEL_SIZE = 13;
const float KERNEL_[13] = { 0.0438, 0.1138, 0.2486, 0.4566, 0.7046, 0.9141, 1.0, 0.9141, 0.7046, 0.4566, 0.2486, 0.1138, 0.0438};
#elif FASTBLUR
const int KERNEL_SIZE = 3;
const float KERNEL_[3] = { 0.4566, 1.0, 0.4566};
#elif MEDIUMBLUR
const int KERNEL_SIZE = 5;
const float KERNEL_[5] = { 0.2486, 0.7046, 1.0, 0.7046, 0.2486};
#elif DETAILBLUR
const int KERNEL_SIZE = 7;
const float KERNEL_[7] = { 0.1719, 0.4566, 0.8204, 1.0, 0.8204, 0.4566, 0.1719};
#else
const int KERNEL_SIZE = 1;
const float KERNEL_[1] = { 1.0 };
#endif
float4 o = 0;
float sum = 0;
float2 shift = 0;
half alpha = IN.color.a;
half2 texcood = UV(IN);
#if UNDERLAY_ON
half2 texcood2 = UV2(IN);
#endif
for(int x = 0; x < KERNEL_SIZE; x++)
{
shift.x = blur.x * (float(x) - KERNEL_SIZE/2);
for(int y = 0; y < KERNEL_SIZE; y++)
{
shift.y = blur.y * (float(y) - KERNEL_SIZE/2);
float2 uv = texcood + shift;
float weight = KERNEL_[x] * KERNEL_[y];
sum += weight;
UV(IN).xy = uv;
IN.color.a = weight;
#if UNDERLAY_ON
UV2(IN).xy = texcood2 + shift;
#endif
#if EX
fixed masked = min(mask.x <= uv.x, uv.x <= mask.z) * min(mask.y <= uv.y, uv.y <= mask.w);
o += lerp(fixed4(0, 0, 0, 0), PixShader(IN) * weight, masked);
#else
o += PixShader(IN) * weight;
#endif
}
}
IN.color.a = alpha;
return o / sum;// * alpha;
}
fixed4 Tex2DBlurring (pixel_t IN, half2 blur)
{
return Tex2DBlurring(IN, blur, half4(0,0,1,1));
}
#endif
#endif // UI_EFFECT_TMPRO_INCLUDED
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c6f704fc82d194f60ac2b8884db48ffe
timeCreated: 1487915863
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -1,4 +1,4 @@
Copyright 2017-2024 mob-sakai
Copyright 2017 mob-sakai
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -1,8 +1,9 @@
fileFormatVersion: 2
guid: 97c7740b360fd49ea9da163b5b877c8e
guid: 39ac2ac7853a94fbc9d9e3d1151b9dfe
folderAsset: yes
timeCreated: 1515203270
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,238 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Dissolve
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _NoiseTex
second:
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParamTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
--- !u!21 &21162286589123374
Material:
serializedVersion: 6
m_ObjectHideFlags: 9
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Dissolve-Fill
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
m_ShaderKeywords: FILL
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _NoiseTex
second:
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParamTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
--- !u!21 &21841578701121694
Material:
serializedVersion: 6
m_ObjectHideFlags: 9
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Dissolve-Subtract
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
m_ShaderKeywords: SUBTRACT
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _NoiseTex
second:
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParamTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
--- !u!21 &21939717441729078
Material:
serializedVersion: 6
m_ObjectHideFlags: 9
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Dissolve-Add
m_Shader: {fileID: 4800000, guid: e1b48dc831eb147e9886c049033213bf, type: 3}
m_ShaderKeywords: ADD
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _NoiseTex
second:
m_Texture: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParamTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 17b17d6effbe14075a3bbdf1fda1f6e1
timeCreated: 1526828325
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,154 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-HSV
m_Shader: {fileID: 4800000, guid: 7fc74090480c84f8b977cfcd55cdfe82, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParamTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _BumpScale
second: 1
- first:
name: _ColorMask
second: 15
- first:
name: _Cutoff
second: 0.5
- first:
name: _DetailNormalMapScale
second: 1
- first:
name: _DstBlend
second: 0
- first:
name: _GlossMapScale
second: 1
- first:
name: _Glossiness
second: 0.5
- first:
name: _GlossyReflections
second: 1
- first:
name: _Metallic
second: 0
- first:
name: _Mode
second: 0
- first:
name: _OcclusionStrength
second: 1
- first:
name: _Parallax
second: 0.02
- first:
name: _SmoothnessTextureChannel
second: 0
- first:
name: _SpecularHighlights
second: 1
- first:
name: _SrcBlend
second: 1
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UVSec
second: 0
- first:
name: _UseUIAlphaClip
second: 0
- first:
name: _ZWrite
second: 1
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
- first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 8f586378b4e144a9851e7b34d9b748ee
timeCreated: 1484171803
guid: c8243c28075b3431084ded42f46ad567
timeCreated: 1531885800
licenseType: Pro
NativeFormatImporter:
userData:
@@ -0,0 +1,55 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Shiny
m_Shader: {fileID: 4800000, guid: 20ffe76c2439c403aabdd25bd94bf011, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParamTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _ColorMask
second: 15
- first:
name: _Stencil
second: 0
- first:
name: _StencilComp
second: 8
- first:
name: _StencilOp
second: 0
- first:
name: _StencilReadMask
second: 255
- first:
name: _StencilWriteMask
second: 255
- first:
name: _UseUIAlphaClip
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 2e498d1c8094910479dc3e1b768306a4
timeCreated: 1484171803
guid: 9dc7e810a87b444ab96919f3215c2fe5
timeCreated: 1523859834
licenseType: Pro
NativeFormatImporter:
userData:
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 79459efec17a4d00a321bdcc27bbc385
timeCreated: 1484172856
guid: 77a4cc77ec7394415a18f9e5a4b8083e
timeCreated: 1532512709
licenseType: Pro
NativeFormatImporter:
userData:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aee96bc531e6eba468ec405e536f515f
timeCreated: 1516545204
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1a1a8e44196ca754a9a7b9cb80e17573
timeCreated: 1516545204
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4ec2a5e3826e94129b91638b3d8f1b72
guid: 3e04c247fb2604af186173fce0bc62de
timeCreated: 1524468976
licenseType: Pro
TextureImporter:
Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

@@ -0,0 +1,244 @@
UIEffect
===
UIEffect provide visual effect components for uGUI element in Unity.
[![](https://img.shields.io/github/release/mob-sakai/UIEffect.svg?label=latest%20version)](https://github.com/mob-sakai/UIEffect/releases)
[![](https://img.shields.io/github/release-date/mob-sakai/UIEffect.svg)](https://github.com/mob-sakai/UIEffect/releases)
![](https://img.shields.io/badge/unity-5.5%2B-green.svg)
[![](https://img.shields.io/github/license/mob-sakai/UIEffect.svg)](https://github.com/mob-sakai/UIEffect/blob/master/LICENSE.txt)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-orange.svg)](http://makeapullrequest.com)
[![](https://img.shields.io/twitter/follow/mob_sakai.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=mob_sakai)
<< [Description](#Description) | [WebGL Demo](#demo) | [Download](https://github.com/mob-sakai/UIEffect/releases) | [Usage](#usage) | [Example of using](#example-of-using) | [Development Note](#development-note) >>
### What's new? [See changelog ![](https://img.shields.io/github/release-date/mob-sakai/UIEffect.svg?label=last%20updated)](https://github.com/mob-sakai/UIEffect/blob/develop/CHANGELOG.md)
### Do you want to receive notifications for new releases? [Watch this repo ![](https://img.shields.io/github/watchers/mob-sakai/UIEffect.svg?style=social&label=Watch)](https://github.com/mob-sakai/UIEffect/subscription)
### Support me on Patreon! [![become_a_patron](https://user-images.githubusercontent.com/12690315/50731629-3b18b480-11ad-11e9-8fad-4b13f27969c1.png)](https://www.patreon.com/join/2343451?)
<br><br><br><br>
## Description
Let's decorate your UI with effects!
You can control parameters as you like from the script as well as inspector.
AnimationClip is supported as a matter of course!
![thumbnail](https://user-images.githubusercontent.com/12690315/41398364-155cf5a6-6ff2-11e8-8124-9d16ef6ca267.gif)
![image](https://user-images.githubusercontent.com/12690315/38594668-636dd3ac-3d82-11e8-9951-820964a6a95f.gif)
<br><br>
#### Available effects
| Component | Features | Screenshot |
|-|-|-|
|**UIEffect**|Combine some visual effects.<br><br>**Effect Mode:** Grayscale, Sepia, Nega, Pixelation<br>**Color Mode:** Multiply, Fill, Additive, Subtract<br>**Blur Mode:** Fast, Medium, Detail<br>**Advanced Blur:** Enable more beautiful blurring.|<img src="https://user-images.githubusercontent.com/12690315/46639603-258df180-cba2-11e8-8f50-9e93bdc4c96e.png" width="600px">|
|**UICaptured EffectImage**|Capture a screenshot of a specific frame with effect, and display it.<br>This effect is non-realtime, light-weight, less-camera, but be effective enough.<br><br>**Effect Mode:** Grayscale, Sepia, Nega, Pixelation<br>**Color Mode:** Multiply, Fill, Additive, Subtract<br>**Blur Mode:** Fast, Medium, Detail<br>**Quality Mode:** Fast, Medium, Detail, Custom<br>**Capture On Enable:** When the component is enable, capture screen automatically.<br>**Blur iterations:** Number of blur iterations.<br>**Reduction/Downsampling Rate:** None, x1, x2, x4, x8<br>**Fit size to screen:** Fit RectTransform to the screen on captured.<br>**Immediate Capturing:**<br><br>*NOTE: This component can be used with UIEffect, UITransition etc.*<br>*NOTE: Immediate capturing does not support LWRP, WebGL and Unity 5.x for iOS/Mac.*|<img src="https://user-images.githubusercontent.com/12690315/44078752-4c2e4114-9fe2-11e8-97f0-54d3a36a562e.gif" width="600px">|
|**UIShiny**|Apply shining effect to a graphic.<br>The effect does not require Mask component or normal map.<br><br>**Parameters:** Effect factor, Width, Rotation, Softness, Brightness, Gloss<br>**Effect Player:** To play shining, enable `Play` in inspector or call `Play()` from script.|<img src="https://user-images.githubusercontent.com/12690315/46639689-b1078280-cba2-11e8-8716-cbc634af7293.gif" width="600px">|
|**UIDissolve**|Apply dissolve effect to a graphic.<br><br>**Color Mode for edge:** Multiply, Fill, Additive, Subtract<br>**Parameters:** Effect factor, Width, Rotation, Softness, Edge color<br>**Options:** Effect area, Keep effect aspect ratio<br>**Effect Player:** To play dissolving, call `Play()` from script.|<img src="https://user-images.githubusercontent.com/12690315/46639690-b1078280-cba2-11e8-8aa9-1d2650fe9a62.gif" width="600px">|
|**UIHsvModifier**|Modify HSV for graphic.<br><br>**Target:** Color, Range<br>**Adjustment:** Hue, Saturation, Value|<img src="https://user-images.githubusercontent.com/12690315/43200006-d6e2bf54-904e-11e8-9f22-0c0f9ce5912f.gif" width="600px">|
|**UITransition Effect**|Apply transition effect with a single channel texture.<br><br>**Effect Mode:** Cutoff, Fade, Dissolve<br>**Options:** Effect area, Keep effect aspect ratio, transition texture<br>**Pass Ray On Hidden:** Disable the graphic's raycastTarget on hidden.<br>**Effect Player:** To show/hide transition, call `Show()/Hide()` from script.|<img src="https://user-images.githubusercontent.com/12690315/46639688-b1078280-cba2-11e8-8bbb-16b8498bca5f.gif" width="600px">|
<br><br>
##### The following effects can be used with the above components.
| Component | Features | Screenshot |
|-|-|-|
|**UIShadow**|Add shadow/outline to a graphic.<br>The performance is better than the default Shadow/Outline component.<br><br>**ShadowStyle:** Shadow, Shadow3, Outline, Outline8|<img src="https://user-images.githubusercontent.com/12690315/46639604-258df180-cba2-11e8-98a9-aa31f04c695d.png" width="600px">|
|**UIGradient**|Change vertex color as gradient with angle and offset.<br><br>**Direction:** Horizontal, Vertical, Angle, Diagonal<br>**Options:** Offset, Color space|<img src="https://user-images.githubusercontent.com/12690315/40716995-ca87665e-6445-11e8-8233-ec2e21fefd6b.png" width="600px">|
|**UIFlip**|Flip a graphic.<br><br>**Direction:** Horizontal, Vertical, Both|<img src="https://user-images.githubusercontent.com/12690315/40716996-cab1fd7e-6445-11e8-9753-962d23991d86.png" width="600px">|
<br><br><br><br>
## Demo
[WebGL Demo](http://mob-sakai.github.io/UIEffect)
* Effect sample
* Transition
* Dialog window with blured background
* Included in unitypackage
<br><br><br><br>
## Usage
1. Download UIEffect.unitypackage from [Releases](https://github.com/mob-sakai/UIEffect/releases).
2. Import the package into your Unity project. Select `Import Package > Custom Package` from the `Assets` menu.
![](https://user-images.githubusercontent.com/12690315/46570979-edbb5a00-c9a7-11e8-845d-c5ee279effec.png)
3. In Unity5.6+, enable `TexCoord1` channel of canvas. See also [Development Note](##note-unity-56).
![](https://user-images.githubusercontent.com/12690315/46567584-3525f400-c970-11e8-9839-5c9e810b0b80.png)
4. Add any effect component to UI element (Image, RawImage, Text, etc...) from `Add Component` in inspector or `Component > UI > UIEffect > ...` menu.
![](https://user-images.githubusercontent.com/12690315/46570977-ebf19680-c9a7-11e8-9ffb-174f56107070.png)
6. Adjust the parameters of the effect as you like, in inspector.
![image](https://user-images.githubusercontent.com/12690315/38594668-636dd3ac-3d82-11e8-9951-820964a6a95f.gif)
7. Enjoy!
#### Usage with TextMeshPro
1. Add a symbol `TMP_PRESENT` to scripting define symbols.
![](https://user-images.githubusercontent.com/12690315/54080742-14583500-433a-11e9-815b-8ed600697569.png)
2. If the material does not support the effect component, the following warning will be displayed.
When you press the Fix button, new material is automatically generated and set.
![](https://user-images.githubusercontent.com/12690315/49728471-377d3500-fcb6-11e8-849b-d664aeb9da75.png)
3. If you want to use material variants, select `Create Material Preset` from the context menu to duplicate the material.
![](https://user-images.githubusercontent.com/12690315/53881014-dfa45f00-4055-11e9-833f-7409adebc542.png)
4. Effect mode, color mode, blur mode and etc. can not be changed from the component editor.
Change them from the material editor.
![](https://user-images.githubusercontent.com/12690315/53782892-bea71580-3f52-11e9-9d43-e7cb6761f52c.png)
5. If you want to enable "Advanced Blur", enable `TexCoord2` channel of canvas.
![](https://user-images.githubusercontent.com/12690315/46567584-3525f400-c970-11e8-9839-5c9e810b0b80.png)
#### Usage without TextMeshPro
1. When you uninstalled TextMeshPro from the project, remove a symbol `TMP_PRESENT` to scripting define symbols.
![](https://user-images.githubusercontent.com/12690315/54080761-cabc1a00-433a-11e9-97ab-431cf1cfe602.png)
##### Requirement
* Unity 5.5+ *(included Unity 2018.x)*
* No other SDK are required
<br><br><br><br>
## Example of using
| Case | Description | Screenshot |
|-|-|-|
|Lock/unlock contents|Use UIEffect to apply grayscale.<br>Indicate to user that the content is unavailable.|![](https://user-images.githubusercontent.com/12690315/46563469-aba8fe80-c93c-11e8-850f-949f6f8da742.png)|
|Silhouette|Use UIEffect for filling color.|![](https://user-images.githubusercontent.com/12690315/46563576-3db10700-c93d-11e8-960e-4336ff3ce481.png)|
|Soft shadow/<br>Outer glow|Use UIEffect and UIShadow to blur the shadow.<br>To blur only shadow, set `Blur Factor` in UIEffect to 0.|![](https://user-images.githubusercontent.com/12690315/46566001-452edb00-c952-11e8-9cc4-6098a9eb67f3.png)|
|Colored shadow|Use UIEffect and UIShadow to fill shadow with color.<br>To fill only shadow, set `Color Factor` in UIEffect to 0.|![](https://user-images.githubusercontent.com/12690315/46566000-452edb00-c952-11e8-8d20-6ccc3fa92ae4.png)|
|Blurred dynamic font|Use UIEffect to blur text.<br>To blur dynamic font cleanly, enable `Advanced Blur` option.|![](https://user-images.githubusercontent.com/12690315/46566002-45c77180-c952-11e8-87cb-4d915e0614be.png)|
|Text with outline & shadow|Use two UIShadows to add outline and shadow.<br>There is less overdraw than default Outline/Shadow `(Default: 1 x 5 x 2 = 10 overdraws, UIShadow: 1 + 4 + 1 = 6 overdraws)`.|![](https://user-images.githubusercontent.com/12690315/46566003-45c77180-c952-11e8-9b47-7bf563ffbaa7.png)|
|Shining button|Use UIShiny for shining button.<br>Shine the button and indicate to user that you can press the button.<br>Enable `Play` and `Loop` option to shine it without any AnimationClip.|![](https://user-images.githubusercontent.com/12690315/46563539-fb87c580-c93c-11e8-8c08-0f21872c47d4.gif)|
|Blurring the background of a menu|Use UIEffectCapturedImage to blur the background of a menu.<br>UIEffectCapturedImage applies an effect to the screen of the previous frame, without adding a camera or layer.<br>It's not a real-time post effect, so it's good performance and works well on mobile.|![](https://user-images.githubusercontent.com/12690315/46565712-735dec00-c94d-11e8-81b4-4e848d8fdb2e.png)|
|Screen transition|Use UITransitionEffect to add screen transition.<br>You can change transition texture (single channel texture).<br>Enable `Pass Ray On Hidden` option and use `Show()/Hide()` method to play transition without AnimationClip.|![](https://user-images.githubusercontent.com/12690315/46565182-dfd5ec80-c947-11e8-834f-a2ef67ad0d95.gif)|
<br><br><br><br>
## Development Note
#### How does UIEffectCapturedImage work?
![image](https://user-images.githubusercontent.com/12690315/34619147-868cb36a-f284-11e7-8122-b924ff09077f.gif)
`UIEffectCapturedImage` is similar to post effect, but uses `CommandBuffer` to give effect only on the rendering result (= captured image) of a specific frame.
This effect is non-realtime, light-weight, less-camera, blit only once, but be effective enough.
* Camera for processing effect is unnecessary.
* Process effect only once after `UIEffectCapturedImage.Capture`.
* Using reduction buffer, keep using memory size small and keep the rendering load are small.
* When GameObjects with motion are on the screen, a result texture may be stirred.
* You can overlay and display like as:
`[Screen] | [UIEffectCapturedImage] | [Dialog A] | [UIEffectCapturedImage] | [Dialog B]`.
See also [Demo](#demo).
#### Why is UIEffect lightweight?
* UIEffect pre-generates material from a combination of effects. This has the following benefits.
* Draw call batching If possible, draw calls will decrease.
* Since only the required material and shader variants are included in the build, the build size will be smaller.
#### How to control effect parameters for uGUI element WITHOUT MaterialPropertyBlock?
* In general, you can use [MaterialPropertyBlock](https://docs.unity3d.com/ScriptReference/MaterialPropertyBlock.html) for renderers to control minor changes in the material without different batches.
* However, changing the [MaterialPropertyBlock](https://docs.unity3d.com/ScriptReference/MaterialPropertyBlock.html) of the uGUI element from the script will cause different batches and draw calls to increase.
* So UIEffect encodes multiple effect parameters to UV1 channel with [IMeshModifier](https://docs.unity3d.com/ScriptReference/UI.IMeshModifier.html).
* Pack four 6-bit [0-1] (64 steps) parameters into one float value.
* The parameters are lower precision, but sufficient.
| uv1 | 6-bit [0-1] | 6-bit [0-1] | 6-bit [0-1] | 6-bit [0-1] |
|-|-|-|-|-|
| x(32bit float) | Tone level | *Empty* | Blur level | *Empty* |
| y(32bit float) | Red channel | Green channel | Blue channel | Alpha channel |
* In v3.0.0+, UIEffect uploads the parameter value to a shared texture and the shader refers to it.
This approach has the following advantages:
* More parameters for the effect are available.
* The parameter accuracy is improved from 6 bits to 8 bits.
* ModifyMesh is not called when parameter value is changed.
#### Note: Unity 5.6+
In Unity 5.6+, Canvas supports **Additional Shader Channels**.
Please enable `TexCoord1` to use UIEffect.
![image](https://user-images.githubusercontent.com/12690315/28405830-f4f261e8-6d68-11e7-9faf-7e5442062f59.png)
![image](https://user-images.githubusercontent.com/12690315/34560894-191b6cda-f18b-11e7-9de2-9a9d13f72ccd.png)
#### Note: if you include prefabs / scenes containing UIEffect in AssetBundle.
Use script define symbol `UIEFFECT_SEPARATE`.
Unused shader variants and materials will be excluded from AssetBundles.
||Combined mode (default)|Separated mode|
|-|-|-|
|Script define symbol| - |`UIEFFECT_SEPARATE`|
|Included in build|Only used variants|Only used variants|
|Included in AssetBundle|All variants (Heavy!)|Only used variants|
|Look in editor|![comb](https://user-images.githubusercontent.com/12690315/35324040-df4f1684-0132-11e8-9534-f958b93de158.png)|![sep](https://user-images.githubusercontent.com/12690315/35324405-fd5e89a6-0133-11e8-9d23-71ccc424fa21.png)|
#### How to improve performance?
* Use `ShaderVariantCollection` to preload shader.
https://docs.unity3d.com/Manual/OptimizingShaderLoadTime.html
* Set camera's clear flag to "Solid Color".
* Enable multi thread rendering.
#### The issue of default Outline component
Graphic with multiple outline components will generate a lot of overdraw.
![image](https://user-images.githubusercontent.com/12690315/34552373-600fdab2-f164-11e7-8565-21c15af92a93.png)
This is an overdraw view of image with three outline components.
Because there are many overdraws, it is very bright!
For each Outline component, increase the mesh by 5 times. (In the case of the Shadow component, it doubles the mesh.)
In the image above, `1 x 5 x 5 x 5 = 125` overdraws are generated.
UIShadow's 'Addition Shadow' feature solves this issue by adding only the necessary mesh, `1 + 4 + 4 + 4 = 13` overdraws are generated.
<br><br><br><br>
## License
* MIT
* © UTJ/UCL
## Author
[mob-sakai](https://github.com/mob-sakai)
[![](https://img.shields.io/twitter/follow/mob_sakai.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=mob_sakai)
[![become_a_patron](https://user-images.githubusercontent.com/12690315/50731629-3b18b480-11ad-11e9-8fad-4b13f27969c1.png)](https://www.patreon.com/join/2343451?)
## See Also
* GitHub page : https://github.com/mob-sakai/UIEffect
* Releases : https://github.com/mob-sakai/UIEffect/releases
* Issue tracker : https://github.com/mob-sakai/UIEffect/issues
* Current project : https://github.com/mob-sakai/UIEffect/projects/1
* Change log : https://github.com/mob-sakai/UIEffect/blob/master/CHANGELOG.md
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a75d49073646347b1955a9f9df36cc45
folderAsset: yes
timeCreated: 1527743733
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -1,8 +1,9 @@
fileFormatVersion: 2
guid: 3f85254e18b3848ebbda5287000b7644
guid: 04feaefc7cdee4c13abcd553a1a6e3a9
folderAsset: yes
timeCreated: 1528368324
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,565 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
#if TMP_PRESENT
using System.Collections.Generic;
using TMPro;
#if UNITY_EDITOR
using UnityEditor;
using System.IO;
using System.Linq;
#endif
#endif
namespace Coffee.UIExtensions
{
/// <summary>
/// Base class for effects that modify the generated Mesh.
/// It works well not only for standard Graphic components (Image, RawImage, Text, etc.) but also for TextMeshPro and TextMeshProUGUI.
/// </summary>
[ExecuteInEditMode]
public abstract class BaseMeshEffect : UIBehaviour, IMeshModifier
{
//################################
// Constant or Static Members.
//################################
#if TMP_PRESENT
static readonly List<Vector2> s_Uv0 = new List<Vector2> (4096);
static readonly List<Vector2> s_Uv1 = new List<Vector2> (4096);
#if UNITY_2017_1_OR_NEWER
static readonly List<Vector2> s_Uv2 = new List<Vector2> (4096);
static readonly List<Vector2> s_Uv3 = new List<Vector2> (4096);
#endif
static readonly List<Vector3> s_Vertices = new List<Vector3> (4096);
static readonly List<int> s_Indices = new List<int> (4096);
static readonly List<Vector3> s_Normals = new List<Vector3> (4096);
static readonly List<Vector4> s_Tangents = new List<Vector4> (4096);
static readonly List<Color32> s_Colors = new List<Color32> (4096);
static readonly VertexHelper s_VertexHelper = new VertexHelper ();
static readonly List<TMP_SubMeshUI> s_SubMeshUIs = new List<TMP_SubMeshUI> (4096);
static readonly List<Mesh> s_Meshes = new List<Mesh> (4096);
static readonly List<UIVertex> s_UIVertices = new List<UIVertex> (4096);
static readonly List<BaseMeshEffect> s_TmpEffects = new List<BaseMeshEffect>(4);
#endif
static readonly Material [] s_EmptyMaterials = new Material [0];
//################################
// Public Members.
//################################
/// <summary>
/// The Graphic attached to this GameObject.
/// </summary>
public Graphic graphic { get { Initialize (); return _graphic; } }
/// <summary>
/// The CanvasRenderer attached to this GameObject.
/// </summary>
public CanvasRenderer canvasRenderer { get { Initialize (); return _canvasRenderer; } }
#if TMP_PRESENT
/// <summary>
/// The TMP_Text attached to this GameObject.
/// </summary>
public TMP_Text textMeshPro { get { Initialize (); return _textMeshPro; } }
#endif
/// <summary>
/// The RectTransform attached to this GameObject.
/// </summary>
public RectTransform rectTransform { get { Initialize (); return _rectTransform; } }
#if UNITY_5_6_OR_NEWER
/// <summary>
/// Additional canvas shader channels to use this component.
/// </summary>
public virtual AdditionalCanvasShaderChannels requiredChannels { get { return AdditionalCanvasShaderChannels.None; } }
#endif
/// <summary>
/// Is TextMeshPro or TextMeshProUGUI attached to this GameObject?
/// </summary>
public bool isTMPro
{
get
{
#if TMP_PRESENT
return textMeshPro != null;
#else
return false;
#endif
}
}
/// <summary>
/// The material for rendering.
/// </summary>
public virtual Material material
{
get
{
#if TMP_PRESENT
if (textMeshPro)
{
return textMeshPro.fontSharedMaterial;
}
else
#endif
if (graphic)
{
return graphic.material;
}
else
{
return null;
}
}
set
{
#if TMP_PRESENT
if (textMeshPro)
{
textMeshPro.fontSharedMaterial = value;
}
else
#endif
if (graphic)
{
graphic.material = value;
}
}
}
public virtual Material[] materials
{
get
{
#if TMP_PRESENT
if (textMeshPro)
{
return textMeshPro.fontSharedMaterials ?? s_EmptyMaterials;
}
else
#endif
if (graphic)
{
_materials [0] = graphic.material;
return _materials;
}
else
{
return s_EmptyMaterials;
}
}
}
/// <summary>
/// Call used to modify mesh. (legacy)
/// </summary>
/// <param name="mesh">Mesh.</param>
public virtual void ModifyMesh (Mesh mesh)
{
}
/// <summary>
/// Call used to modify mesh.
/// </summary>
/// <param name="vh">VertexHelper.</param>
public virtual void ModifyMesh (VertexHelper vh)
{
}
/// <summary>
/// Mark the vertices as dirty.
/// </summary>
public virtual void SetVerticesDirty ()
{
#if TMP_PRESENT
if (textMeshPro)
{
foreach (var info in textMeshPro.textInfo.meshInfo)
{
var mesh = info.mesh;
if (mesh)
{
mesh.Clear ();
mesh.vertices = info.vertices;
mesh.uv = info.uvs0;
mesh.uv2 = info.uvs2;
mesh.colors32 = info.colors32;
mesh.normals = info.normals;
mesh.tangents = info.tangents;
mesh.triangles = info.triangles;
}
}
if (canvasRenderer)
{
canvasRenderer.SetMesh (textMeshPro.mesh);
GetComponentsInChildren (false, s_SubMeshUIs);
foreach (var sm in s_SubMeshUIs)
{
sm.canvasRenderer.SetMesh (sm.mesh);
}
s_SubMeshUIs.Clear ();
}
textMeshPro.havePropertiesChanged = true;
}
else
#endif
if (graphic)
{
graphic.SetVerticesDirty ();
}
}
public void ShowTMProWarning (Shader shader, Shader mobileShader, Shader spriteShader, System.Action<Material> onCreatedMaterial)
{
#if UNITY_EDITOR && TMP_PRESENT
if(!textMeshPro || !textMeshPro.fontSharedMaterial)
{
return;
}
// Is the material preset for dissolve?
Material m = textMeshPro.fontSharedMaterial;
if (m.shader != shader && m.shader != mobileShader)
{
EditorGUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox (string.Format("{0} requires '{1}' or '{2}' as a shader for material preset.", GetType().Name, shader.name, mobileShader.name), MessageType.Warning);
if(GUILayout.Button ("Fix"))
{
var correctShader = m.shader.name.Contains ("Mobile") ? mobileShader : shader;
textMeshPro.fontSharedMaterial = ModifyTMProMaterialPreset (m, correctShader, onCreatedMaterial);
}
EditorGUILayout.EndHorizontal ();
return;
}
// Is the sprite asset for dissolve?
TMP_SpriteAsset spriteAsset = textMeshPro.spriteAsset ?? TMP_Settings.GetSpriteAsset ();
// Sprite asset might not exist at all
if(spriteAsset == null) {
return;
}
m = spriteAsset.material;
if (m && m.shader != spriteShader && textMeshPro.richText && textMeshPro.text.Contains("<sprite="))
{
EditorGUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox (string.Format ("{0} requires '{1}' as a shader for sprite asset.", GetType().Name,spriteShader.name), MessageType.Warning);
if (GUILayout.Button ("Fix"))
{
GetComponentsInChildren<TMP_SubMesh> ().Select (x => x.gameObject).ToList ().ForEach (DestroyImmediate);
GetComponentsInChildren<TMP_SubMeshUI> ().Select (x => x.gameObject).ToList ().ForEach (DestroyImmediate);
textMeshPro.spriteAsset = ModifyTMProSpriteAsset (m, spriteShader, onCreatedMaterial);
}
EditorGUILayout.EndHorizontal ();
return;
}
}
Material ModifyTMProMaterialPreset (Material baseMaterial, Shader shader, System.Action<Material> onCreatedMaterial)
{
string path = AssetDatabase.GetAssetPath (baseMaterial);
string filename = Path.GetFileNameWithoutExtension (path) + " (" + GetType ().Name + ")";
Material mat = Resources.Load<Material> (TMP_Settings.defaultFontAssetPath + filename);
if (!mat)
{
mat = new Material (baseMaterial)
{
shaderKeywords = baseMaterial.shaderKeywords,
shader = shader,
};
onCreatedMaterial (mat);
AssetDatabase.CreateAsset (mat, Path.GetDirectoryName (path) + "/" + filename + ".mat");
EditorUtility.FocusProjectWindow ();
EditorGUIUtility.PingObject (mat);
}
else
{
mat.shader = shader;
}
EditorUtility.SetDirty (mat);
return mat;
}
TMP_SpriteAsset ModifyTMProSpriteAsset (Material baseMaterial, Shader shader, System.Action<Material> onCreatedMaterial)
{
string path = AssetDatabase.GetAssetPath (baseMaterial);
string filename = Path.GetFileNameWithoutExtension (path) + " (" + this.GetType ().Name + ")";
TMP_SpriteAsset spriteAsset = Resources.Load<TMP_SpriteAsset> (TMP_Settings.defaultSpriteAssetPath + filename);
if (!spriteAsset)
{
AssetDatabase.CopyAsset (path, Path.GetDirectoryName (path) + "/" + filename + ".mat");
spriteAsset = Resources.Load<TMP_SpriteAsset> (TMP_Settings.defaultSpriteAssetPath + filename);
spriteAsset.material.shader = shader;
spriteAsset.material.name = shader.name;
onCreatedMaterial (spriteAsset.material);
EditorUtility.FocusProjectWindow ();
EditorGUIUtility.PingObject (spriteAsset);
}
else
{
spriteAsset.material.shader = shader;
}
EditorUtility.SetDirty (spriteAsset);
return spriteAsset;
#endif
}
//################################
// Protected Members.
//################################
/// <summary>
/// Should the effect modify the mesh directly for TMPro?
/// </summary>
protected virtual bool isLegacyMeshModifier { get { return false; } }
protected virtual void Initialize ()
{
if (!_initialized)
{
_initialized = true;
_graphic = _graphic ?? GetComponent<Graphic> ();
_canvasRenderer = _canvasRenderer ?? GetComponent<CanvasRenderer> ();
_rectTransform = _rectTransform ?? GetComponent<RectTransform> ();
#if TMP_PRESENT
_textMeshPro = _textMeshPro ?? GetComponent<TMP_Text> ();
#endif
}
}
/// <summary>
/// This function is called when the object becomes enabled and active.
/// </summary>
protected override void OnEnable ()
{
_initialized = false;
SetVerticesDirty ();
#if TMP_PRESENT
if (textMeshPro)
{
TMPro_EventManager.TEXT_CHANGED_EVENT.Add (OnTextChanged);
}
#endif
#if UNITY_EDITOR && TMP_PRESENT
if (graphic && textMeshPro)
{
GraphicRebuildTracker.TrackGraphic (graphic);
}
#endif
#if UNITY_5_6_OR_NEWER
if (graphic)
{
AdditionalCanvasShaderChannels channels = requiredChannels;
var canvas = graphic.canvas;
if (canvas && (canvas.additionalShaderChannels & channels) != channels)
{
Debug.LogWarningFormat (this, "Enable {1} of Canvas.additionalShaderChannels to use {0}.", GetType ().Name, channels);
}
}
#endif
}
/// <summary>
/// This function is called when the behaviour becomes disabled () or inactive.
/// </summary>
protected override void OnDisable ()
{
#if TMP_PRESENT
TMPro_EventManager.TEXT_CHANGED_EVENT.Remove (OnTextChanged);
#endif
SetVerticesDirty ();
#if UNITY_EDITOR && TMP_PRESENT
if (graphic && textMeshPro)
{
GraphicRebuildTracker.UnTrackGraphic (graphic);
}
#endif
}
/// <summary>
/// LateUpdate is called every frame, if the Behaviour is enabled.
/// </summary>
protected virtual void LateUpdate ()
{
#if TMP_PRESENT
if (textMeshPro)
{
if (textMeshPro.havePropertiesChanged || _isTextMeshProActive != textMeshPro.isActiveAndEnabled)
{
SetVerticesDirty ();
}
_isTextMeshProActive = textMeshPro.isActiveAndEnabled;
}
#endif
}
/// <summary>
/// Callback for when properties have been changed by animation.
/// </summary>
protected override void OnDidApplyAnimationProperties ()
{
SetVerticesDirty ();
}
#if UNITY_EDITOR
/// <summary>
/// This function is called when the script is loaded or a value is changed in the inspector (Called in the editor only).
/// </summary>
protected override void OnValidate ()
{
SetVerticesDirty ();
}
#endif
//################################
// Private Members.
//################################
bool _initialized;
CanvasRenderer _canvasRenderer;
RectTransform _rectTransform;
Graphic _graphic;
Material [] _materials = new Material [1];
#if TMP_PRESENT
bool _isTextMeshProActive;
TMP_Text _textMeshPro;
/// <summary>
/// Called when any TextMeshPro generated the mesh.
/// </summary>
/// <param name="obj">TextMeshPro object.</param>
void OnTextChanged (Object obj)
{
// Skip if the object is different from the current object or the text is empty.
var textInfo = textMeshPro.textInfo;
if (textMeshPro != obj || textInfo.characterCount - textInfo.spaceCount <= 0)
{
return;
}
GetComponents<BaseMeshEffect>(s_TmpEffects);
for (int i = 0; i < s_TmpEffects.Count; i++)
{
if (s_TmpEffects[i].enabled)
{
if (s_TmpEffects[i] == this)
break;
else
return;
}
}
// Collect the meshes.
s_Meshes.Clear ();
foreach (var info in textInfo.meshInfo)
{
s_Meshes.Add (info.mesh);
}
// Modify the meshes.
foreach (var e in s_TmpEffects)
{
if (!e.enabled)
continue;
if (e.isLegacyMeshModifier)
{
// Legacy mode: Modify the meshes directly.
foreach (var m in s_Meshes)
{
if (m)
{
e.ModifyMesh(m);
}
}
}
else
{
// Convert meshes to VertexHelpers and modify them.
foreach (var m in s_Meshes)
{
if (m)
{
FillVertexHelper(s_VertexHelper, m);
e.ModifyMesh(s_VertexHelper);
s_VertexHelper.FillMesh(m);
}
}
}
}
// Set the modified meshes to the CanvasRenderers (for UI only).
if (canvasRenderer)
{
canvasRenderer.SetMesh (textMeshPro.mesh);
GetComponentsInChildren (false, s_SubMeshUIs);
foreach (var sm in s_SubMeshUIs)
{
sm.canvasRenderer.SetMesh (sm.mesh);
}
s_SubMeshUIs.Clear ();
}
// Clear.
s_Meshes.Clear ();
}
void FillVertexHelper (VertexHelper vh, Mesh mesh)
{
vh.Clear ();
mesh.GetVertices (s_Vertices);
mesh.GetColors (s_Colors);
mesh.GetUVs (0, s_Uv0);
mesh.GetUVs (1, s_Uv1);
mesh.GetNormals (s_Normals);
mesh.GetTangents (s_Tangents);
mesh.GetIndices (s_Indices, 0);
#if UNITY_2017_1_OR_NEWER
mesh.GetUVs (2, s_Uv2);
mesh.GetUVs (3, s_Uv3);
bool useUv2 = 0 < s_Uv2.Count;
bool useUv3 = 0 < s_Uv3.Count;
#endif
s_UIVertices.Clear();
UIVertex v = default(UIVertex);
for (int i = 0; i < s_Vertices.Count; i++)
{
v.position = s_Vertices[i];
v.color = s_Colors[i];
v.uv0 = s_Uv0[i];
v.uv1 = s_Uv1[i];
#if UNITY_2017_1_OR_NEWER
if (useUv2 && i < s_Uv2.Count)
v.uv2 = s_Uv2[i];
if (useUv3 && i < s_Uv3.Count)
v.uv3 = s_Uv3[i];
#endif
v.normal = s_Normals[i];
v.tangent = s_Tangents[i];
s_UIVertices.Add(v);
}
s_VertexHelper.AddUIVertexStream(s_UIVertices, s_Indices);
}
#endif
}
}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3aef1549bb83f4e6babaf8bc9648ee1b
guid: 229ee7044e2514b0e9bd9fd40a2baa3a
MonoImporter:
externalObjects: {}
serializedVersion: 2
@@ -0,0 +1,13 @@
namespace Coffee.UIExtensions
{
/// <summary>
/// Blur effect mode.
/// </summary>
public enum BlurMode
{
None = 0,
FastBlur = 1,
MediumBlur = 2,
DetailBlur = 3,
}
}
@@ -0,0 +1,13 @@
namespace Coffee.UIExtensions
{
/// <summary>
/// Color effect mode.
/// </summary>
public enum ColorMode
{
Multiply = 0,
Fill = 1,
Add = 2,
Subtract = 3,
}
}
@@ -0,0 +1,112 @@
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIExtensions
{
/// <summary>
/// Area for effect.
/// </summary>
public enum EffectArea
{
RectTransform,
Fit,
Character,
}
public static class EffectAreaExtensions
{
static readonly Rect rectForCharacter = new Rect(0, 0, 1, 1);
static readonly Vector2 [] splitedCharacterPosition = { Vector2.up, Vector2.one, Vector2.right, Vector2.zero };
/// <summary>
/// Gets effect for area.
/// </summary>
public static Rect GetEffectArea (this EffectArea area, VertexHelper vh, Rect rectangle, float aspectRatio = -1)
{
Rect rect = default(Rect);
switch (area)
{
case EffectArea.RectTransform:
rect = rectangle;
break;
case EffectArea.Character:
rect = rectForCharacter;
break;
case EffectArea.Fit:
// Fit to contents.
UIVertex vertex = default (UIVertex);
float xMin = float.MaxValue;
float yMin = float.MaxValue;
float xMax = float.MinValue;
float yMax = float.MinValue;
for (int i = 0; i < vh.currentVertCount; i++)
{
vh.PopulateUIVertex(ref vertex, i);
float x = vertex.position.x;
float y = vertex.position.y;
xMin = Mathf.Min(xMin, x);
yMin = Mathf.Min(yMin, y);
xMax = Mathf.Max(xMax, x);
yMax = Mathf.Max(yMax, y);
}
rect.Set (xMin, yMin, xMax - xMin, yMax - yMin);
break;
default:
rect = rectangle;
break;
}
if(0 < aspectRatio)
{
if (rect.width < rect.height)
{
rect.width = rect.height * aspectRatio;
}
else
{
rect.height = rect.width / aspectRatio;
}
}
return rect;
}
/// <summary>
/// Gets position factor for area.
/// </summary>
public static void GetPositionFactor (this EffectArea area, int index, Rect rect, Vector2 position, bool isText, bool isTMPro, out float x, out float y)
{
if (isText && area == EffectArea.Character)
{
index = isTMPro ? (index + 3) % 4 : index % 4;
x = splitedCharacterPosition [index].x;
y = splitedCharacterPosition [index].y;
}
else if (area == EffectArea.Fit)
{
x = Mathf.Clamp01 ((position.x - rect.xMin) / rect.width);
y = Mathf.Clamp01 ((position.y - rect.yMin) / rect.height);
}
else
{
x = Mathf.Clamp01 (position.x / rect.width + 0.5f);
y = Mathf.Clamp01 (position.y / rect.height + 0.5f);
}
}
/// <summary>
/// Normalize vertex position by local matrix.
/// </summary>
public static void GetNormalizedFactor (this EffectArea area, int index, Matrix2x3 matrix, Vector2 position, bool isText, out Vector2 nomalizedPos)
{
if (isText && area == EffectArea.Character)
{
nomalizedPos = matrix * splitedCharacterPosition [(index + 3) % 4];
}
else
{
nomalizedPos = matrix * position;
}
}
}
}
@@ -0,0 +1,156 @@
using UnityEngine;
using System;
using System.Collections.Generic;
namespace Coffee.UIExtensions
{
/// <summary>
/// Effect player.
/// </summary>
[Serializable]
public class EffectPlayer
{
//################################
// Public Members.
//################################
/// <summary>
/// Gets or sets a value indicating whether is playing.
/// </summary>
[Header("Effect Player")]
[Tooltip("Playing.")]
public bool play = false;
/// <summary>
/// Gets or sets the delay before looping.
/// </summary>
[Tooltip("Initial play delay.")]
[Range(0f, 10f)]
public float initialPlayDelay = 0;
/// <summary>
/// Gets or sets the duration.
/// </summary>
[Tooltip("Duration.")]
[Range(0.01f,10f)]
public float duration = 1;
/// <summary>
/// Gets or sets a value indicating whether can loop.
/// </summary>
[Tooltip("Loop.")]
public bool loop = false;
/// <summary>
/// Gets or sets the delay before looping.
/// </summary>
[Tooltip("Delay before looping.")]
[Range(0f,10f)]
public float loopDelay = 0;
/// <summary>
/// Gets or sets the update mode.
/// </summary>
[Tooltip("Update mode")]
public AnimatorUpdateMode updateMode = AnimatorUpdateMode.Normal;
static List<Action> s_UpdateActions;
/// <summary>
/// Register player.
/// </summary>
public void OnEnable(Action<float> callback = null)
{
if (s_UpdateActions == null)
{
s_UpdateActions = new List<Action>();
Canvas.willRenderCanvases += () =>
{
var count = s_UpdateActions.Count;
for (int i = 0; i < count; i++)
{
s_UpdateActions[i].Invoke();
}
};
}
s_UpdateActions.Add(OnWillRenderCanvases);
if (play)
{
_time = -initialPlayDelay;
}
else
{
_time = 0;
}
_callback = callback;
}
/// <summary>
/// Unregister player.
/// </summary>
public void OnDisable()
{
_callback = null;
s_UpdateActions.Remove(OnWillRenderCanvases);
}
/// <summary>
/// Start playing.
/// </summary>
public void Play(bool reset, Action<float> callback = null)
{
if (reset)
{
_time = 0;
}
play = true;
if (callback != null)
{
_callback = callback;
}
}
/// <summary>
/// Stop playing.
/// </summary>
public void Stop(bool reset)
{
if (reset)
{
_time = 0;
if (_callback != null)
{
_callback(_time);
}
}
play = false;
}
//################################
// Private Members.
//################################
float _time = 0;
Action<float> _callback;
void OnWillRenderCanvases()
{
if (!play || !Application.isPlaying || _callback == null)
{
return;
}
_time += updateMode == AnimatorUpdateMode.UnscaledTime
? Time.unscaledDeltaTime
: Time.deltaTime;
var current = _time / duration;
if (duration <= _time)
{
play = loop;
_time = loop ? -loopDelay : 0;
}
_callback(current);
}
}
}
@@ -0,0 +1,95 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace Coffee.UIExtensions
{
public class MaterialCache
{
public ulong hash { get; private set; }
public int referenceCount { get; private set; }
public Texture texture { get; private set; }
public Material material { get; private set; }
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoadMethod]
static void ClearCache()
{
foreach (var cache in materialCaches)
{
cache.material = null;
}
materialCaches.Clear();
}
#endif
public static List<MaterialCache> materialCaches = new List<MaterialCache>();
public static MaterialCache Register(ulong hash, Texture texture, System.Func<Material> onCreateMaterial)
{
var cache = materialCaches.FirstOrDefault(x => x.hash == hash);
if (cache != null && cache.material)
{
if (cache.material)
{
cache.referenceCount++;
}
else
{
materialCaches.Remove(cache);
cache = null;
}
}
if (cache == null)
{
cache = new MaterialCache()
{
hash = hash,
material = onCreateMaterial(),
referenceCount = 1,
};
materialCaches.Add(cache);
}
return cache;
}
public static MaterialCache Register(ulong hash, System.Func<Material> onCreateMaterial)
{
var cache = materialCaches.FirstOrDefault(x => x.hash == hash);
if (cache != null)
{
cache.referenceCount++;
}
if (cache == null)
{
cache = new MaterialCache()
{
hash = hash,
material = onCreateMaterial(),
referenceCount = 1,
};
materialCaches.Add(cache);
}
return cache;
}
public static void Unregister(MaterialCache cache)
{
if (cache == null)
{
return;
}
cache.referenceCount--;
if (cache.referenceCount <= 0)
{
MaterialCache.materialCaches.Remove(cache);
cache.material = null;
}
}
}
}
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 2f797a494ddf546e8812a1ba38a45b0f
timeCreated: 1528296875
guid: 2160d2c55a6100642b6c7ba09df935da
timeCreated: 1528509206
licenseType: Free
MonoImporter:
serializedVersion: 2
@@ -0,0 +1,126 @@
#if UNITY_EDITOR
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEngine;
namespace Coffee.UIExtensions
{
public class MaterialResolver
{
static readonly StringBuilder s_StringBuilder = new StringBuilder();
static readonly Dictionary<string, Material> s_MaterialMap = new Dictionary<string, Material>();
public static Material GetOrGenerateMaterialVariant(Shader shader, params object[] append)
{
if (!shader)
{
return null;
}
Material mat = null;
string variantName = GetVariantName(shader, append);
if (s_MaterialMap.TryGetValue(variantName, out mat) && mat)
{
return mat;
}
string[] keywords = append.Where(x => 0 < (int)x)
.Select(x => x.ToString().ToUpper())
.ToArray();
mat = GetMaterial(shader, append);
if (mat)
{
if (!mat.shaderKeywords.OrderBy(x => x).SequenceEqual(keywords.OrderBy(x => x)))
{
mat.shaderKeywords = keywords;
EditorUtility.SetDirty(mat);
if (!Application.isPlaying)
{
EditorApplication.delayCall += AssetDatabase.SaveAssets;
}
}
return mat;
}
if (s_MaterialMap.TryGetValue(variantName, out mat) && mat)
{
return mat;
}
Debug.Log("Generate material : " + variantName);
mat = new Material(shader);
mat.shaderKeywords = keywords;
mat.name = variantName;
mat.hideFlags |= HideFlags.NotEditable;
s_MaterialMap[variantName] = mat;
bool isMainAsset = append.Cast<int>().All(x => x == 0);
EditorApplication.delayCall += () => SaveMaterial(mat, shader, isMainAsset);
return mat;
}
static void SaveMaterial(Material mat, Shader shader, bool isMainAsset)
{
string materialPath = GetDefaultMaterialPath(shader);
#if UIEFFECT_SEPARATE
string dir = Path.GetDirectoryName(materialPath);
materialPath = Path.Combine(Path.Combine(dir, "Separated"), mat.name + ".mat");
isMainAsset = true;
#endif
if (isMainAsset)
{
Directory.CreateDirectory(Path.GetDirectoryName(materialPath));
AssetDatabase.CreateAsset(mat, materialPath);
}
else
{
GetOrGenerateMaterialVariant(shader);
mat.hideFlags |= HideFlags.HideInHierarchy;
AssetDatabase.AddObjectToAsset(mat, materialPath);
}
AssetDatabase.SaveAssets();
}
public static Material GetMaterial(Shader shader, params object[] append)
{
string variantName = GetVariantName(shader, append);
return AssetDatabase.FindAssets("t:Material " + Path.GetFileName(shader.name))
.Select(x => AssetDatabase.GUIDToAssetPath(x))
.SelectMany(x => AssetDatabase.LoadAllAssetsAtPath(x))
.OfType<Material>()
.FirstOrDefault(x => x.name == variantName);
}
public static string GetDefaultMaterialPath(Shader shader)
{
var name = Path.GetFileName(shader.name);
return AssetDatabase.FindAssets("t:Material " + name)
.Select(x => AssetDatabase.GUIDToAssetPath(x))
.FirstOrDefault(x => Path.GetFileNameWithoutExtension(x) == name)
?? ("Assets/" + name + ".mat");
}
public static string GetVariantName(Shader shader, params object[] append)
{
s_StringBuilder.Length = 0;
#if UIEFFECT_SEPARATE
s_StringBuilder.Append("[Separated] ");
#endif
s_StringBuilder.Append(Path.GetFileName(shader.name));
foreach (object mode in append.Where(x=>0<(int)x))
{
s_StringBuilder.Append("-");
s_StringBuilder.Append(mode.ToString());
}
return s_StringBuilder.ToString();
}
}
}
#endif
@@ -1,7 +1,8 @@
fileFormatVersion: 2
guid: e095cc53c91de44459b0fda6a14d0eff
guid: 70261fa2760d4c040ac28aebb1f155fb
timeCreated: 1528297353
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
@@ -0,0 +1,33 @@
using UnityEngine;
namespace Coffee.UIExtensions
{
/// <summary>
/// Matrix2x3.
/// </summary>
public struct Matrix2x3
{
public float m00, m01, m02, m10, m11, m12;
public Matrix2x3(Rect rect, float cos, float sin)
{
const float center = 0.5f;
float dx = -rect.xMin / rect.width - center;
float dy = -rect.yMin / rect.height - center;
m00 = cos / rect.width;
m01 = -sin / rect.height;
m02 = dx * cos - dy * sin + center;
m10 = sin / rect.width;
m11 = cos / rect.height;
m12 = dx * sin + dy * cos + center;
}
public static Vector2 operator*(Matrix2x3 m, Vector2 v)
{
return new Vector2(
(m.m00 * v.x) + (m.m01 * v.y) + m.m02,
(m.m10 * v.x) + (m.m11 * v.y) + m.m12
);
}
}
}
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 27bd0b04cc3fb4d338bb2ffc5f9d3e7c
timeCreated: 1487152293
guid: 5a9b962044ca64867b713425f7e5daab
timeCreated: 1527590245
licenseType: Pro
MonoImporter:
serializedVersion: 2
@@ -0,0 +1,60 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class Packer
{
/// <summary>
/// Pack 4 low-precision [0-1] floats values to a float.
/// Each value [0-1] has 64 steps(6 bits).
/// </summary>
public static float ToFloat(float x, float y, float z, float w)
{
x = x < 0 ? 0 : 1 < x ? 1 : x;
y = y < 0 ? 0 : 1 < y ? 1 : y;
z = z < 0 ? 0 : 1 < z ? 1 : z;
w = w < 0 ? 0 : 1 < w ? 1 : w;
const int PRECISION = (1 << 6) - 1;
return (Mathf.FloorToInt(w * PRECISION) << 18)
+ (Mathf.FloorToInt(z * PRECISION) << 12)
+ (Mathf.FloorToInt(y * PRECISION) << 6)
+ Mathf.FloorToInt(x * PRECISION);
}
/// <summary>
/// Pack 4 low-precision [0-1] floats values to a float.
/// Each value [0-1] has 64 steps(6 bits).
/// </summary>
public static float ToFloat(Vector4 factor)
{
return ToFloat(Mathf.Clamp01(factor.x), Mathf.Clamp01(factor.y), Mathf.Clamp01(factor.z), Mathf.Clamp01(factor.w));
}
/// <summary>
/// Pack 1 middle-precision & 2 low-precision [0-1] floats values to a float.
/// z value [0-1] has 4096 steps(12 bits) and xy value [0-1] has 64 steps(6 bits).
/// </summary>
public static float ToFloat(float x, float y, float z)
{
x = x < 0 ? 0 : 1 < x ? 1 : x;
y = y < 0 ? 0 : 1 < y ? 1 : y;
z = z < 0 ? 0 : 1 < z ? 1 : z;
const int PRECISION = (1 << 8) - 1;
return (Mathf.FloorToInt(z * PRECISION) << 16)
+ (Mathf.FloorToInt(y * PRECISION) << 8)
+ Mathf.FloorToInt(x * PRECISION);
}
/// <summary>
/// Pack 2 low-precision [0-1] floats values to a float.
/// Each value [0-1] has 4096 steps(12 bits).
/// </summary>
public static float ToFloat(float x, float y)
{
x = x < 0 ? 0 : 1 < x ? 1 : x;
y = y < 0 ? 0 : 1 < y ? 1 : y;
const int PRECISION = (1 << 12) - 1;
return (Mathf.FloorToInt(y * PRECISION) << 12)
+ Mathf.FloorToInt(x * PRECISION);
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b4970b3a69d3b472b8d66c1d92ec7bad
timeCreated: 1527590285
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,190 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using System;
namespace Coffee.UIExtensions
{
public interface IParameterTexture
{
int parameterIndex { get; set; }
ParameterTexture ptex { get; }
}
/// <summary>
/// Parameter texture.
/// </summary>
[System.Serializable]
public class ParameterTexture
{
//################################
// Public Members.
//################################
/// <summary>
/// Initializes a new instance of the <see cref="Coffee.UIExtensions.ParameterTexture"/> class.
/// </summary>
/// <param name="channels">Channels.</param>
/// <param name="instanceLimit">Instance limit.</param>
/// <param name="propertyName">Property name.</param>
public ParameterTexture(int channels, int instanceLimit, string propertyName)
{
_propertyName = propertyName;
_channels = ((channels - 1) / 4 + 1) * 4;
_instanceLimit = ((instanceLimit - 1) / 2 + 1) * 2;
_data = new byte[_channels * _instanceLimit];
_stack = new Stack<int>(_instanceLimit);
for (int i = 1; i < _instanceLimit + 1; i++)
{
_stack.Push(i);
}
}
/// <summary>
/// Register the specified target.
/// </summary>
/// <param name="target">Target.</param>
public void Register(IParameterTexture target)
{
Initialize();
if (target.parameterIndex <= 0 && 0 < _stack.Count)
{
target.parameterIndex = _stack.Pop();
// Debug.LogFormat("<color=green>@@@ Register {0} : {1}</color>", target, target.parameterIndex);
}
}
/// <summary>
/// Unregister the specified target.
/// </summary>
/// <param name="target">Target.</param>
public void Unregister(IParameterTexture target)
{
if (0 < target.parameterIndex)
{
// Debug.LogFormat("<color=red>@@@ Unregister {0} : {1}</color>", target, target.parameterIndex);
_stack.Push(target.parameterIndex);
target.parameterIndex = 0;
}
}
/// <summary>
/// Sets the data.
/// </summary>
/// <param name="target">Target.</param>
/// <param name="channelId">Channel identifier.</param>
/// <param name="value">Value.</param>
public void SetData(IParameterTexture target, int channelId, byte value)
{
int index = (target.parameterIndex - 1) * _channels + channelId;
if (0 < target.parameterIndex && _data[index] != value)
{
_data[index] = value;
_needUpload = true;
}
}
/// <summary>
/// Sets the data.
/// </summary>
/// <param name="target">Target.</param>
/// <param name="channelId">Channel identifier.</param>
/// <param name="value">Value.</param>
public void SetData(IParameterTexture target, int channelId, float value)
{
SetData(target, channelId, (byte)(Mathf.Clamp01(value) * 255));
}
/// <summary>
/// Registers the material.
/// </summary>
/// <param name="mat">Mat.</param>
public void RegisterMaterial(Material mat)
{
if (_propertyId == 0)
{
_propertyId = Shader.PropertyToID(_propertyName);
}
if (mat)
{
mat.SetTexture(_propertyId, _texture);
}
}
/// <summary>
/// Gets the index of the normalized.
/// </summary>
/// <returns>The normalized index.</returns>
/// <param name="target">Target.</param>
public float GetNormalizedIndex(IParameterTexture target)
{
return ((float)target.parameterIndex - 0.5f) / _instanceLimit;
}
//################################
// Private Members.
//################################
Texture2D _texture;
bool _needUpload;
int _propertyId;
readonly string _propertyName;
readonly int _channels;
readonly int _instanceLimit;
readonly byte[] _data;
readonly Stack<int> _stack;
static List<Action> updates;
/// <summary>
/// Initialize this instance.
/// </summary>
void Initialize()
{
#if UNITY_EDITOR
if (!UnityEditor.EditorApplication.isPlaying && UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode)
{
return;
}
#endif
if (updates == null)
{
updates = new List<Action>();
Canvas.willRenderCanvases += () =>
{
var count = updates.Count;
for (int i = 0; i < count; i++)
{
updates[i].Invoke();
}
};
}
if (!_texture)
{
bool isLinear = QualitySettings.activeColorSpace == ColorSpace.Linear;
_texture = new Texture2D(_channels / 4, _instanceLimit, TextureFormat.RGBA32, false, isLinear);
_texture.filterMode = FilterMode.Point;
_texture.wrapMode = TextureWrapMode.Clamp;
updates.Add(UpdateParameterTexture);
_needUpload = true;
}
}
void UpdateParameterTexture()
{
if (_needUpload && _texture)
{
_needUpload = false;
_texture.LoadRawTextureData(_data);
_texture.Apply(false, false);
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 65eafa89b3a3a494a99e185423ba6cad
timeCreated: 1533006319
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,14 @@
namespace Coffee.UIExtensions
{
/// <summary>
/// Shadow effect style.
/// </summary>
public enum ShadowStyle
{
None = 0,
Shadow,
Outline,
Outline8,
Shadow3,
}
}
@@ -0,0 +1,14 @@
namespace Coffee.UIExtensions
{
/// <summary>
/// Effect mode.
/// </summary>
public enum EffectMode
{
None = 0,
Grayscale = 1,
Sepia = 2,
Nega = 3,
Pixel = 4,
}
}

Some files were not shown because too many files have changed in this diff Show More