Compare commits

...

55 Commits

Author SHA1 Message Date
semantic-release-bot a885fc5bc1 chore(release): 5.10.2 [skip ci]
## [5.10.2](https://github.com/mob-sakai/UIEffect/compare/5.10.1...5.10.2) (2025-10-16)

### Bug Fixes

* [improve performance] code optimization ([e6fb78a](https://github.com/mob-sakai/UIEffect/commit/e6fb78a0f67ed6f70be08259f674ab2f83364bd7))
2025-10-16 08:11:18 +00:00
mob-sakai 4fdd9636fa chore: update workflow 2025-10-15 18:25:44 +09:00
mob-sakai 06a280ec5a style: format 2025-10-15 17:33:55 +09:00
45375dfhg e6fb78a0f6 fix: [improve performance] code optimization 2025-10-15 12:40:14 +09:00
semantic-release-bot 451cbe4302 chore(release): 5.10.1 [skip ci]
## [5.10.1](https://github.com/mob-sakai/UIEffect/compare/5.10.0...5.10.1) (2025-10-06)

### Bug Fixes

* [improve performance] `UpdateViewMatrix` is called even though (direct-)parent canvas is disabled ([533d7b8](https://github.com/mob-sakai/UIEffect/commit/533d7b8c0a33871b1849fbda862d4fa1899822f4)), closes [#373](https://github.com/mob-sakai/UIEffect/issues/373)
2025-10-06 07:00:33 +00:00
mob-sakai 3cae638bdd chore: game-ci/unity-builder action no longer supports .Net3.5 2025-10-06 15:06:00 +09:00
mob-sakai 533d7b8c0a fix: [improve performance] UpdateViewMatrix is called even though (direct-)parent canvas is disabled
close #373
2025-10-06 10:23:40 +09:00
semantic-release-bot 9380f96572 chore(release): 5.10.0 [skip ci]
# [5.10.0](https://github.com/mob-sakai/UIEffect/compare/5.9.7...5.10.0) (2025-09-26)

### Bug Fixes

* `TmpProxy` causes loss of modifications from other `IMeshModifiers` ([c4202b4](https://github.com/mob-sakai/UIEffect/commit/c4202b45d28fa84567a5671baaef8fa3e3df85dc)), closes [#371](https://github.com/mob-sakai/UIEffect/issues/371)
* display may disappear when using TMP SubMesh (multi-language or sprites, etc.) ([b4adb32](https://github.com/mob-sakai/UIEffect/commit/b4adb325120eeed64af1d9cb2468a1e1e8e10812)), closes [#372](https://github.com/mob-sakai/UIEffect/issues/372)
* TMP Text sprite submesh lost when changing fontMaterial ([59874dd](https://github.com/mob-sakai/UIEffect/commit/59874ddffe356f927dc8ff9b157c54043e149522)), closes [#368](https://github.com/mob-sakai/UIEffect/issues/368)

### Features

* [improve performance] merged apply_color function and reduced shader compilation size ([ce69258](https://github.com/mob-sakai/UIEffect/commit/ce692580a33c0c433fd7fadb64a3dcda0121b2ff))
* [improve performance] various view matrices are only updated when necessary ([6c808aa](https://github.com/mob-sakai/UIEffect/commit/6c808aa3417450fd1ce0fc6fbfe0adffdff9a79a))
2025-09-26 08:30:19 +00:00
mob-sakai b4adb32512 fix: display may disappear when using TMP SubMesh (multi-language or sprites, etc.)
close #372
2025-09-26 09:17:33 +09:00
mob-sakai 59874ddffe fix: TMP Text sprite submesh lost when changing fontMaterial
close #368
2025-09-25 19:26:50 +09:00
mob-sakai c4202b45d2 fix: TmpProxy causes loss of modifications from other IMeshModifiers
close #371
2025-09-25 19:25:58 +09:00
mob-sakai ce692580a3 feat: [improve performance] merged apply_color function and reduced shader compilation size 2025-09-01 19:06:48 +09:00
mob-sakai 6c808aa341 feat: [improve performance] various view matrices are only updated when necessary 2025-09-01 19:05:02 +09:00
semantic-release-bot a975cf347a chore(release): 5.9.7 [skip ci]
## [5.9.7](https://github.com/mob-sakai/UIEffect/compare/5.9.6...5.9.7) (2025-09-01)

### Bug Fixes

* edges of `TransitionFilter.Shiny` appear sharp ([b077d97](https://github.com/mob-sakai/UIEffect/commit/b077d97ed706acbbdd3b20e765ec0552fa464f9b)), closes [#366](https://github.com/mob-sakai/UIEffect/issues/366)
* error message sometimes after importing assets ([3207105](https://github.com/mob-sakai/UIEffect/commit/3207105a067801696de789d282c74a93b798ed57)), closes [#365](https://github.com/mob-sakai/UIEffect/issues/365)
* flickering issue when scale Y changes when used `ShadowMode` with TextMeshPro ([4cca2fb](https://github.com/mob-sakai/UIEffect/commit/4cca2fb5ab34ea454ff8df3def5f1730a71a198c)), closes [#367](https://github.com/mob-sakai/UIEffect/issues/367)
* skip monitoring TMP objects that can ignore Y-axis scaling ([d1adb33](https://github.com/mob-sakai/UIEffect/commit/d1adb33884971aa7d6c473fcd08cdf25e58cd261))
2025-09-01 08:50:42 +00:00
mob-sakai 3207105a06 fix: error message sometimes after importing assets
close #365
2025-08-21 16:37:40 +09:00
mob-sakai 4cca2fb5ab fix: flickering issue when scale Y changes when used ShadowMode with TextMeshPro
close #367
2025-08-21 13:11:57 +09:00
mob-sakai d1adb33884 fix: skip monitoring TMP objects that can ignore Y-axis scaling 2025-08-20 08:48:07 +09:00
mob-sakai b077d97ed7 fix: edges of TransitionFilter.Shiny appear sharp
close #366
2025-08-20 08:38:58 +09:00
semantic-release-bot 6f90044ec8 chore(release): 5.9.6 [skip ci]
## [5.9.6](https://github.com/mob-sakai/UIEffect/compare/5.9.5...5.9.6) (2025-07-17)

### Bug Fixes

* `ColorFilter` does not output intended color when vertex color is not white ([9dffdb0](https://github.com/mob-sakai/UIEffect/commit/9dffdb0ed88750a915fdd5e437b79ab766ce45c2)), closes [#363](https://github.com/mob-sakai/UIEffect/issues/363)
* draw calls increase even when using `UIEffectReplica` ([83128eb](https://github.com/mob-sakai/UIEffect/commit/83128ebb09305e4c15a58968a94550179e96ffac)), closes [#364](https://github.com/mob-sakai/UIEffect/issues/364)
2025-07-17 10:23:05 +00:00
mob-sakai 83128ebb09 fix: draw calls increase even when using UIEffectReplica
The `UIEffectReplica` component reuses materials as much as possible without creating new ones.
close #364
2025-07-17 19:17:15 +09:00
mob-sakai 9dffdb0ed8 fix: ColorFilter does not output intended color when vertex color is not white
close #363
2025-07-09 20:03:24 +09:00
semantic-release-bot 16be53e145 chore(release): 5.9.5 [skip ci]
## [5.9.5](https://github.com/mob-sakai/UIEffect/compare/5.9.4...5.9.5) (2025-06-26)

### Bug Fixes

* `GetGradientKeys` and `GetTransitionGradientKeys` cannot get GradientMode ([fd2d1b8](https://github.com/mob-sakai/UIEffect/commit/fd2d1b80592ac4ea62e15b6150be63964b113fa2)), closes [#358](https://github.com/mob-sakai/UIEffect/issues/358)
2025-06-26 07:26:57 +00:00
mob-sakai fd2d1b8059 fix: GetGradientKeys and GetTransitionGradientKeys cannot get GradientMode
close #358
2025-06-26 16:25:24 +09:00
semantic-release-bot cf43bfffb9 chore(release): 5.9.4 [skip ci]
## [5.9.4](https://github.com/mob-sakai/UIEffect/compare/5.9.3...5.9.4) (2025-06-25)

### Bug Fixes

* colors specified in UIEffect are output differently in linear color space ([0d7fb1e](https://github.com/mob-sakai/UIEffect/commit/0d7fb1eb63881b67f2658567750a83c92187df35)), closes [#359](https://github.com/mob-sakai/UIEffect/issues/359)
2025-06-25 23:17:34 +00:00
mob-sakai a2f4a2d5c9 refactor 2025-06-26 08:13:17 +09:00
mob-sakai 0d7fb1eb63 fix: colors specified in UIEffect are output differently in linear color space
close #359
2025-06-26 08:11:21 +09:00
semantic-release-bot 145f56968a chore(release): 5.9.3 [skip ci]
## [5.9.3](https://github.com/mob-sakai/UIEffect/compare/5.9.2...5.9.3) (2025-06-23)

### Bug Fixes

* add `GetGradientKeys` and `GetTransitionGradientKeys` APIs ([a0c3e49](https://github.com/mob-sakai/UIEffect/commit/a0c3e4997af181ae16744c53ad3867e2106ccff3)), closes [#358](https://github.com/mob-sakai/UIEffect/issues/358)
* support world canvas without UI events ([cadbb8d](https://github.com/mob-sakai/UIEffect/commit/cadbb8d68d17a2ec7e2d6e8e885d711e61fa53af)), closes [#356](https://github.com/mob-sakai/UIEffect/issues/356) [#357](https://github.com/mob-sakai/UIEffect/issues/357)
2025-06-23 09:29:53 +00:00
mob-sakai cadbb8d68d fix: support world canvas without UI events
close #356, close #357
2025-06-23 18:15:58 +09:00
mob-sakai a0c3e4997a fix: add GetGradientKeys and GetTransitionGradientKeys APIs
close #358
2025-06-23 18:15:08 +09:00
semantic-release-bot ec57c2a994 chore(release): 5.9.2 [skip ci]
## [5.9.2](https://github.com/mob-sakai/UIEffect/compare/5.9.1...5.9.2) (2025-06-12)

### Bug Fixes

* TextMeshPro 3.2.0-pre support ([804b48c](https://github.com/mob-sakai/UIEffect/commit/804b48c73ec648eaceb720cb79551fdbf3729fc9)), closes [#355](https://github.com/mob-sakai/UIEffect/issues/355)
2025-06-12 11:51:05 +00:00
mob-sakai 804b48c73e fix: TextMeshPro 3.2.0-pre support
close #355
2025-06-12 20:49:32 +09:00
semantic-release-bot 01be18bb28 chore(release): 5.9.1 [skip ci]
## [5.9.1](https://github.com/mob-sakai/UIEffect/compare/5.9.0...5.9.1) (2025-06-11)

### Bug Fixes

* prefabs will be deselected when editing them ([8addbad](https://github.com/mob-sakai/UIEffect/commit/8addbad4941340807d824e295280473d197d889f)), closes [#354](https://github.com/mob-sakai/UIEffect/issues/354)
2025-06-11 09:15:00 +00:00
mob-sakai 8addbad494 fix: prefabs will be deselected when editing them
close #354
2025-06-11 18:11:58 +09:00
mob-sakai dc5b3805d7 docs: update readme 2025-06-09 20:12:33 +09:00
semantic-release-bot bbb5ae0f3e chore(release): 5.9.0 [skip ci]
# [5.9.0](https://github.com/mob-sakai/UIEffect/compare/5.8.7...5.9.0) (2025-06-09)

### Bug Fixes

* `GradationMode.RadialFast` and `GradationMode.RadialDetail` are obsolete ([1a923dd](https://github.com/mob-sakai/UIEffect/commit/1a923dd72c263de5480d71bd17b697feca317ef1))
* soft masking not working with `DetailFilter.Masking` ([ffdeaa7](https://github.com/mob-sakai/UIEffect/commit/ffdeaa7e2f1c2a9ccb7eb21d5674e2c19021aef9))

### Features

* `GradationGradient` supports HDR color ([50f6b3c](https://github.com/mob-sakai/UIEffect/commit/50f6b3c5d20b93a2245f6d54b6eb4bc13565c3b5))
* add `Clear` method to reset properties via script ([264c453](https://github.com/mob-sakai/UIEffect/commit/264c453bb6ebad08ef950b0cec2f38e60a1710d8)), closes [#337](https://github.com/mob-sakai/UIEffect/issues/337)
* add `GradationMode.RadialGradient` feature ([179ec89](https://github.com/mob-sakai/UIEffect/commit/179ec89a0215af9d8046e150d98fa06371155e93)), closes [#348](https://github.com/mob-sakai/UIEffect/issues/348)
* add `GradationReverse` option for gradient ([c0fec32](https://github.com/mob-sakai/UIEffect/commit/c0fec32d502ec1f9d03172ed200f4d9233506eb9)), closes [#348](https://github.com/mob-sakai/UIEffect/issues/348)
* add `GradationWrapMode` option ([f98929d](https://github.com/mob-sakai/UIEffect/commit/f98929d7e9656b4c02d5545b3893748c963d1118))
* add `TransitionFilter.Blaze` feature ([ed4716d](https://github.com/mob-sakai/UIEffect/commit/ed4716d7ada102fe0053480941925e9f27b1c2c3))
* add new built-in presets ([4f2c9f1](https://github.com/mob-sakai/UIEffect/commit/4f2c9f12b5e115bab1418a7a0b1187269a041fc4))
* improve performance for TextMeshPro ([6af520e](https://github.com/mob-sakai/UIEffect/commit/6af520ed408f2e5eb4d84ec0df484338719ebc8e))
* timeline package support ([742a5cd](https://github.com/mob-sakai/UIEffect/commit/742a5cd8dc47500de4b111a132d7a8b242844342)), closes [#347](https://github.com/mob-sakai/UIEffect/issues/347)
* update shaders in samples ([4c6cd11](https://github.com/mob-sakai/UIEffect/commit/4c6cd11d86582f2351c40374180828ad1c8955c3))
2025-06-09 09:36:30 +00:00
mob-sakai ffdeaa7e2f fix: soft masking not working with DetailFilter.Masking 2025-06-09 18:35:23 +09:00
mob-sakai f879424b3f chore: update samples 2025-06-09 18:35:23 +09:00
mob-sakai effdd6d06e chore: update dev proj 2025-06-09 18:35:23 +09:00
mob-sakai b39ba58a85 docs: update readme 2025-06-09 18:35:23 +09:00
mob-sakai 742a5cd8dc feat: timeline package support
Tracks for changing properties have been added. Also, `ControlTrack` enables `UIEffect` only within the clip.

close #347
2025-06-09 18:13:20 +09:00
mob-sakai 1a923dd72c fix: GradationMode.RadialFast and GradationMode.RadialDetail are obsolete
Use `GradationMode.Radial` instead.
2025-06-09 18:11:34 +09:00
mob-sakai c0fec32d50 feat: add GradationReverse option for gradient
close #348
2025-06-09 18:11:33 +09:00
mob-sakai 4f2c9f12b5 feat: add new built-in presets 2025-06-09 17:11:08 +09:00
mob-sakai 264c453bb6 feat: add Clear method to reset properties via script
close #337
2025-06-09 17:11:08 +09:00
mob-sakai 4c6cd11d86 feat: update shaders in samples
NOTE: Imported samples will be automatically updated.
2025-06-09 17:11:08 +09:00
mob-sakai 50f6b3c5d2 feat: GradationGradient supports HDR color 2025-06-09 17:11:08 +09:00
mob-sakai f98929d7e9 feat: add GradationWrapMode option 2025-06-09 17:11:08 +09:00
mob-sakai 179ec89a02 feat: add GradationMode.RadialGradient feature
close #348
2025-06-09 17:11:08 +09:00
mob-sakai ed4716d7ad feat: add TransitionFilter.Blaze feature 2025-06-09 17:11:08 +09:00
mob-sakai 6af520ed40 feat: improve performance for TextMeshPro 2025-06-09 17:11:08 +09:00
semantic-release-bot 9b1af29cd4 chore(release): 5.8.7 [skip ci]
## [5.8.7](https://github.com/mob-sakai/UIEffect/compare/5.8.6...5.8.7) (2025-06-09)

### Bug Fixes

* `GradationGradient` and `TransitionGradient` in reprica will be not dirty (editor) ([58b197e](https://github.com/mob-sakai/UIEffect/commit/58b197e551aea8efca10e12da8df132853d4a24e))
* changes not reflected in rendering when TextMeshPro is cleared ([f508eb3](https://github.com/mob-sakai/UIEffect/commit/f508eb32caf6757eb4c27b98ac29a1582dcd14b4)), closes [#351](https://github.com/mob-sakai/UIEffect/issues/351)
* setting `gradationScale` to 0 throws `DivideByZeroException` ([ecd265e](https://github.com/mob-sakai/UIEffect/commit/ecd265e4828c7f81c96a76c16df147b6c4804429))
2025-06-09 08:10:01 +00:00
mob-sakai 65a00b480f chore: update test workflow 2025-06-09 16:16:31 +09:00
mob-sakai f508eb32ca fix: changes not reflected in rendering when TextMeshPro is cleared
close #351
2025-06-09 16:16:30 +09:00
mob-sakai ecd265e482 fix: setting gradationScale to 0 throws DivideByZeroException 2025-06-09 16:16:30 +09:00
mob-sakai 58b197e551 fix: GradationGradient and TransitionGradient in reprica will be not dirty (editor) 2025-06-09 16:14:30 +09:00
191 changed files with 14737 additions and 11275 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
tag: ${{ steps.release.outputs.new_release_git_tag }}
steps:
- name: 🚚 Checkout (${{ github.ref_name }})
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🔖 Run semantic release
uses: cycjimmy/semantic-release-action@v4
+11 -10
View File
@@ -9,7 +9,7 @@ env:
# MINIMUM_VERSION: The minimum version of Unity.
MINIMUM_VERSION: 6000.0
# EXCLUDE_FILTER: The excluded versions of Unity.
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.2|2023.3)"
EXCLUDE_FILTER: "(2017|2018)"
PROJECT_PATH: UIEffectURP
on:
@@ -46,7 +46,7 @@ jobs:
id: setup
run: |
echo "==== Target Unity Versions ===="
LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
LATEST_VERSIONS=`npx unity-changeset@latest 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
@@ -72,11 +72,11 @@ jobs:
steps:
- name: 🚚 Checkout ($${{ github.ref }})
if: github.event_name == 'push'
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🚚 Checkout pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
@@ -86,19 +86,20 @@ jobs:
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
git rebase ${{ github.event.pull_request.base.sha }}
git log --oneline -n 10
- name: 📥 Cache library
uses: actions/cache@v4
with:
path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ env.PROJECT_PATH }}/Library
key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
restore-keys: |
Library-${{ matrix.unityVersion }}-
Library-
${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-
${{ env.PROJECT_PATH }}-Library-
- name: 🛠️ Build Unity Project (Test)
uses: game-ci/unity-builder@v4
uses: game-ci/unity-builder@main
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
+11 -10
View File
@@ -9,7 +9,7 @@ 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.2|2023.3)"
EXCLUDE_FILTER: "(2017|2018|2023.3)"
PROJECT_PATH: .
on:
@@ -46,7 +46,7 @@ jobs:
id: setup
run: |
echo "==== Target Unity Versions ===="
LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
LATEST_VERSIONS=`npx unity-changeset@latest 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
@@ -72,11 +72,11 @@ jobs:
steps:
- name: 🚚 Checkout ($${{ github.ref }})
if: github.event_name == 'push'
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: 🚚 Checkout pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
@@ -86,19 +86,20 @@ jobs:
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
git rebase ${{ github.event.pull_request.base.sha }}
git log --oneline -n 10
- name: 📥 Cache library
uses: actions/cache@v4
with:
path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
path: ${{ env.PROJECT_PATH }}/Library
key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
restore-keys: |
Library-${{ matrix.unityVersion }}-
Library-
${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-
${{ env.PROJECT_PATH }}-Library-
- name: 🛠️ Build Unity Project (Test)
uses: game-ci/unity-builder@v4
uses: game-ci/unity-builder@main
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
File diff suppressed because it is too large Load Diff
@@ -31,6 +31,8 @@ ShaderVariantCollection:
passType: 0
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_BLAZE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_BURN UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_DISSOLVE UNDERLAY_ON
@@ -72,6 +74,8 @@ ShaderVariantCollection:
passType: 0
- keywords: DETAIL_MULTIPLY
passType: 0
- keywords: DETAIL_MULTIPLY GRADATION_GRADIENT
passType: 0
- keywords: DETAIL_MULTIPLY_ADDITIVE
passType: 0
- keywords: DETAIL_REPLACE
@@ -126,6 +130,10 @@ ShaderVariantCollection:
passType: 0
- keywords: TONE_SEPIA
passType: 0
- keywords: TRANSITION_BLAZE
passType: 0
- keywords: TRANSITION_BLAZE UNITY_UI_CLIP_RECT
passType: 0
- keywords: TRANSITION_BURN
passType: 0
- keywords: TRANSITION_BURN UNITY_UI_CLIP_RECT
+114
View File
@@ -1,3 +1,117 @@
## [5.10.2](https://github.com/mob-sakai/UIEffect/compare/5.10.1...5.10.2) (2025-10-16)
### Bug Fixes
* [improve performance] code optimization ([e6fb78a](https://github.com/mob-sakai/UIEffect/commit/e6fb78a0f67ed6f70be08259f674ab2f83364bd7))
## [5.10.1](https://github.com/mob-sakai/UIEffect/compare/5.10.0...5.10.1) (2025-10-06)
### Bug Fixes
* [improve performance] `UpdateViewMatrix` is called even though (direct-)parent canvas is disabled ([533d7b8](https://github.com/mob-sakai/UIEffect/commit/533d7b8c0a33871b1849fbda862d4fa1899822f4)), closes [#373](https://github.com/mob-sakai/UIEffect/issues/373)
# [5.10.0](https://github.com/mob-sakai/UIEffect/compare/5.9.7...5.10.0) (2025-09-26)
### Bug Fixes
* `TmpProxy` causes loss of modifications from other `IMeshModifiers` ([c4202b4](https://github.com/mob-sakai/UIEffect/commit/c4202b45d28fa84567a5671baaef8fa3e3df85dc)), closes [#371](https://github.com/mob-sakai/UIEffect/issues/371)
* display may disappear when using TMP SubMesh (multi-language or sprites, etc.) ([b4adb32](https://github.com/mob-sakai/UIEffect/commit/b4adb325120eeed64af1d9cb2468a1e1e8e10812)), closes [#372](https://github.com/mob-sakai/UIEffect/issues/372)
* TMP Text sprite submesh lost when changing fontMaterial ([59874dd](https://github.com/mob-sakai/UIEffect/commit/59874ddffe356f927dc8ff9b157c54043e149522)), closes [#368](https://github.com/mob-sakai/UIEffect/issues/368)
### Features
* [improve performance] merged apply_color function and reduced shader compilation size ([ce69258](https://github.com/mob-sakai/UIEffect/commit/ce692580a33c0c433fd7fadb64a3dcda0121b2ff))
* [improve performance] various view matrices are only updated when necessary ([6c808aa](https://github.com/mob-sakai/UIEffect/commit/6c808aa3417450fd1ce0fc6fbfe0adffdff9a79a))
## [5.9.7](https://github.com/mob-sakai/UIEffect/compare/5.9.6...5.9.7) (2025-09-01)
### Bug Fixes
* edges of `TransitionFilter.Shiny` appear sharp ([b077d97](https://github.com/mob-sakai/UIEffect/commit/b077d97ed706acbbdd3b20e765ec0552fa464f9b)), closes [#366](https://github.com/mob-sakai/UIEffect/issues/366)
* error message sometimes after importing assets ([3207105](https://github.com/mob-sakai/UIEffect/commit/3207105a067801696de789d282c74a93b798ed57)), closes [#365](https://github.com/mob-sakai/UIEffect/issues/365)
* flickering issue when scale Y changes when used `ShadowMode` with TextMeshPro ([4cca2fb](https://github.com/mob-sakai/UIEffect/commit/4cca2fb5ab34ea454ff8df3def5f1730a71a198c)), closes [#367](https://github.com/mob-sakai/UIEffect/issues/367)
* skip monitoring TMP objects that can ignore Y-axis scaling ([d1adb33](https://github.com/mob-sakai/UIEffect/commit/d1adb33884971aa7d6c473fcd08cdf25e58cd261))
## [5.9.6](https://github.com/mob-sakai/UIEffect/compare/5.9.5...5.9.6) (2025-07-17)
### Bug Fixes
* `ColorFilter` does not output intended color when vertex color is not white ([9dffdb0](https://github.com/mob-sakai/UIEffect/commit/9dffdb0ed88750a915fdd5e437b79ab766ce45c2)), closes [#363](https://github.com/mob-sakai/UIEffect/issues/363)
* draw calls increase even when using `UIEffectReplica` ([83128eb](https://github.com/mob-sakai/UIEffect/commit/83128ebb09305e4c15a58968a94550179e96ffac)), closes [#364](https://github.com/mob-sakai/UIEffect/issues/364)
## [5.9.5](https://github.com/mob-sakai/UIEffect/compare/5.9.4...5.9.5) (2025-06-26)
### Bug Fixes
* `GetGradientKeys` and `GetTransitionGradientKeys` cannot get GradientMode ([fd2d1b8](https://github.com/mob-sakai/UIEffect/commit/fd2d1b80592ac4ea62e15b6150be63964b113fa2)), closes [#358](https://github.com/mob-sakai/UIEffect/issues/358)
## [5.9.4](https://github.com/mob-sakai/UIEffect/compare/5.9.3...5.9.4) (2025-06-25)
### Bug Fixes
* colors specified in UIEffect are output differently in linear color space ([0d7fb1e](https://github.com/mob-sakai/UIEffect/commit/0d7fb1eb63881b67f2658567750a83c92187df35)), closes [#359](https://github.com/mob-sakai/UIEffect/issues/359)
## [5.9.3](https://github.com/mob-sakai/UIEffect/compare/5.9.2...5.9.3) (2025-06-23)
### Bug Fixes
* add `GetGradientKeys` and `GetTransitionGradientKeys` APIs ([a0c3e49](https://github.com/mob-sakai/UIEffect/commit/a0c3e4997af181ae16744c53ad3867e2106ccff3)), closes [#358](https://github.com/mob-sakai/UIEffect/issues/358)
* support world canvas without UI events ([cadbb8d](https://github.com/mob-sakai/UIEffect/commit/cadbb8d68d17a2ec7e2d6e8e885d711e61fa53af)), closes [#356](https://github.com/mob-sakai/UIEffect/issues/356) [#357](https://github.com/mob-sakai/UIEffect/issues/357)
## [5.9.2](https://github.com/mob-sakai/UIEffect/compare/5.9.1...5.9.2) (2025-06-12)
### Bug Fixes
* TextMeshPro 3.2.0-pre support ([804b48c](https://github.com/mob-sakai/UIEffect/commit/804b48c73ec648eaceb720cb79551fdbf3729fc9)), closes [#355](https://github.com/mob-sakai/UIEffect/issues/355)
## [5.9.1](https://github.com/mob-sakai/UIEffect/compare/5.9.0...5.9.1) (2025-06-11)
### Bug Fixes
* prefabs will be deselected when editing them ([8addbad](https://github.com/mob-sakai/UIEffect/commit/8addbad4941340807d824e295280473d197d889f)), closes [#354](https://github.com/mob-sakai/UIEffect/issues/354)
# [5.9.0](https://github.com/mob-sakai/UIEffect/compare/5.8.7...5.9.0) (2025-06-09)
### Bug Fixes
* `GradationMode.RadialFast` and `GradationMode.RadialDetail` are obsolete ([1a923dd](https://github.com/mob-sakai/UIEffect/commit/1a923dd72c263de5480d71bd17b697feca317ef1))
* soft masking not working with `DetailFilter.Masking` ([ffdeaa7](https://github.com/mob-sakai/UIEffect/commit/ffdeaa7e2f1c2a9ccb7eb21d5674e2c19021aef9))
### Features
* `GradationGradient` supports HDR color ([50f6b3c](https://github.com/mob-sakai/UIEffect/commit/50f6b3c5d20b93a2245f6d54b6eb4bc13565c3b5))
* add `Clear` method to reset properties via script ([264c453](https://github.com/mob-sakai/UIEffect/commit/264c453bb6ebad08ef950b0cec2f38e60a1710d8)), closes [#337](https://github.com/mob-sakai/UIEffect/issues/337)
* add `GradationMode.RadialGradient` feature ([179ec89](https://github.com/mob-sakai/UIEffect/commit/179ec89a0215af9d8046e150d98fa06371155e93)), closes [#348](https://github.com/mob-sakai/UIEffect/issues/348)
* add `GradationReverse` option for gradient ([c0fec32](https://github.com/mob-sakai/UIEffect/commit/c0fec32d502ec1f9d03172ed200f4d9233506eb9)), closes [#348](https://github.com/mob-sakai/UIEffect/issues/348)
* add `GradationWrapMode` option ([f98929d](https://github.com/mob-sakai/UIEffect/commit/f98929d7e9656b4c02d5545b3893748c963d1118))
* add `TransitionFilter.Blaze` feature ([ed4716d](https://github.com/mob-sakai/UIEffect/commit/ed4716d7ada102fe0053480941925e9f27b1c2c3))
* add new built-in presets ([4f2c9f1](https://github.com/mob-sakai/UIEffect/commit/4f2c9f12b5e115bab1418a7a0b1187269a041fc4))
* improve performance for TextMeshPro ([6af520e](https://github.com/mob-sakai/UIEffect/commit/6af520ed408f2e5eb4d84ec0df484338719ebc8e))
* timeline package support ([742a5cd](https://github.com/mob-sakai/UIEffect/commit/742a5cd8dc47500de4b111a132d7a8b242844342)), closes [#347](https://github.com/mob-sakai/UIEffect/issues/347)
* update shaders in samples ([4c6cd11](https://github.com/mob-sakai/UIEffect/commit/4c6cd11d86582f2351c40374180828ad1c8955c3))
## [5.8.7](https://github.com/mob-sakai/UIEffect/compare/5.8.6...5.8.7) (2025-06-09)
### Bug Fixes
* `GradationGradient` and `TransitionGradient` in reprica will be not dirty (editor) ([58b197e](https://github.com/mob-sakai/UIEffect/commit/58b197e551aea8efca10e12da8df132853d4a24e))
* changes not reflected in rendering when TextMeshPro is cleared ([f508eb3](https://github.com/mob-sakai/UIEffect/commit/f508eb32caf6757eb4c27b98ac29a1582dcd14b4)), closes [#351](https://github.com/mob-sakai/UIEffect/issues/351)
* setting `gradationScale` to 0 throws `DivideByZeroException` ([ecd265e](https://github.com/mob-sakai/UIEffect/commit/ecd265e4828c7f81c96a76c16df147b6c4804429))
## [5.8.6](https://github.com/mob-sakai/UIEffect/compare/5.8.5...5.8.6) (2025-05-22)
@@ -3,7 +3,9 @@
"rootNamespace": "",
"references": [
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:735c8f008d0ad4caa9cdc4306f1c3042"
"GUID:735c8f008d0ad4caa9cdc4306f1c3042",
"GUID:f06555f75b070af458a003d92f9efb00",
"GUID:02f771204943f4a40949438e873e3eff"
],
"includePlatforms": [
"Editor"
@@ -24,6 +26,11 @@
"name": "com.unity.ugui",
"expression": "2.0.0",
"define": "TMP_ENABLE"
},
{
"name": "com.unity.timeline",
"expression": "1.0.0",
"define": "TIMELINE_ENABLE"
}
],
"noEngineReferences": false
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3150c4c70d45b46d389368100b181ee4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,183 @@
#if TIMELINE_ENABLE
using System;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEditor.Timeline;
using UnityEngine;
using UnityEngine.Timeline;
namespace Coffee.UIEffects.Timeline
{
public abstract class UIEffectClipEditor : ClipEditor
{
public override void DrawBackground(TimelineClip clip, ClipBackgroundRegion region)
{
var director = TimelineEditor.inspectedDirector;
if (!director) return;
var viewDuration = region.endTime - region.startTime;
var inDuration = (float)Math.Max(clip.easeInDuration, clip.blendInDuration);
var outDuration = (float)Math.Max(clip.easeOutDuration, clip.blendOutDuration);
inDuration = 0 < inDuration ? Mathf.Max(inDuration - (float)region.startTime, 0) : 0f;
outDuration = 0 < outDuration ? Mathf.Max(outDuration - (float)(clip.duration - region.endTime), 0) : 0f;
var p = region.position;
p.x += p.width * (float)(inDuration / viewDuration);
p.width -= p.width * (float)((inDuration + outDuration) / viewDuration);
DrawBackground(p, clip);
}
public override void OnCreate(TimelineClip clip, TrackAsset track, TimelineClip clonedFrom)
{
clip.displayName = ObjectNames.NicifyVariableName(track.GetType().Name.Replace("Track", ""));
if (clip.asset is UIEffectClip uiEffectClip)
{
uiEffectClip.timelineClip = clip;
}
var floatClip = clip.asset as UIEffectFloatClip;
if (floatClip)
{
if (track is GradationRotationTrack || track is GradationOffsetTrack)
{
floatClip.m_Data.m_From = 0f;
floatClip.m_Data.m_Value = 0f;
}
}
}
protected abstract void DrawBackground(Rect rect, TimelineClip clip);
}
[CustomTimelineEditor(typeof(UIEffectFloatClip))]
public class UIEffectFloatClipEditor : UIEffectClipEditor
{
private static GUIStyle s_FromStyle;
private static GUIStyle s_ToStyle;
protected override void DrawBackground(Rect rect, TimelineClip clip)
{
var asset = clip.asset as UIEffectFloatClip;
if (!asset) return;
if (s_FromStyle == null)
{
s_FromStyle = new GUIStyle(GUI.skin.label) { alignment = TextAnchor.UpperLeft, fontSize = 9 };
s_ToStyle = new GUIStyle(GUI.skin.label) { alignment = TextAnchor.UpperRight, fontSize = 9 };
}
var d = asset.m_Data;
if (d.m_Tween)
{
DrawLabelWithShadow(rect, asset.m_Data.m_From.ToString("F2"), s_FromStyle);
DrawLabelWithShadow(rect, asset.m_Data.m_Value.ToString("F2"), s_ToStyle);
}
else
{
DrawLabelWithShadow(rect, asset.m_Data.m_Value.ToString("F2"), s_FromStyle);
}
}
private static void DrawLabelWithShadow(Rect position, string text, GUIStyle style)
{
GUI.color = Color.black;
EditorGUI.LabelField(position, text, style);
GUI.color = Color.white;
position.x -= 1f;
position.y -= 1f;
EditorGUI.LabelField(position, text, style);
}
}
[CustomTimelineEditor(typeof(UIEffectColorClip))]
public class UIEffectColorClipEditor : UIEffectClipEditor
{
protected override void DrawBackground(Rect p, TimelineClip clip)
{
var asset = clip.asset as UIEffectColorClip;
if (!asset) return;
var d = asset.m_Data;
if (d.m_Tween)
{
EditorGUIUtility.DrawColorSwatch(new Rect(p.x + 2, p.y, 8, 8), d.m_From);
EditorGUIUtility.DrawColorSwatch(new Rect(p.x + p.width - 8, p.y, 8, 8), d.m_Value);
}
else
{
EditorGUIUtility.DrawColorSwatch(new Rect(p.x + 2, p.y, 8, 8), d.m_Value);
}
}
}
[CustomEditor(typeof(UIEffectClip<>), true)]
public class UIEffectClipAssetEditor : Editor
{
private SerializedProperty _tween;
private SerializedProperty _from;
private SerializedProperty _curve;
private SerializedProperty _value;
private FloatClipUsageAttribute _floatUsage;
private ColorClipUsageAttribute _colorUsage;
private GUIContent _label;
private void OnEnable()
{
var data = serializedObject.FindProperty("m_Data");
_tween = data.FindPropertyRelative("m_Tween");
_from = data.FindPropertyRelative("m_From");
_curve = data.FindPropertyRelative("m_Curve");
_value = data.FindPropertyRelative("m_Value");
var clip = target as UIEffectClip;
var type = clip.timelineClip.GetParentTrack().GetType();
_floatUsage = type.GetCustomAttribute<FloatClipUsageAttribute>();
_colorUsage = type.GetCustomAttribute<ColorClipUsageAttribute>();
_label = new GUIContent(ObjectNames.NicifyVariableName(type.Name).Replace(" Track", ""));
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(_tween);
if (_tween.boolValue)
{
EditorGUI.indentLevel++;
DrawProperty(_from, EditorGUIUtility.TrTempContent("From"));
EditorGUILayout.PropertyField(_curve);
EditorGUI.indentLevel--;
}
DrawProperty(_value, _label);
serializedObject.ApplyModifiedProperties();
}
private void DrawProperty(SerializedProperty property, GUIContent label)
{
if (_floatUsage != null)
{
EditorGUILayout.Slider(property, _floatUsage.min, _floatUsage.max, label);
}
else if (property.propertyType == SerializedPropertyType.Color)
{
var hdr = UIEffectProjectSettings.useHdrColorPicker;
var alpha = _colorUsage?.alpha ?? true;
EditorGUI.BeginChangeCheck();
var color = EditorGUILayout.ColorField(label, property.colorValue, true, alpha, hdr);
if (EditorGUI.EndChangeCheck())
{
property.colorValue = color;
}
}
else
{
EditorGUILayout.PropertyField(property, label);
}
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3d108727fec4d48d28c1609b01a3a8c6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -47,6 +47,7 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _transitionColorGlow;
private SerializedProperty _transitionPatternReverse;
private SerializedProperty _transitionAutoPlaySpeed;
private SerializedProperty _transitionGradient;
private SerializedProperty _targetMode;
private SerializedProperty _targetColor;
@@ -80,6 +81,8 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _gradationOffset;
private SerializedProperty _gradationScale;
private SerializedProperty _gradationRotation;
private SerializedProperty _gradationWrapMode;
private SerializedProperty _gradationReverse;
private SerializedProperty _edgeMode;
private SerializedProperty _edgeWidth;
@@ -135,6 +138,7 @@ namespace Coffee.UIEffects.Editors
_transitionColorGlow = serializedObject.FindProperty("m_TransitionColorGlow");
_transitionPatternReverse = serializedObject.FindProperty("m_TransitionPatternReverse");
_transitionAutoPlaySpeed = serializedObject.FindProperty("m_TransitionAutoPlaySpeed");
_transitionGradient = serializedObject.FindProperty("m_TransitionGradient");
s_RotationLabel.tooltip = _transitionRotation.tooltip;
s_KeepAspectRatioLabel.tooltip = _transitionKeepAspectRatio.tooltip;
@@ -181,6 +185,8 @@ namespace Coffee.UIEffects.Editors
_gradationOffset = serializedObject.FindProperty("m_GradationOffset");
_gradationScale = serializedObject.FindProperty("m_GradationScale");
_gradationRotation = serializedObject.FindProperty("m_GradationRotation");
_gradationWrapMode = serializedObject.FindProperty("m_GradationWrapMode");
_gradationReverse = serializedObject.FindProperty("m_GradationReverse");
_detailFilter = serializedObject.FindProperty("m_DetailFilter");
_detailIntensity = serializedObject.FindProperty("m_DetailIntensity");
@@ -269,6 +275,11 @@ namespace Coffee.UIEffects.Editors
EditorGUIUtility.TrTempContent("Pattern Reverse"));
DrawColor(_transitionColorFilter, _transitionColor, null);
}
else if (_transitionFilter.intValue == (int)TransitionFilter.Blaze)
{
EditorGUILayout.PropertyField(_transitionWidth);
DrawGradientField(_transitionGradient);
}
else if (2 < _transitionFilter.intValue)
{
EditorGUILayout.PropertyField(_transitionWidth);
@@ -363,7 +374,12 @@ namespace Coffee.UIEffects.Editors
case GradationMode.HorizontalGradient:
case GradationMode.VerticalGradient:
case GradationMode.AngleGradient:
case GradationMode.RadialGradient:
DrawGradientField(_gradationGradient);
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(_gradationWrapMode, EditorGUIUtility.TrTempContent("Wrap Mode"));
EditorGUILayout.PropertyField(_gradationReverse, EditorGUIUtility.TrTempContent("Reverse"));
EditorGUI.indentLevel--;
break;
case GradationMode.Diagonal:
DrawColorPickerField("Top", _gradationColor1, _gradationColor2);
+44 -16
View File
@@ -7,6 +7,7 @@
![](https://img.shields.io/badge/Unity-6000.0+-57b9d3.svg?style=flat&logo=unity)
![](https://img.shields.io/badge/TextMeshPro_Support-57b9d3.svg?style=flat)
![](https://img.shields.io/badge/ShaderGraph_Support-57b9d3.svg?style=flat)
![](https://img.shields.io/badge/Timeline_Support-57b9d3.svg?style=flat)
![](https://img.shields.io/badge/UPR%2FHDPR_Support-57b9d3.svg?style=flat)
![](https://img.shields.io/badge/VR_Support-57b9d3.svg?style=flat)
[![](https://img.shields.io/github/license/mob-sakai/UIEffect.svg)](https://github.com/mob-sakai/UIEffect/blob/main/LICENSE.md)
@@ -20,9 +21,12 @@
## 📝 Description <!-- omit in toc -->
**_"Decorate your UI, simply and powerfully."_**
UIEffect is an open-source package that allows you to intuitively apply rich Unity UI effects directly from the Inspector or via code.
Combine various filters, such as grayscale, blur, and dissolve, to decorate your UI with a unique visual style!
**_"Decorate your UI, simply and powerfully."_**
UIEffect is a powerful, open-source Unity package that transforms your UI with stunning visual effects.
Apply professional-grade filters like grayscale, blur, and dissolve directly from the Inspector—no coding required!
✨ **Perfect for**: Game developers, UI designers, and anyone looking to enhance their Unity UI with minimal effort
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-title.png)
@@ -55,6 +59,7 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
- [Usage with TextMeshPro](#usage-with-textmeshpro)
- [Usage with SoftMaskForUGUI](#usage-with-softmaskforugui)
- [Usage with ShaderGraph](#usage-with-shadergraph)
- [Usage with Timeline](#usage-with-timeline)
- [Runtime/Editor Preset for UIEffect](#runtimeeditor-preset-for-uieffect)
- [Usage with Code](#usage-with-code)
- [Project Settings](#project-settings)
@@ -88,18 +93,18 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
- **v4 compatible components (optional)**: For easy upgrading with minimal changes, compatible v4 components are available optionally.
- **SoftMaskForUGUI support (optional)**: Compatible with SoftMaskForUGUI for creating soft masks for UI elements. See for more details [here](#usage-with-softmaskforugui).
- **ShaderGraph support (optional)**: Add `Canvas (UIEffect)` sub target (material) for UIEffect shaders. See for more details [here](#usage-with-shadergraph).
- **Timeline support**: Control UIEffect using Timeline with `ControlTrack` and `UIEffect Tracks`. See for more details [here](#usage-with-timeline).
<br><br>
## 🎮 Demo
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-available.png)
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749461316801.png)
<img src="https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-pattern.gif" width="582"/>
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-showcase.png)
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-tmp.png)
[WebGL Demo](https://mob-sakai.github.io/UIEffect/)
[Try the WebGL Demo](https://mob-sakai.github.io/UIEffect/)
<br><br>
@@ -117,7 +122,7 @@ _This package requires **Unity 2020.3 or later**._
```
- To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`:
```
openupm add com.coffee.ui-effect@5.7.0
openupm add com.coffee.ui-effect@5.9.0
```
### Install via UPM (with Package Manager UI)
@@ -126,7 +131,7 @@ _This package requires **Unity 2020.3 or later**._
- Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIEffect.git?path=Packages/src`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/upm-add-from-url.png)
- To update the package, change suffix `#{version}` to the target version.
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.7.0`
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.9.0`
### Install via UPM (Manually)
@@ -141,7 +146,7 @@ _This package requires **Unity 2020.3 or later**._
```
- To update the package, change suffix `#{version}` to the target version.
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.7.0",`
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.9.0",`
### Install as Embedded Package
@@ -198,10 +203,17 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
2. Add a `UIEffect` component to a UI element (Image, RawImage, Text, TextMeshProUGUI, etc...) from the `Add Component` in the inspector or `Component > UI > UIEffect` menu.
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-add-component.png)
3. Adjust the effect filters and parameters in the inspector.
3. Set `Tone Filter` to `Grayscale` and `Tone Intensity` to `1.0`.
<img src="https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749029605043.png" width="480"/>
4. Try other effect filters and parameters in the inspector.
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1744308178360.gif)
4. From the top menu, you can load/append preset.
5. From the top menu, you can load/append preset.
> [!TIP]
> `Load` overwrites all properties with the preset, while `Append` only overwrites enabled filters and modes with the preset.
> You can easily build effects by combining them with `Append`.
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1744800851739.gif)
5. Enjoy!
@@ -256,8 +268,8 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-inspector-transition.png)
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Pattern`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-sample-transition.png)
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Blaze`, `Pattern`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749466907712.gif)
- **Transition Rate**: 0.0 (no effect) - 1.0 (full effect).
- **Transition Tex**: The texture used for the transition filter.
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**, **Reverse**: Additional properties for the texture.
@@ -271,6 +283,7 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
- **Transition Color**: The color of the transition.
- **Transition Color Glow**: Set the transition color to glow.
- **Transition Auto Play Speed**: The speed of the transition animation (using shader side `_Time`). You can use this property to loop the `TransitionRate` without tweener or animation.
- ⚠️ NOTE: This uses scaled time (affected by `Time.timeScale`). If you need unscaled time (useful for pause-resistant effects), use the [UIEffectTweener](#component-uieffecttweener) component instead.
> [!TIP]
> **Transition Tex** applies transitions using its alpha channel.
@@ -325,10 +338,10 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1744305109784.png)
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `Radial`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-sample-gradation.png)
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `Radial`, `RadialGradient`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749461050342.png)
- **Gradation Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`
- **Gradation Gradient**: The gradient of the gradation.
- **Gradation Gradient**: The gradient of the gradation. HDR colors are supported.
- `Blend` and `Fixed` modes are available.
- **Gradation Color 1**: The first color of the gradation.
- **Gradation Color 2**: The second color of the gradation.
@@ -336,6 +349,8 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
- **Gradation Offset**: The offset of the gradation range.
- **Gradation Scale**: The scale of the gradation range.
- **Gradation Rotation** (`Angle` or `AngleGradient` only): The rotation of the gradation range.
- **Gradation Wrap Mode**: `Repaet`, `Clamp`, `Mirror`, `Mirror Once`
- **Gradation Reverse**: Reverse the gradient.
- **Keep Aspect Ratio**:
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
@@ -353,6 +368,7 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
- **Edge Color Glow**: Set the shadow color to glow.
- **Edge Shiny Width**: The width of the edge shiny.
- **Edge Shiny Auto Play Speed**: The speed of the edge shiny (using shader side `_Time`).
- ⚠️ NOTE: This uses scaled time (affected by `Time.timeScale`). If you need unscaled time (useful for pause-resistant effects), use the [UIEffectTweener](#component-uieffecttweener) component instead.
<br>
@@ -515,6 +531,18 @@ To use UIEffect with ShaderGraph, you need to import additional resources.
<br><br>
### Usage with Timeline
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/1749028017092.png)
Timeline is a powerful animation tool that can control UIEffect using `ControlTrack` and UIEffect tracks.
- `Control Track`: One of the built-in tracks. When you assign a GameObject with `UIEffect`, `UIEffect` will be enabled during the clip duration.
- `UIEffect Tracks`: Tracks for UIEffect. They control `float` or `Color` type properties.
- Supports blending, extrapolation, and tween.
<br><br>
### Runtime/Editor Preset for UIEffect
![](https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-inspector-preset.png)
+12 -1
View File
@@ -2,7 +2,8 @@
"name": "Coffee.UIEffect",
"rootNamespace": "",
"references": [
"GUID:6055be8ebefd69e48b49212b09b47b2f"
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:f06555f75b070af458a003d92f9efb00"
],
"includePlatforms": [],
"excludePlatforms": [],
@@ -21,6 +22,16 @@
"name": "com.unity.ugui",
"expression": "2.0.0",
"define": "TMP_ENABLE"
},
{
"name": "com.unity.timeline",
"expression": "1.0.0",
"define": "TIMELINE_ENABLE"
},
{
"name": "com.unity.textmeshpro",
"expression": "[1.0.0,3.2.0-pre.1)",
"define": "LEGACY_TMP_ENABLE"
}
],
"noEngineReferences": false
+7
View File
@@ -59,6 +59,7 @@ namespace Coffee.UIEffects
Mask = 5,
Melt = 6,
Burn = 7,
Blaze = 9,
Pattern = 8
}
@@ -110,8 +111,14 @@ namespace Coffee.UIEffects
HorizontalGradient = 2,
Vertical = 3,
VerticalGradient = 4,
Radial = 5,
[Obsolete]
RadialFast = 5,
[Obsolete]
RadialDetail = 6,
RadialGradient = 12,
Diagonal = 11,
DiagonalToRightBottom = 7,
DiagonalToLeftBottom = 8,
@@ -158,6 +158,8 @@ namespace Coffee.UIEffectInternal
private void OnPlayModeStateChanged(PlayModeStateChange state)
{
if (!this) return;
switch (state)
{
case PlayModeStateChange.ExitingEditMode:
@@ -20,16 +20,18 @@ namespace Coffee.UIEffectInternal
UpdateTmpCgincPath();
}
private static void OnPostprocessAllAssets(string[] _, string[] __, string[] ___, string[] ____)
private static void OnPostprocessAllAssets(string[] imported, string[] __, string[] ___, string[] ____)
{
UpdateTmpCgincPath();
if (imported.Any(x => x.EndsWith(".cginc") || x.EndsWith(".shader")))
{
UpdateTmpCgincPath();
}
}
private static void UpdateTmpCgincPath()
{
if (s_CgincPattern == null || s_ShaderNames == null || s_ShaderNames.Length == 0) return;
AssetDatabase.StartAssetEditing();
string[] cgincs = null;
foreach (var shaderName in s_ShaderNames)
{
@@ -47,8 +49,6 @@ namespace Coffee.UIEffectInternal
UpdateTmpCgincPath(shader, cgincs);
}
AssetDatabase.StopAssetEditing();
}
private static void UpdateTmpCgincPath(Shader shader, string[] cgincs)
@@ -6,7 +6,7 @@ namespace Coffee.UIEffectInternal
/// <summary>
/// Object pool.
/// </summary>
internal class InternalObjectPool<T> where T : class
internal sealed class InternalObjectPool<T> where T : class
{
#if UNITY_2021_1_OR_NEWER
private readonly Predicate<T> _onValid; // Delegate for checking if instances are valid
@@ -6,6 +6,7 @@ using UnityEngine.Profiling;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEditorInternal;
@@ -16,7 +17,7 @@ using Object = UnityEngine.Object;
namespace Coffee.UIEffectInternal
{
[Serializable]
public class ShaderVariantRegistry
public sealed class ShaderVariantRegistry
{
[Serializable]
internal class StringPair : IEquatable<StringPair>
@@ -26,9 +27,7 @@ namespace Coffee.UIEffectInternal
public bool Equals(StringPair other)
{
if (other == null) return false;
if (ReferenceEquals(this, other)) return true;
return key == other.key && value == other.value;
return other != null && key == other.key && value == other.value;
}
public override bool Equals(object obj)
@@ -88,15 +87,15 @@ namespace Coffee.UIEffectInternal
// Find optional shader.
Shader optionalShader;
foreach (var pair in m_OptionalShaders)
var count = m_OptionalShaders.Count;
for (var i = 0; i < count; i++)
{
var pair = m_OptionalShaders[i];
if (pair.key != shaderName) continue;
optionalShader = Shader.Find(pair.value);
if (optionalShader)
{
_cachedOptionalShaders[id] = pair.value;
return optionalShader;
}
if (!optionalShader) continue;
_cachedOptionalShaders[id] = pair.value;
return optionalShader;
}
// Find optional shader by format.
@@ -122,10 +121,15 @@ namespace Coffee.UIEffectInternal
#if UNITY_EDITOR
private readonly HashSet<StringPair> _logVariants = new HashSet<StringPair>();
private readonly StringBuilder _sb = new StringBuilder(1024);
private readonly Dictionary<Hash128, (ShaderVariantCollection.ShaderVariant, StringPair)> _cachedVariants =
new Dictionary<Hash128, (ShaderVariantCollection.ShaderVariant, StringPair)>();
public void ClearCache()
{
_cachedOptionalShaders.Clear();
_cachedVariants.Clear();
}
/// <summary>
@@ -213,21 +217,10 @@ namespace Coffee.UIEffectInternal
if (!material || !material.shader || !m_Asset) return;
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] RegisterVariant");
var shaderName = material.shader.name;
var validKeywords = material.shaderKeywords
.Where(x => !Regex.IsMatch(x, "(_EDITOR|EDITOR_)"))
.ToArray();
var keywords = string.Join(" ", validKeywords);
var variant = new ShaderVariantCollection.ShaderVariant
{
shader = material.shader,
keywords = validKeywords
};
// Already registered.
var pair = new StringPair() { key = shaderName, value = keywords };
var (variant, pair) = GetVariant(material);
if (m_Asset.Contains(variant))
{
// Already registered.
m_UnregisteredVariants.Remove(pair);
Profiler.EndSample();
return;
@@ -243,7 +236,8 @@ namespace Coffee.UIEffectInternal
if (_logVariants.Add(pair))
{
keywords = string.IsNullOrEmpty(keywords) ? "no keywords" : keywords;
var shaderName = pair.key;
var keywords = string.IsNullOrEmpty(pair.value) ? "no keywords" : pair.value;
Debug.LogError($"Shader variant '{shaderName} <{keywords}>' is not registered.\n" +
$"Register it in 'ProjectSettings > {path}' to use it in player.", m_Asset);
}
@@ -256,6 +250,44 @@ namespace Coffee.UIEffectInternal
m_UnregisteredVariants.Remove(pair);
Profiler.EndSample();
}
private (ShaderVariantCollection.ShaderVariant, StringPair) GetVariant(Material material)
{
Profiler.BeginSample("(EDITOR/COF)[ShaderVariantRegistry] GetVariant");
var shader = material.shader;
_sb.Length = 0;
foreach (var keyword in material.shaderKeywords)
{
// Ignore editor keyword.
if (keyword.Contains("_EDITOR") || keyword.Contains("EDITOR_")) continue;
_sb.Append(keyword);
_sb.Append(' ');
}
if (0 < _sb.Length)
{
_sb.Length--; // Remove last space.
}
var hash = new Hash128((uint)shader.GetInstanceID(), (uint)_sb.GetHashCode(), 0, 0);
if (_cachedVariants.TryGetValue(hash, out var result))
{
Profiler.EndSample();
return result;
}
var pair = new StringPair() { key = shader.name, value = _sb.ToString() };
var variant = new ShaderVariantCollection.ShaderVariant
{
shader = shader,
keywords = pair.value.Split(' ')
};
_cachedVariants.Add(hash, (variant, pair));
Profiler.EndSample();
return (variant, pair);
}
#endif
}
@@ -2,6 +2,7 @@ using System;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using System.Reflection;
namespace Coffee.UIEffectInternal
{
@@ -67,7 +68,15 @@ namespace Coffee.UIEffectInternal
if (s_IsInitializedAfterCanvasRebuild) return;
s_IsInitializedAfterCanvasRebuild = true;
// Explicitly set `Canvas.willRenderCanvases += CanvasUpdateRegistry.PerformUpdate`.
CanvasUpdateRegistry.IsRebuildingLayout();
#if TMP_ENABLE
// Explicitly set `Canvas.willRenderCanvases += TMP_UpdateManager.DoRebuilds`.
typeof(TMPro.TMP_UpdateManager)
.GetProperty("instance", BindingFlags.NonPublic | BindingFlags.Static)
.GetValue(null);
#endif
Canvas.willRenderCanvases -= OnAfterCanvasRebuild;
Canvas.willRenderCanvases += OnAfterCanvasRebuild;
Logging.LogMulticast(typeof(Canvas), "willRenderCanvases",
message: "InitializeAfterCanvasRebuild");
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3278a8b3cb92d4cc69862f0d45f150ad
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 014b76346c11643a89303ed3b5681733
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,44 @@
#if TIMELINE_ENABLE
using System;
using System.ComponentModel;
using UnityEngine;
namespace Coffee.UIEffects.Timeline
{
[DisplayName("Clip")]
public class UIEffectColorClip : UIEffectClip<UIEffectColorBehaviour>
{
}
[Serializable]
public class UIEffectColorBehaviour : UIEffectBehaviour, IGetValue<Color>
{
[ColorUsage(true, true)]
public Color m_Value = Color.white;
[ColorUsage(true, true)]
public Color m_From = Color.white;
public Color Get(float time)
{
return m_Tween
? Color.Lerp(m_From, m_Value, m_Curve.Evaluate(time))
: m_Value;
}
}
public abstract class UIEffectColorMixerBehaviour : UIEffectMixerBehaviour<Color, UIEffectColorBehaviour>
{
protected override Color Add(Color baseValue, Color value, float weight)
{
return baseValue + value * weight;
}
protected override Color Lerp(Color defaultValue, Color value, float weight)
{
return Color.Lerp(defaultValue, value, weight);
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0c402544dc0be48afa6e9d3eb88120be
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,42 @@
#if TIMELINE_ENABLE
using System;
using System.ComponentModel;
using UnityEngine;
namespace Coffee.UIEffects.Timeline
{
[DisplayName("Clip")]
public class UIEffectFloatClip : UIEffectClip<UIEffectFloatBehaviour>
{
}
[Serializable]
public class UIEffectFloatBehaviour : UIEffectBehaviour, IGetValue<float>
{
public float m_Value = 1;
public float m_From = 1;
public float Get(float time)
{
return m_Tween
? Mathf.Lerp(m_From, m_Value, m_Curve.Evaluate(time))
: m_Value;
}
}
public abstract class UIEffectFloatMixerBehaviour : UIEffectMixerBehaviour<float, UIEffectFloatBehaviour>
{
protected override float Add(float baseValue, float value, float weight)
{
return baseValue + value * weight;
}
protected override float Lerp(float defaultValue, float value, float weight)
{
return Mathf.Lerp(defaultValue, value, weight);
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ffaa25511fc8148839e36bda4414e944
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,177 @@
#if TIMELINE_ENABLE
using System;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
namespace Coffee.UIEffects.Timeline
{
[AttributeUsage(AttributeTargets.Class)]
public class FloatClipUsageAttribute : PropertyAttribute
{
public readonly float min;
public readonly float max;
public readonly float defaultValue;
public FloatClipUsageAttribute(float min, float max, float defaultValue = 0f)
{
this.min = min;
this.max = max;
this.defaultValue = defaultValue;
}
}
[AttributeUsage(AttributeTargets.Class)]
public class ColorClipUsageAttribute : PropertyAttribute
{
public readonly bool alpha;
public ColorClipUsageAttribute(bool alpha)
{
this.alpha = alpha;
}
}
public interface IGetValue<out T>
{
T Get(float time);
}
[TrackColor(0.92f, 0.54f, 0.17f)]
[TrackBindingType(typeof(UIEffect), TrackBindingFlags.AllowCreateComponent)]
public abstract class UIEffectTrack<T> : TrackAsset
where T : PlayableBehaviour, new()
{
protected abstract string fieldName { get; }
public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
{
var playable = ScriptPlayable<T>.Create(graph, inputCount);
foreach (var timelineClip in GetClips())
{
if (timelineClip.asset is UIEffectClip clip)
{
clip.timelineClip = timelineClip;
}
}
return playable;
}
public override void GatherProperties(PlayableDirector director, IPropertyCollector driver)
{
var trackBinding = director.GetGenericBinding(this) as UIEffect;
if (!trackBinding) return;
driver.AddFromName<UIEffect>(trackBinding.gameObject, fieldName);
base.GatherProperties(director, driver);
}
}
public abstract class UIEffectClip : PlayableAsset, ITimelineClipAsset
{
public TimelineClip timelineClip { get; set; }
public ClipCaps clipCaps => ClipCaps.Blending | ClipCaps.Extrapolation;
private void OnValidate()
{
}
}
public abstract class UIEffectClip<T> : UIEffectClip
where T : UIEffectBehaviour, new()
{
[NotKeyable]
[SerializeField]
public T m_Data = new T();
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
{
var playable = ScriptPlayable<T>.Create(graph, m_Data);
var behaviour = playable.GetBehaviour();
behaviour.clip = this;
return playable;
}
}
[Serializable]
public abstract class UIEffectBehaviour : PlayableBehaviour
{
public bool m_Tween;
public AnimationCurve m_Curve = AnimationCurve.Linear(0, 0, 1, 1);
public UIEffectClip clip { get; set; }
}
public abstract class UIEffectMixerBehaviour<T, TBehavior> : PlayableBehaviour
where TBehavior : UIEffectBehaviour, IGetValue<T>, new()
{
private T _defaultValue;
protected abstract T currentValue { get; set; }
protected UIEffect effect { get; private set; }
public override void ProcessFrame(Playable playable, FrameData info, object playerData)
{
InitializeIfNeeded(playerData as UIEffect);
if (!effect) return;
var inputCount = playable.GetInputCount();
var value = default(T);
var totalWeight = GetTotalWeight(playable);
for (var i = 0; i < inputCount; i++)
{
var weight = playable.GetInputWeight(i);
if (weight <= 0) continue;
var playableInput = (ScriptPlayable<TBehavior>)playable.GetInput(i);
var input = playableInput.GetBehaviour();
var normalizedTime = (float)(playableInput.GetTime() / input.clip.timelineClip.duration);
value = Add(value, input.Get(normalizedTime), weight / totalWeight);
totalWeight += weight;
}
currentValue = Lerp(_defaultValue, value, totalWeight);
}
public override void OnPlayableDestroy(Playable playable)
{
if (effect)
{
currentValue = _defaultValue;
}
}
private static float GetTotalWeight(Playable playable)
{
var totalWeight = 0f;
var inputCount = playable.GetInputCount();
for (var i = 0; i < inputCount; i++)
{
totalWeight += playable.GetInputWeight(i);
}
return totalWeight;
}
private void InitializeIfNeeded(UIEffect newEffect)
{
if (effect == newEffect) return;
if (effect)
{
currentValue = _defaultValue;
}
effect = newEffect;
_defaultValue = newEffect ? currentValue : default;
}
protected abstract T Add(T current, T value, float weight);
protected abstract T Lerp(T defaultValue, T value, float weight);
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8a54d6ecf5bae485db4b0df376bebc35
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Color Intensity Track")]
public class ColorIntensityTrack : UIEffectTrack<ColorIntensityMixer>
{
protected override string fieldName => "m_ColorIntensity";
}
public class ColorIntensityMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.colorIntensity;
set => effect.colorIntensity = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 66d61d709d31c4220bc59365f78584ec
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[ColorClipUsage(false)]
[TrackClipType(typeof(UIEffectColorClip))]
[DisplayName("UIEffect Tracks/Color Track")]
public class ColorTrack : UIEffectTrack<ColorMixer>
{
protected override string fieldName => "m_Color";
}
public class ColorMixer : UIEffectColorMixerBehaviour
{
protected override Color currentValue
{
get => effect.color;
set => effect.color = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: edfa6dc975b3446d8bc2cf6ca1fdd40f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[ColorClipUsage(true)]
[TrackClipType(typeof(UIEffectColorClip))]
[DisplayName("UIEffect Tracks/Detail Color Track")]
public class DetailColorTrack : UIEffectTrack<DetailColorMixer>
{
protected override string fieldName => "m_DetailColor";
}
public class DetailColorMixer : UIEffectColorMixerBehaviour
{
protected override Color currentValue
{
get => effect.detailColor;
set => effect.detailColor = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 88051c9178d704e47a12db836b6343c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Detail Intensity Track")]
public class DetailIntensityTrack : UIEffectTrack<DetailIntensityMixer>
{
protected override string fieldName => "m_DetailIntensity";
}
public class DetailIntensityMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.detailIntensity;
set => effect.detailIntensity = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e901a5dfc37104d2182dcc49fe370305
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[ColorClipUsage(true)]
[TrackClipType(typeof(UIEffectColorClip))]
[DisplayName("UIEffect Tracks/Detail Color Track")]
public class EdgeColorTrack : UIEffectTrack<EdgeColorMixer>
{
protected override string fieldName => "m_EdgeColor";
}
public class EdgeColorMixer : UIEffectColorMixerBehaviour
{
protected override Color currentValue
{
get => effect.edgeColor;
set => effect.edgeColor = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f78a05c2255e94329a1b7bd465ac8f8a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Edge Shiny Rate Track")]
public class EdgeShinyRateTrack : UIEffectTrack<EdgeShinyRateMixer>
{
protected override string fieldName => "m_EdgeShinyRate";
}
public class EdgeShinyRateMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.edgeShinyRate;
set => effect.edgeShinyRate = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 118c294bc3dfa4e7a96de50b410ad846
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Gradation Intensity Track")]
public class GradationIntensityTrack : UIEffectTrack<GradationIntensityMixer>
{
protected override string fieldName => "m_GradationIntensity";
}
public class GradationIntensityMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.gradationIntensity;
set => effect.gradationIntensity = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7b4c7c51d8c8c4d9ebfacb4ec8e7f73e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,24 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Gradation Offset Track")]
public class GradationOffsetTrack : UIEffectTrack<GradationOffsetMixer>
{
protected override string fieldName => "m_GradationOffset";
}
public class GradationOffsetMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.gradationOffset;
set => effect.gradationOffset = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: deb67c01293914e41a70a7570c3a539e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,24 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Gradation Rotation Track")]
public class GradationRotationTrack : UIEffectTrack<GradationRotationMixer>
{
protected override string fieldName => "m_GradationRotation";
}
public class GradationRotationMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.gradationRotation;
set => effect.gradationRotation = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: eb2c49df5c5af40d189179c70f3f4e8f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0.01f, 10f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Gradation Scale Track")]
public class GradationScaleTrack : UIEffectTrack<GradationScaleMixer>
{
protected override string fieldName => "m_GradationScale";
}
public class GradationScaleMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.gradationScale;
set => effect.gradationScale = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0e9a4fc9655b64a399feaf134500daad
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Sampling Intensity Track")]
public class SamplingIntensityTrack : UIEffectTrack<SamplingIntensityMixer>
{
protected override string fieldName => "m_SamplingIntensity";
}
public class SamplingIntensityMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.samplingIntensity;
set => effect.samplingIntensity = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ae43eda84464f470db063babd75d86ce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Tone Intensity Track")]
public class ToneIntensityTrack : UIEffectTrack<ToneIntensityMixer>
{
protected override string fieldName => "m_ToneIntensity";
}
public class ToneIntensityMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.toneIntensity;
set => effect.toneIntensity = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c08d90226dd3d48c7b26e4148a627c30
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[ColorClipUsage(true)]
[TrackClipType(typeof(UIEffectColorClip))]
[DisplayName("UIEffect Tracks/Transition Color Track")]
public class TransitionColorTrack : UIEffectTrack<TransitionColorMixer>
{
protected override string fieldName => "m_TransitionColor";
}
public class TransitionColorMixer : UIEffectColorMixerBehaviour
{
protected override Color currentValue
{
get => effect.transitionColor;
set => effect.transitionColor = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6cbbddc14d5744997a755e56c474a436
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
#if TIMELINE_ENABLE
using System.ComponentModel;
using UnityEngine.Timeline;
using Coffee.UIEffects.Timeline;
namespace Coffee.UIEffects
{
[FloatClipUsage(0f, 1f)]
[TrackClipType(typeof(UIEffectFloatClip))]
[DisplayName("UIEffect Tracks/Transition Rate Track")]
public class TransitionRateTrack : UIEffectTrack<TransitionRateMixer>
{
protected override string fieldName => "m_TransitionRate";
}
public class TransitionRateMixer : UIEffectFloatMixerBehaviour
{
protected override float currentValue
{
get => effect.transitionRate;
set => effect.transitionRate = value;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 97f54e7d118464cd099026c08294dc29
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+108 -4
View File
@@ -10,7 +10,7 @@ namespace Coffee.UIEffects
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
[ExecuteAlways]
[DisallowMultipleComponent]
public class UIEffect : UIEffectBase
public sealed class UIEffect : UIEffectBase
{
[SerializeField]
protected ToneFilter m_ToneFilter = ToneFilter.None;
@@ -107,6 +107,9 @@ namespace Coffee.UIEffects
[SerializeField]
protected float m_TransitionAutoPlaySpeed = 0f;
[SerializeField]
private Gradient m_TransitionGradient = new Gradient();
[SerializeField]
protected TargetMode m_TargetMode = TargetMode.None;
@@ -198,6 +201,12 @@ namespace Coffee.UIEffects
[Range(0, 360)]
private float m_GradationRotation = 0;
[SerializeField]
protected TextureWrapMode m_GradationWrapMode = TextureWrapMode.Repeat;
[SerializeField]
protected bool m_GradationReverse = false;
[SerializeField]
protected bool m_AllowToModifyMeshShape = true;
@@ -1263,6 +1272,7 @@ namespace Coffee.UIEffects
get => m_GradationScale;
set
{
value = Mathf.Clamp(value, 0.01f, 10f);
if (Mathf.Approximately(m_GradationScale, value)) return;
context.m_GradationScale = m_GradationScale = value;
SetMaterialDirty();
@@ -1280,6 +1290,30 @@ namespace Coffee.UIEffects
}
}
public TextureWrapMode gradationWrapMode
{
get => m_GradationWrapMode;
set
{
if (m_GradationWrapMode == value) return;
context.m_GradationWrapMode = m_GradationWrapMode = value;
context.SetGradationDirty();
SetMaterialDirty();
}
}
public bool gradationReverse
{
get => m_GradationReverse;
set
{
if (m_GradationReverse == value) return;
context.m_GradationReverse = m_GradationReverse = value;
context.SetGradationDirty();
SetMaterialDirty();
}
}
public DetailFilter detailFilter
{
get => m_DetailFilter;
@@ -1438,6 +1472,7 @@ namespace Coffee.UIEffects
{
(m_SrcBlendMode, m_DstBlendMode) = (m_BlendType, m_SrcBlendMode, m_DstBlendMode).Convert();
context?.SetGradationDirty();
context?.SetTransitionGradationDirty();
base.OnValidate();
}
@@ -1459,7 +1494,8 @@ namespace Coffee.UIEffects
public override void SetVerticesDirty()
{
base.SetVerticesDirty();
for (var i = 0; i < replicas.Count; i++)
var count = replicas.Count;
for (var i = 0; i < count; i++)
{
if (!replicas[i]) continue;
replicas[i].SetVerticesDirty();
@@ -1469,7 +1505,8 @@ namespace Coffee.UIEffects
public override void SetMaterialDirty()
{
base.SetMaterialDirty();
for (var i = 0; i < replicas.Count; i++)
var count = replicas.Count;
for (var i = 0; i < count; i++)
{
if (!replicas[i]) continue;
replicas[i].SetMaterialDirty();
@@ -1484,6 +1521,36 @@ namespace Coffee.UIEffects
SetGradientKeys(gradient.colorKeys, gradient.alphaKeys, gradient.mode);
}
/// <summary>
/// Get gradation gradient's keys.
/// </summary>
public void GetGradientKeys(out GradientColorKey[] colorKeys, out GradientAlphaKey[] alphaKeys,
out GradientMode mode)
{
colorKeys = m_GradationGradient?.colorKeys ?? Array.Empty<GradientColorKey>();
alphaKeys = m_GradationGradient?.alphaKeys ?? Array.Empty<GradientAlphaKey>();
mode = m_GradationGradient?.mode ?? GradientMode.Blend;
}
/// <summary>
/// Set transition gradient's keys.
/// </summary>
public void SetTransitionGradientKeys(Gradient gradient)
{
SetTransitionGradientKeys(gradient.colorKeys, gradient.alphaKeys, gradient.mode);
}
/// <summary>
/// Get transition gradation gradient's keys.
/// </summary>
public void GetTransitionGradientKeys(out GradientColorKey[] colorKeys, out GradientAlphaKey[] alphaKeys,
out GradientMode mode)
{
colorKeys = m_TransitionGradient?.colorKeys ?? Array.Empty<GradientColorKey>();
alphaKeys = m_TransitionGradient?.alphaKeys ?? Array.Empty<GradientAlphaKey>();
mode = m_TransitionGradient?.mode ?? GradientMode.Blend;
}
/// <summary>
/// Set gradation gradient's keys.
/// </summary>
@@ -1497,11 +1564,25 @@ namespace Coffee.UIEffects
SetMaterialDirty();
}
/// <summary>
/// Set transition gradient's keys.
/// </summary>
public void SetTransitionGradientKeys(GradientColorKey[] colorKeys, GradientAlphaKey[] alphaKeys,
GradientMode mode = GradientMode.Blend)
{
m_TransitionGradient ??= new Gradient();
m_TransitionGradient.SetKeys(colorKeys, alphaKeys);
m_TransitionGradient.mode = mode;
context?.SetTransitionGradationDirty();
SetMaterialDirty();
}
public override void ApplyContextToMaterial(Material material)
{
base.ApplyContextToMaterial(material);
for (var i = 0; i < replicas.Count; i++)
var count = replicas.Count;
for (var i = 0; i < count; i++)
{
if (!replicas[i]) continue;
replicas[i].ApplyContextToMaterial(material);
@@ -1561,6 +1642,15 @@ namespace Coffee.UIEffects
}
}
public void Clear()
{
m_SamplingScale = 1;
m_AllowToModifyMeshShape = true;
m_CustomRoot = null;
LoadPreset(UIEffectPreset.GetDefaultPreset());
}
/// <summary>
/// Load preset settings.
/// </summary>
@@ -1649,6 +1739,7 @@ namespace Coffee.UIEffects
dst.m_TransitionColorGlow = src.m_TransitionColorGlow;
dst.m_TransitionPatternReverse = src.m_TransitionPatternReverse;
dst.m_TransitionAutoPlaySpeed = src.m_TransitionAutoPlaySpeed;
dst.SetTransitionGradientKeys(src.m_TransitionGradient);
}
if (!append || src.m_TargetMode != TargetMode.None)
@@ -1705,6 +1796,8 @@ namespace Coffee.UIEffects
dst.m_GradationOffset = src.m_GradationOffset;
dst.m_GradationScale = src.m_GradationScale;
dst.m_GradationRotation = src.m_GradationRotation;
dst.m_GradationWrapMode = src.m_GradationWrapMode;
dst.m_GradationReverse = src.m_GradationReverse;
}
if (!append || src.m_DetailFilter != DetailFilter.None)
@@ -1777,6 +1870,7 @@ namespace Coffee.UIEffects
dst.m_TransitionColorGlow = src.m_TransitionColorGlow;
dst.m_TransitionPatternReverse = src.m_TransitionPatternReverse;
dst.m_TransitionAutoPlaySpeed = src.m_TransitionAutoPlaySpeed;
dst.SetTransitionGradientKeys(src.m_TransitionGradient);
}
if (!append || src.m_TargetMode != TargetMode.None)
@@ -1833,6 +1927,8 @@ namespace Coffee.UIEffects
dst.m_GradationOffset = src.m_GradationOffset;
dst.m_GradationScale = src.m_GradationScale;
dst.m_GradationRotation = src.m_GradationRotation;
dst.m_GradationWrapMode = src.m_GradationWrapMode;
dst.m_GradationReverse = src.m_GradationReverse;
}
if (!append || src.m_DetailFilter != DetailFilter.None)
@@ -1903,6 +1999,9 @@ namespace Coffee.UIEffects
dst.m_TransitionColorGlow = src.m_TransitionColorGlow;
dst.m_TransitionPatternReverse = src.m_TransitionPatternReverse;
dst.m_TransitionAutoPlaySpeed = src.m_TransitionAutoPlaySpeed;
dst.m_TransitionGradient.SetKeys(src.m_TransitionGradient.colorKeys,
src.m_TransitionGradient.alphaKeys);
dst.m_TransitionGradient.mode = src.m_TransitionGradient.mode;
}
if (!append || src.m_TargetMode != TargetMode.None)
@@ -1960,6 +2059,8 @@ namespace Coffee.UIEffects
dst.m_GradationOffset = src.m_GradationOffset;
dst.m_GradationScale = src.m_GradationScale;
dst.m_GradationRotation = src.m_GradationRotation;
dst.m_GradationWrapMode = src.m_GradationWrapMode;
dst.m_GradationReverse = src.m_GradationReverse;
}
if (!append || src.m_DetailFilter != DetailFilter.None)
@@ -2014,6 +2115,7 @@ namespace Coffee.UIEffects
dst.m_TransitionColorGlow = src.m_TransitionColorGlow;
dst.m_TransitionPatternReverse = src.m_TransitionPatternReverse;
dst.m_TransitionAutoPlaySpeed = src.m_TransitionAutoPlaySpeed;
dst.m_TransitionGradient = src.m_TransitionGradient;
dst.m_TargetMode = src.m_TargetMode;
dst.m_TargetColor = src.m_TargetColor;
@@ -2054,6 +2156,8 @@ namespace Coffee.UIEffects
dst.m_GradationOffset = src.m_GradationOffset;
dst.m_GradationScale = src.m_GradationScale;
dst.m_GradationRotation = src.m_GradationRotation;
dst.m_GradationWrapMode = src.m_GradationWrapMode;
dst.m_GradationReverse = src.m_GradationReverse;
dst.m_DetailFilter = src.m_DetailFilter;
dst.m_DetailIntensity = src.m_DetailIntensity;
+58 -5
View File
@@ -6,6 +6,9 @@ using UnityEngine.EventSystems;
using UnityEngine.Profiling;
using UnityEngine.UI;
using UnityEditor;
#if TIMELINE_ENABLE
using UnityEngine.Timeline;
#endif
[assembly: InternalsVisibleTo("UIEffect")]
[assembly: InternalsVisibleTo("Coffee.UIEffect.Editor")]
@@ -15,6 +18,9 @@ namespace Coffee.UIEffects
[ExecuteAlways]
[DisallowMultipleComponent]
public abstract class UIEffectBase : UIBehaviour, IMeshModifier, IMaterialModifier, ICanvasRaycastFilter
#if TIMELINE_ENABLE
, ITimeControl
#endif
{
private static readonly InternalObjectPool<UIEffectContext> s_ContextPool =
new InternalObjectPool<UIEffectContext>(() => new UIEffectContext(), x => true, x => x.Reset());
@@ -26,6 +32,8 @@ namespace Coffee.UIEffects
private Action _onAfterCanvasRebuild;
private bool _canModifyMesh;
private Matrix4x4 _prevTransformHash;
private Canvas _canvas;
private bool _canvasCached = false;
public Material effectMaterial => _material;
public Graphic graphic => _graphic ? _graphic : _graphic = GetComponent<Graphic>();
@@ -33,6 +41,23 @@ namespace Coffee.UIEffects
public virtual float actualSamplingScale => 1;
public virtual bool canModifyShape => true;
protected Canvas canvas
{
get
{
if (_canvasCached) return _canvas;
_canvasCached = true;
_canvas = GetComponentInParent<Canvas>();
if (!_canvas || !_canvas.isActiveAndEnabled)
{
_canvas = null;
}
return _canvas;
}
}
public virtual UIEffectContext context
{
get
@@ -98,7 +123,7 @@ namespace Coffee.UIEffects
s_ContextPool.Return(ref _context);
}
protected virtual void OnBeforeCanvasRebuild()
private void OnBeforeCanvasRebuild()
{
// If the mesh is not modified in the previous frame, try to modify it if possible.
if (!_canModifyMesh && CanModifyMesh())
@@ -108,11 +133,18 @@ namespace Coffee.UIEffects
}
}
protected virtual void OnAfterCanvasRebuild()
private void OnAfterCanvasRebuild()
{
if (!_material || !graphic || !graphic.canvas || context == null) return;
if (!_material || !graphic || !canvas || context == null) return;
if (!context.useViewMatrix) return;
context.UpdateViewMatrix(GetCurrentMaterial(), transitionRoot, graphic.canvas.rootCanvas);
context.UpdateViewMatrix(GetCurrentMaterial(), transitionRoot, canvas.rootCanvas);
}
protected override void OnCanvasHierarchyChanged()
{
_canvasCached = false;
_canvas = null;
}
public void ModifyMesh(Mesh mesh)
@@ -126,13 +158,14 @@ namespace Coffee.UIEffects
_canModifyMesh = CanModifyMesh();
if (_canModifyMesh)
{
context.ModifyMesh(graphic, transitionRoot, vh, canModifyShape);
context.ModifyMesh(graphic, canvas, transitionRoot, vh, canModifyShape);
}
}
private bool CanModifyMesh()
{
if (!graphic || !graphic.isActiveAndEnabled) return false;
if (!isActiveAndEnabled) return false;
// The transitionRoot is same as the transform => true.
var root = transitionRoot;
@@ -254,5 +287,25 @@ namespace Coffee.UIEffects
public abstract void SetRate(float rate, UIEffectTweener.CullingMask cullingMask);
public abstract bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera);
public void SetTime(double _)
{
}
public void OnControlTimeStart()
{
if (this)
{
enabled = true;
}
}
public void OnControlTimeStop()
{
if (this)
{
enabled = false;
}
}
}
}
+131 -54
View File
@@ -8,7 +8,7 @@ using UnityEngine.UI;
namespace Coffee.UIEffects
{
public class UIEffectContext
public sealed class UIEffectContext
{
private static readonly UIEffectContext s_DefaultContext = new UIEffectContext();
private static readonly List<UIVertex> s_WorkingVertices = new List<UIVertex>(1024 * 8);
@@ -35,6 +35,7 @@ namespace Coffee.UIEffects
private static readonly int s_TransitionColorGlow = Shader.PropertyToID("_TransitionColorGlow");
private static readonly int s_TransitionPatternReverse = Shader.PropertyToID("_TransitionPatternReverse");
private static readonly int s_TransitionAutoPlaySpeed = Shader.PropertyToID("_TransitionAutoPlaySpeed");
private static readonly int s_TransitionGradientTex = Shader.PropertyToID("_TransitionGradientTex");
private static readonly int s_TargetColor = Shader.PropertyToID("_TargetColor");
private static readonly int s_TargetRange = Shader.PropertyToID("_TargetRange");
private static readonly int s_TargetSoftness = Shader.PropertyToID("_TargetSoftness");
@@ -64,6 +65,7 @@ namespace Coffee.UIEffects
private static readonly int s_GradationColor4 = Shader.PropertyToID("_GradationColor4");
private static readonly int s_GradationTex = Shader.PropertyToID("_GradationTex");
private static readonly int s_GradationTex_ST = Shader.PropertyToID("_GradationTex_ST");
private static readonly int s_GradationRadial = Shader.PropertyToID("_GradationRadial");
private static readonly int s_RootViewMatrix = Shader.PropertyToID("_RootViewMatrix");
private static readonly int s_GradViewMatrix = Shader.PropertyToID("_GradViewMatrix");
private static readonly int s_MirrorRootViewMatrix = Shader.PropertyToID("_MirrorRootViewMatrix");
@@ -108,7 +110,8 @@ namespace Coffee.UIEffects
"TRANSITION_MASK",
"TRANSITION_MELT",
"TRANSITION_BURN",
"TRANSITION_PATTERN"
"TRANSITION_PATTERN",
"TRANSITION_BLAZE"
};
private static readonly string[] s_TargetKeywords =
@@ -140,7 +143,6 @@ namespace Coffee.UIEffects
{
"",
"GRADATION_GRADIENT",
"GRADATION_RADIAL",
"GRADATION_COLOR2",
"GRADATION_COLOR4"
};
@@ -188,6 +190,7 @@ namespace Coffee.UIEffects
public bool m_TransitionColorGlow;
public bool m_TransitionPatternReverse;
public float m_TransitionAutoPlaySpeed;
public Gradient m_TransitionGradient;
public TargetMode m_TargetMode;
public Color m_TargetColor;
@@ -228,6 +231,8 @@ namespace Coffee.UIEffects
public float m_GradationOffset;
public float m_GradationScale;
public float m_GradationRotation;
public TextureWrapMode m_GradationWrapMode;
public bool m_GradationReverse;
public DetailFilter m_DetailFilter;
public float m_DetailIntensity;
@@ -253,14 +258,21 @@ namespace Coffee.UIEffects
public bool willModifyVertex => willModifyMaterial;
public bool useViewMatrix => m_TransitionFilter != TransitionFilter.None
|| m_GradationMode != GradationMode.None
|| m_DetailFilter != DetailFilter.None
|| m_EdgeMode == EdgeMode.Shiny;
private Texture2D _gradationRampTex;
private Texture2D _transitionRampTex;
private bool _isGradientDirty = true;
private static readonly Color32[] s_Colors = new Color32[256];
private bool _isTransitionGradientDirty = true;
private static readonly Color[] s_Colors = new Color[256];
private static readonly InternalObjectPool<Texture2D> s_TexturePool = new InternalObjectPool<Texture2D>(
() =>
{
var texture = new Texture2D(s_Colors.Length, 1, TextureFormat.RGBA32, false, false)
var texture = new Texture2D(s_Colors.Length, 1, TextureFormat.RGBAFloat, false, false)
{
name = "GradationRamp",
hideFlags = HideFlags.DontSave,
@@ -285,22 +297,55 @@ namespace Coffee.UIEffects
var w = s_Colors.Length;
for (var i = 0; i < w; i++)
{
s_Colors[i] = m_GradationGradient.Evaluate((float)i / (w - 1));
var x = m_GradationReverse ? w - 1 - i : i;
var t = (float)i / (w - 1);
s_Colors[x] = ApplyColorSpace(m_GradationGradient.Evaluate(t));
}
_gradationRampTex.wrapMode = m_GradationWrapMode;
_gradationRampTex.filterMode = m_GradationGradient.mode == GradientMode.Blend
? FilterMode.Bilinear
: FilterMode.Point;
_gradationRampTex.SetPixels32(s_Colors);
_gradationRampTex.SetPixels(s_Colors);
_gradationRampTex.Apply();
return _gradationRampTex;
}
}
private Texture2D transitionRampTex
{
get
{
if (m_TransitionGradient == null) return null;
if (!_transitionRampTex) _transitionRampTex = s_TexturePool.Rent();
if (!_isTransitionGradientDirty) return _transitionRampTex;
_isTransitionGradientDirty = false;
var w = s_Colors.Length;
for (var i = 0; i < w; i++)
{
var t = (float)i / (w - 1);
s_Colors[i] = ApplyColorSpace(m_TransitionGradient.Evaluate(t));
}
s_Colors[w - 1].a = 0;
_transitionRampTex.wrapMode = TextureWrapMode.Clamp;
_transitionRampTex.filterMode = m_TransitionGradient.mode == GradientMode.Blend
? FilterMode.Bilinear
: FilterMode.Point;
_transitionRampTex.SetPixels(s_Colors);
_transitionRampTex.Apply();
return _transitionRampTex;
}
}
public void Reset()
{
_isGradientDirty = true;
_isTransitionGradientDirty = true;
s_TexturePool.Return(ref _gradationRampTex);
s_TexturePool.Return(ref _transitionRampTex);
CopyFrom(s_DefaultContext);
}
@@ -336,6 +381,7 @@ namespace Coffee.UIEffects
dst.m_TransitionColorGlow = src.m_TransitionColorGlow;
dst.m_TransitionPatternReverse = src.m_TransitionPatternReverse;
dst.m_TransitionAutoPlaySpeed = src.m_TransitionAutoPlaySpeed;
dst.m_TransitionGradient = src.m_TransitionGradient;
dst.m_TargetMode = src.m_TargetMode;
dst.m_TargetColor = src.m_TargetColor;
@@ -376,6 +422,8 @@ namespace Coffee.UIEffects
dst.m_GradationScale = src.m_GradationScale;
dst.m_GradationOffset = src.m_GradationOffset;
dst.m_GradationRotation = src.m_GradationRotation;
dst.m_GradationWrapMode = src.m_GradationWrapMode;
dst.m_GradationReverse = src.m_GradationReverse;
dst.m_DetailFilter = src.m_DetailFilter;
dst.m_DetailIntensity = src.m_DetailIntensity;
@@ -394,11 +442,16 @@ namespace Coffee.UIEffects
_isGradientDirty = true;
}
public void SetTransitionGradationDirty()
{
_isTransitionGradientDirty = true;
}
public void ApplyToMaterial(Material material, float actualSamplingScale = 1f)
{
if (!material) return;
Profiler.BeginSample("(UIE)[UIEffect] GetModifiedMaterial");
Profiler.BeginSample("(UIE)[UIEffect] ApplyToMaterial");
material.SetInt(s_SrcBlend, (int)m_SrcBlendMode);
material.SetInt(s_DstBlend, (int)m_DstBlendMode);
@@ -406,7 +459,7 @@ namespace Coffee.UIEffects
material.SetFloat(s_ToneIntensity, Mathf.Clamp01(m_ToneIntensity));
material.SetInt(s_ColorFilter, (int)m_ColorFilter);
material.SetColor(s_ColorValue, m_Color);
material.SetColor(s_ColorValue, ApplyColorSpace(m_Color));
material.SetFloat(s_ColorIntensity, Mathf.Clamp01(m_ColorIntensity));
material.SetInt(s_ColorGlow, m_ColorGlow ? 1 : 0);
@@ -425,12 +478,14 @@ namespace Coffee.UIEffects
material.SetFloat(s_TransitionSoftness, Mathf.Clamp01(m_TransitionSoftness));
material.SetVector(s_TransitionRange, new Vector2(m_TransitionRange.min, m_TransitionRange.max));
material.SetInt(s_TransitionColorFilter, (int)m_TransitionColorFilter);
material.SetColor(s_TransitionColor, m_TransitionColor);
material.SetColor(s_TransitionColor, ApplyColorSpace(m_TransitionColor));
material.SetInt(s_TransitionColorGlow, m_TransitionColorGlow ? 1 : 0);
material.SetInt(s_TransitionPatternReverse, m_TransitionPatternReverse ? 1 : 0);
material.SetFloat(s_TransitionAutoPlaySpeed, m_TransitionAutoPlaySpeed);
material.SetTexture(s_TransitionGradientTex,
m_TransitionFilter == TransitionFilter.Blaze ? transitionRampTex : null);
material.SetColor(s_TargetColor, m_TargetColor);
material.SetColor(s_TargetColor, ApplyColorSpace(m_TargetColor));
material.SetFloat(s_TargetRange, Mathf.Clamp01(m_TargetRange));
material.SetFloat(s_TargetSoftness, Mathf.Clamp01(m_TargetSoftness));
@@ -447,12 +502,12 @@ namespace Coffee.UIEffects
}
material.SetInt(s_ShadowColorFilter, (int)m_ShadowColorFilter);
material.SetColor(s_ShadowColor, m_ShadowColor);
material.SetColor(s_ShadowColor, ApplyColorSpace(m_ShadowColor));
material.SetInt(s_ShadowColorGlow, m_ShadowColorGlow ? 1 : 0);
material.SetFloat(s_EdgeWidth, Mathf.Clamp01(m_EdgeWidth));
material.SetInt(s_EdgeColorFilter, (int)m_EdgeColorFilter);
material.SetColor(s_EdgeColor, m_EdgeColor);
material.SetColor(s_EdgeColor, ApplyColorSpace(m_EdgeColor));
material.SetInt(s_EdgeColorGlow, m_EdgeColorGlow ? 1 : 0);
material.SetFloat(s_EdgeShinyRate, Mathf.Clamp01(m_EdgeShinyRate));
material.SetFloat(s_EdgeShinyWidth, Mathf.Clamp01(m_EdgeShinyWidth));
@@ -464,13 +519,18 @@ namespace Coffee.UIEffects
material.SetFloat(s_GradationIntensity, m_GradationIntensity);
material.SetInt(s_GradationColorFilter, (int)m_GradationColorFilter);
material.SetColor(s_GradationColor1, m_GradationColor1);
material.SetColor(s_GradationColor2, m_GradationColor2);
material.SetColor(s_GradationColor3, m_GradationColor3);
material.SetColor(s_GradationColor4, m_GradationColor4);
material.SetColor(s_GradationColor1, ApplyColorSpace(m_GradationColor1));
material.SetColor(s_GradationColor2, ApplyColorSpace(m_GradationColor2));
material.SetColor(s_GradationColor3, ApplyColorSpace(m_GradationColor3));
material.SetColor(s_GradationColor4, ApplyColorSpace(m_GradationColor4));
material.SetInt(s_GradationRadial, m_GradationMode == GradationMode.Radial
#pragma warning disable CS0612 // Type or member is obsolete
|| m_GradationMode == GradationMode.RadialDetail
#pragma warning restore CS0612
|| m_GradationMode == GradationMode.RadialGradient ? 1 : 0);
material.SetFloat(s_DetailIntensity, Mathf.Clamp01(m_DetailIntensity));
material.SetColor(s_DetailColor, m_DetailColor);
material.SetColor(s_DetailColor, ApplyColorSpace(m_DetailColor));
material.SetVector(s_DetailThreshold, new Vector2(m_DetailThreshold.min, m_DetailThreshold.max));
material.SetTexture(s_DetailTex, m_DetailFilter != 0 ? m_DetailTex : null);
material.SetVector(s_DetailTex_ST,
@@ -494,21 +554,22 @@ namespace Coffee.UIEffects
case GradationMode.HorizontalGradient:
case GradationMode.VerticalGradient:
case GradationMode.AngleGradient:
case GradationMode.RadialGradient:
SetKeyword(material, s_GradationKeywords, 1);
break;
case GradationMode.RadialFast:
case GradationMode.RadialDetail:
SetKeyword(material, s_GradationKeywords, 2);
break;
case GradationMode.Horizontal:
case GradationMode.Vertical:
case GradationMode.DiagonalToRightBottom:
case GradationMode.DiagonalToLeftBottom:
case GradationMode.Angle:
SetKeyword(material, s_GradationKeywords, 3);
case GradationMode.Radial:
#pragma warning disable CS0612 // Type or member is obsolete
case GradationMode.RadialDetail:
#pragma warning restore CS0612
SetKeyword(material, s_GradationKeywords, 2);
break;
case GradationMode.Diagonal:
SetKeyword(material, s_GradationKeywords, 4);
SetKeyword(material, s_GradationKeywords, 3);
break;
}
@@ -541,16 +602,17 @@ namespace Coffee.UIEffects
scale.y = 0 != (m_Flip & Flip.Vertical) ? -scale.y : scale.y;
}
var pivot = new Vector2(0.5f, 0.5f);
var offset = (transitionRoot.pivot - pivot) * size;
var pivot = new Vector3(0.5f, 0.5f);
var offset = (transitionRoot.pivot - (Vector2)pivot) * size;
var w2LMat = Matrix4x4.Translate(offset) * transitionRoot.worldToLocalMatrix;
var rootRotation = Quaternion.Euler(0, 0, m_TransitionRotation);
var rootScale = 1f / GetMultiplier(m_TransitionRotation);
material.SetMatrix(s_RootViewMatrix, Matrix4x4.TRS(pivot, rootRotation, scale * rootScale) * w2LMat);
var gradRotation = Quaternion.Euler(0, 0, GetGradationRotation());
var gradScale = 1f / GetMultiplier(GetGradationRotation());
var rotation = GetGradationRotation();
var gradRotation = Quaternion.Euler(0, 0, rotation);
var gradScale = 1f / GetMultiplier(rotation);
material.SetMatrix(s_GradViewMatrix, Matrix4x4.TRS(pivot, gradRotation, scale * gradScale) * w2LMat);
if (m_ShadowMode == ShadowMode.Mirror)
@@ -559,22 +621,25 @@ namespace Coffee.UIEffects
var mirrorOffset = new Vector3(0, size.y / 2 * (mirrorInv + 1) - m_ShadowDistance.y * mirrorInv, 0);
var mirrorScale = new Vector3(1, mirrorInv, 1);
var udScale = new Vector3(scale.x, -scale.y, scale.z);
material.SetMatrix(s_MirrorRootViewMatrix,
Matrix4x4.TRS(pivot, rootRotation, udScale * rootScale)
* Matrix4x4.TRS(mirrorOffset, Quaternion.identity, mirrorScale) * w2LMat);
material.SetMatrix(s_MirrorGradViewMatrix,
Matrix4x4.TRS(pivot, gradRotation, udScale * gradScale)
* Matrix4x4.TRS(mirrorOffset, Quaternion.identity, mirrorScale) * w2LMat);
var mirrorTranslation = Matrix4x4.TRS(mirrorOffset, Quaternion.identity, mirrorScale) * w2LMat;
material.SetMatrix(
s_MirrorRootViewMatrix,
Matrix4x4.TRS(pivot, rootRotation, udScale * rootScale) * mirrorTranslation
);
material.SetMatrix(
s_MirrorGradViewMatrix,
Matrix4x4.TRS(pivot, gradRotation, udScale * gradScale) * mirrorTranslation
);
}
if (canvas.renderMode == RenderMode.ScreenSpaceOverlay || !canvas.worldCamera)
{
material.SetMatrix(s_CanvasToWorldMatrix, canvas.transform.localToWorldMatrix);
}
else
{
material.SetMatrix(s_CanvasToWorldMatrix, Matrix4x4.identity);
}
var useIdentity =
canvas.renderMode == RenderMode.WorldSpace ||
(canvas.renderMode != RenderMode.ScreenSpaceOverlay && canvas.worldCamera);
material.SetMatrix(
s_CanvasToWorldMatrix,
useIdentity ? Matrix4x4.identity : canvas.transform.localToWorldMatrix
);
}
private Vector4 GetGradationScaleAndOffset()
@@ -586,8 +651,10 @@ namespace Coffee.UIEffects
case GradationMode.VerticalGradient:
case GradationMode.AngleGradient:
return new Vector4(gScale, 1, -0.5f * (gScale + 1) - m_GradationOffset, 0);
case GradationMode.RadialFast:
case GradationMode.Radial:
#pragma warning disable CS0612 // Type or member is obsolete
case GradationMode.RadialDetail:
#pragma warning restore CS0612
{
return new Vector4(gScale, 1, m_GradationOffset, 0);
}
@@ -624,22 +691,27 @@ namespace Coffee.UIEffects
return Mathf.Max(Mathf.Abs(cos - sin), Mathf.Abs(cos + sin));
}
#if UNITY_2021_2_OR_NEWER
private static void SetKeyword(Material material, Span<string> keywords, int index)
#else
private static void SetKeyword(Material material, string[] keywords, int index)
#endif
{
for (var i = 0; i < keywords.Length; i++)
var length = keywords.Length;
if (index < length && !string.IsNullOrEmpty(keywords[index]))
{
if (i != index)
{
material.DisableKeyword(keywords[i]);
}
else if (!string.IsNullOrEmpty(keywords[i]))
{
material.EnableKeyword(keywords[i]);
}
material.EnableKeyword(keywords[index]);
}
for (var i = 0; i < length; i++)
{
if (i == index) continue;
material.DisableKeyword(keywords[i]);
}
}
public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelper vh, bool canModifyShape)
public void ModifyMesh(Graphic graphic, Canvas canvas, RectTransform transitionRoot, VertexHelper vh,
bool canModifyShape)
{
// Apply flip (without effect).
ApplyFlipWithoutEffect(vh, m_Flip);
@@ -649,7 +721,7 @@ namespace Coffee.UIEffects
var effectProxy = GraphicProxy.Find(graphic);
var isText = effectProxy.IsText(graphic);
effectProxy.OnPreModifyMesh(graphic);
effectProxy.OnPreModifyMesh(graphic, canvas);
var verts = s_WorkingVertices;
var expandSize = effectProxy.ModifyExpandSize(graphic, GetExpandSize(canModifyShape));
@@ -772,5 +844,10 @@ namespace Coffee.UIEffects
return expandSize;
}
private static Color ApplyColorSpace(Color color)
{
return QualitySettings.activeColorSpace == ColorSpace.Linear ? color.linear : color;
}
}
}
+19
View File
@@ -8,6 +8,19 @@ namespace Coffee.UIEffects
[ExecuteAlways]
public class UIEffectPreset : ScriptableObject
{
internal static UIEffectPreset s_DefaultPreset;
internal static UIEffectPreset GetDefaultPreset()
{
if (!s_DefaultPreset)
{
s_DefaultPreset = CreateInstance<UIEffectPreset>();
s_DefaultPreset.hideFlags = HideFlags.HideAndDontSave;
}
return s_DefaultPreset;
}
public ToneFilter m_ToneFilter = ToneFilter.None;
[Range(0, 1)] public float m_ToneIntensity = 1;
@@ -37,6 +50,7 @@ namespace Coffee.UIEffects
public bool m_TransitionColorGlow = false;
public bool m_TransitionPatternReverse = false;
[Range(-5, 5)] public float m_TransitionAutoPlaySpeed = 0f;
public Gradient m_TransitionGradient = new Gradient();
public TargetMode m_TargetMode = TargetMode.None;
public Color m_TargetColor = Color.white;
@@ -68,6 +82,8 @@ namespace Coffee.UIEffects
[Range(-1, 1)] public float m_GradationOffset = 0;
[PowerRange(0.01f, 10, 10)] public float m_GradationScale = 1;
[Range(0, 360)] public float m_GradationRotation = 0;
public TextureWrapMode m_GradationWrapMode = TextureWrapMode.Repeat;
public bool m_GradationReverse;
public EdgeMode m_EdgeMode = EdgeMode.None;
[Range(0, 1)] public float m_EdgeWidth = 0.5f;
@@ -122,6 +138,7 @@ namespace Coffee.UIEffects
dst.m_TransitionColorGlow = src.m_TransitionColorGlow;
dst.m_TransitionPatternReverse = src.m_TransitionPatternReverse;
dst.m_TransitionAutoPlaySpeed = src.m_TransitionAutoPlaySpeed;
dst.m_TransitionGradient = src.m_TransitionGradient;
dst.m_TargetMode = src.m_TargetMode;
dst.m_TargetColor = src.m_TargetColor;
@@ -162,6 +179,8 @@ namespace Coffee.UIEffects
dst.m_GradationOffset = src.m_GradationOffset;
dst.m_GradationScale = src.m_GradationScale;
dst.m_GradationRotation = src.m_GradationRotation;
dst.m_GradationWrapMode = src.m_GradationWrapMode;
dst.m_GradationReverse = src.m_GradationReverse;
dst.m_DetailFilter = src.m_DetailFilter;
dst.m_DetailIntensity = src.m_DetailIntensity;
@@ -91,12 +91,12 @@ namespace Coffee.UIEffects
[InitializeOnLoadMethod]
private static void InitializeOnLoadMethod()
{
#if UNITY_2023_2_OR_NEWER
#if !LEGACY_TMP_ENABLE
const string tmpSupport = "TextMeshPro Support (Unity 6)";
const string version = "v5.8.0 (Unity 6)";
const string version = "v5.9.0 (Unity 6)";
#else
const string tmpSupport = "TextMeshPro Support";
const string version = "v5.8.0";
const string version = "v5.9.0";
#endif
ShaderSampleImporter.RegisterShaderSamples(new[]
{
@@ -111,8 +111,8 @@ namespace Coffee.UIEffects
("Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)", tmpSupport, version),
// ShaderGraph Support
("Shader Graphs/UISample (UIEffect)", "ShaderGraph Support (Unity 6 BuiltIn)", "v5.8.0"),
("Shader Graphs/UISampleURP (UIEffect)", "ShaderGraph Support (Unity 6 URP)", "v5.8.0")
("Shader Graphs/UISample (UIEffect)", "ShaderGraph Support (Unity 6 BuiltIn)", "v5.9.0"),
("Shader Graphs/UISampleURP (UIEffect)", "ShaderGraph Support (Unity 6 URP)", "v5.9.0")
});
ShaderSampleImporter.RegisterShaderAliases(new[]
{
+36 -9
View File
@@ -5,7 +5,7 @@ using UnityEngine;
namespace Coffee.UIEffects
{
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
public class UIEffectReplica : UIEffectBase, ISerializationCallbackReceiver
public sealed class UIEffectReplica : UIEffectBase, ISerializationCallbackReceiver
{
[SerializeField] private UIEffect m_Target;
[SerializeField] private UIEffectPreset m_Preset;
@@ -99,7 +99,12 @@ namespace Coffee.UIEffects
public override bool canModifyShape => m_AllowToModifyMeshShape;
public override uint effectId => target ? target.effectId : 0;
public override uint effectId => target
? target.effectId
: preset
? (uint)preset.GetInstanceID()
: (uint)GetInstanceID();
public override UIEffectContext context
{
@@ -115,11 +120,26 @@ namespace Coffee.UIEffects
}
}
public override RectTransform transitionRoot => useTargetTransform && isTargetInScene
? target.transitionRoot
: m_CustomRoot
? m_CustomRoot
: transform as RectTransform;
public override RectTransform transitionRoot
{
get
{
if (useTargetTransform)
{
if (preset && !m_CustomRoot && graphic && canvas)
{
return canvas.transform as RectTransform;
}
if (isTargetInScene)
{
return target.transitionRoot;
}
}
return m_CustomRoot ? m_CustomRoot : transform as RectTransform;
}
}
private bool isTargetInScene => target && target.gameObject.scene.IsValid();
@@ -149,6 +169,13 @@ namespace Coffee.UIEffects
protected override void OnValidate()
{
RefreshTarget(target);
if (preset || (target && !isTargetInScene))
{
context?.SetGradationDirty();
context?.SetTransitionGradationDirty();
}
base.OnValidate();
}
@@ -160,9 +187,9 @@ namespace Coffee.UIEffects
target.SetEnablePreviewIfSelected(selection);
}
// Following the preset/preset-target.
else if (context != null)
else
{
context.SetEnablePreview(selection.Contains(gameObject), effectMaterial);
context?.SetEnablePreview(selection.Contains(gameObject), effectMaterial);
}
}
#endif
@@ -15,8 +15,10 @@ namespace Coffee.UIEffects
public static void Register(GraphicProxy proxy)
{
// Register only once.
foreach (var p in s_Proxies)
var count = s_Proxies.Count;
for (var i = 0; i < count; i++)
{
var p = s_Proxies[i];
if (p.GetType() == proxy.GetType()) return;
}
@@ -27,7 +29,8 @@ namespace Coffee.UIEffects
{
if (!graphic) return null;
for (var i = s_Proxies.Count - 1; i >= 0; i--)
var count = s_Proxies.Count;
for (var i = count - 1; i >= 0; i--)
{
var p = s_Proxies[i];
if (p.IsValid(graphic)) return p;
@@ -55,13 +58,12 @@ namespace Coffee.UIEffects
/// <summary>
/// Called before modifying the mesh.
/// </summary>
public virtual void OnPreModifyMesh(Graphic graphic)
public virtual void OnPreModifyMesh(Graphic graphic, Canvas canvas)
{
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
UIEffectContext.onModifyVertex = s_OnModifyVertex;
var canvas = graphic.canvas;
if (canvas)
{
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord1;
+1 -1
View File
@@ -4,7 +4,7 @@ using UnityEngine.UI;
namespace Coffee.UIEffects
{
internal class ImageProxy : GraphicProxy
internal sealed class ImageProxy : GraphicProxy
{
#if UNITY_EDITOR
[InitializeOnLoadMethod]
+47 -22
View File
@@ -10,7 +10,7 @@ using Object = UnityEngine.Object;
namespace Coffee.UIEffects
{
internal class TmpProxy : GraphicProxy
internal sealed class TmpProxy : GraphicProxy
{
/// <summary>
/// Check if the graphic is valid for this proxy.
@@ -40,13 +40,12 @@ namespace Coffee.UIEffects
/// <summary>
/// Called before modifying the mesh.
/// </summary>
public override void OnPreModifyMesh(Graphic graphic)
public override void OnPreModifyMesh(Graphic graphic, Canvas canvas)
{
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
UIEffectContext.onModifyVertex = s_OnModifyVertex;
var canvas = graphic.canvas;
if (canvas)
{
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord2;
@@ -59,7 +58,7 @@ namespace Coffee.UIEffects
{
if (enabled)
{
OnChangeText(textMeshProUGUI);
s_ChangedInstances.Add(textMeshProUGUI);
}
else if (0 < textMeshProUGUI.textInfo?.meshInfo?.Length
&& 0 < textMeshProUGUI.textInfo.meshInfo[0].vertexCount)
@@ -126,15 +125,15 @@ namespace Coffee.UIEffects
#endif
private static void InitializeOnLoad()
{
s_ChangedInstances.Clear();
s_RegisteredInstances.Clear();
s_SdfScaleCache.Clear();
Register(new TmpProxy());
// When the text is changed, add it to the changed list
TMPro_EventManager.TEXT_CHANGED_EVENT.Add(obj =>
{
if (obj is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
if (obj is TextMeshProUGUI textMeshProUGUI
&& textMeshProUGUI.isActiveAndEnabled
// fix: `TmpProxy` causes loss of modifications from other `IMeshModifiers` (#371)
&& textMeshProUGUI.TryGetComponent<UIEffectBase>(out var _))
{
s_ChangedInstances.Add(textMeshProUGUI);
}
@@ -146,7 +145,9 @@ namespace Coffee.UIEffects
var toRemove = InternalListPool<TextMeshProUGUI>.Rent();
foreach (var textMeshProUGUI in s_RegisteredInstances)
{
if (textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
if (textMeshProUGUI
&& textMeshProUGUI.isActiveAndEnabled
&& !textMeshProUGUI.isTextObjectScaleStatic)
{
var id = textMeshProUGUI.GetHashCode();
var lossyScaleY = textMeshProUGUI.transform.lossyScale.y;
@@ -154,11 +155,11 @@ namespace Coffee.UIEffects
// If the scale has changed, add to the changed list
if (s_SdfScaleCache.TryGetValue(id, out var prev) && !Mathf.Approximately(prev, lossyScaleY))
{
OnChangeText(textMeshProUGUI);
s_ChangedInstances.Add(textMeshProUGUI);
}
// Update the scale cache
s_SdfScaleCache[id] = textMeshProUGUI.transform.lossyScale.y;
s_SdfScaleCache[id] = lossyScaleY;
}
// Remove destroyed objects later
else if (!ReferenceEquals(textMeshProUGUI, null))
@@ -183,6 +184,9 @@ namespace Coffee.UIEffects
foreach (var textMeshProUGUI in s_ChangedInstances)
{
if (!textMeshProUGUI || !textMeshProUGUI.isActiveAndEnabled) continue;
if (!textMeshProUGUI.TryGetComponent<IMeshModifier>(out var _)) continue;
s_RegisteredInstances.Add(textMeshProUGUI);
ModifyMesh(textMeshProUGUI);
}
@@ -207,14 +211,6 @@ namespace Coffee.UIEffects
#endif
}
private static void OnChangeText(Object obj)
{
if (obj is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
{
s_ChangedInstances.Add(textMeshProUGUI);
}
}
private static void ModifyMesh(TextMeshProUGUI textMeshProUGUI)
{
if (!s_Mesh)
@@ -223,17 +219,36 @@ namespace Coffee.UIEffects
s_Mesh.MarkDynamic();
}
s_RegisteredInstances.Add(textMeshProUGUI);
var effect = textMeshProUGUI.GetComponent<UIEffectBase>();
var subMeshes = InternalListPool<TMP_SubMeshUI>.Rent();
var modifiers = InternalListPool<IMeshModifier>.Rent();
var subModifiers = InternalListPool<IMeshModifier>.Rent();
textMeshProUGUI.TryGetComponent<UIEffectBase>(out var effect);
textMeshProUGUI.GetComponentsInChildren(subMeshes, 1);
textMeshProUGUI.GetComponents(modifiers);
for (var i = 0; i < textMeshProUGUI.textInfo.meshInfo.Length; i++)
{
var meshInfo = textMeshProUGUI.textInfo.meshInfo[i];
if (meshInfo.vertexCount == 0)
{
// Clear mesh if no vertices.
s_Mesh.Clear(false);
if (i == 0)
{
textMeshProUGUI.canvasRenderer.SetMesh(s_Mesh);
}
else
{
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material, i - 1);
if (subMeshUI)
{
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
}
}
continue;
}
s_VertexHelper.Clear();
meshInfo.mesh.CopyTo(s_VertexHelper);
if (i == 0)
@@ -257,7 +272,16 @@ namespace Coffee.UIEffects
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material, i - 1);
if (!subMeshUI) break;
var replica = subMeshUI.GetOrAddComponent<UIEffectReplica>();
// fix: TMP Text sprite submesh lost when changing fontMaterial (#368)
if (!subMeshUI.TryGetComponent<UIEffectReplica>(out var replica))
{
replica = subMeshUI.gameObject.AddComponent<UIEffectReplica>();
textMeshProUGUI.RegisterDirtyMaterialCallback(() =>
{
if (subMeshUI) subMeshUI.SetMaterialDirty();
});
}
if (effect is UIEffect pEffect && pEffect.isActiveAndEnabled)
{
replica.target = pEffect;
@@ -296,6 +320,7 @@ namespace Coffee.UIEffects
InternalListPool<IMeshModifier>.Return(ref modifiers);
InternalListPool<IMeshModifier>.Return(ref subModifiers);
s_Mesh.Clear(false);
Misc.QueuePlayerLoopUpdate();
}
private static TMP_SubMeshUI GetSubMeshUI(List<TMP_SubMeshUI> subMeshes, Material material, int start)
@@ -20,7 +20,7 @@ TextureImporter:
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 1
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
@@ -53,7 +53,7 @@ TextureImporter:
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
@@ -69,7 +69,7 @@ TextureImporter:
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
@@ -100,7 +100,7 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
@@ -112,7 +112,7 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

@@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 5b4bb77fa760f487cac2866aeb002588
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -10,7 +10,9 @@ namespace UnityEditor.Rendering.BuiltIn.ShaderGraph
internal class BuiltInUIEffectSubTarget : BuiltInCanvasSubTarget
{
// UIEffectForShaderGraph.hlsl
internal static string s_UIEffectHlsl => AssetDatabase.GUIDToAssetPath("5109b2ad9b8be459592190a5678464e3");
private static GUID s_UIEffectCgincGuid => new GUID("2dd0ed35b98b345218d9aa8ac5a3ad6b");
private static GUID s_UIEffectHlslGuid => new GUID("5109b2ad9b8be459592190a5678464e3");
private static string s_UIEffectHlsl => AssetDatabase.GUIDToAssetPath(s_UIEffectHlslGuid.ToString());
public BuiltInUIEffectSubTarget() { displayName = "Canvas (UIEffect)"; }
@@ -25,6 +27,13 @@ namespace UnityEditor.Rendering.BuiltIn.ShaderGraph
protected override IncludeCollection postgraphIncludes => base.postgraphIncludes
.Add(s_UIEffectHlsl, IncludeLocation.Postgraph); // Include UIEffectForShaderGraph.hlsl on postgraph
public override void Setup(ref TargetSetupContext context)
{
base.Setup(ref context);
context.AddAssetDependency(s_UIEffectHlslGuid, AssetCollection.Flags.SourceDependency);
context.AddAssetDependency(s_UIEffectCgincGuid, AssetCollection.Flags.SourceDependency);
}
/// <summary>
/// Modify pass descriptor for UIEffect.
/// </summary>
@@ -1,5 +1,6 @@
// ==== UIEFFECT START ====
SurfaceDescriptionInputs _fragInput;
half4 uieffect_frag(float2 uv)
{
float2 prevUv = _fragInput.uv0.xy;
@@ -34,25 +35,25 @@ half4 frag_override(PackedVaryings packedInput) : SV_TARGET
_fragInput = surfaceDescriptionInputs;
const half4 origin = uieffect_frag(_fragInput.uv0.xy);
half4 color = uieffect(origin, _fragInput.uv0.xy, unpacked.texCoord2, float4(unpacked.positionWS, 1));
//Round up the alpha color coming from the interpolator (to 1.0/256.0 steps)
//The incoming alpha could have numerical instability, which makes it very sensible to
//HDR color transparency blend, when it blends with the world's texture.
const half alphaPrecision = half(0xff);
const half invAlphaPrecision = half(1.0/alphaPrecision);
unpacked.color.a = round(unpacked.color.a * alphaPrecision)*invAlphaPrecision;
const half invAlphaPrecision = half(1.0 / alphaPrecision);
unpacked.color.a = round(unpacked.color.a * alphaPrecision) * invAlphaPrecision;
#if !defined(HAVE_VFX_MODIFICATION) && !defined(_DISABLE_COLOR_TINT)
color.rgb *= unpacked.color.rgb;
color *= unpacked.color.a;
#endif
#ifdef UNITY_UI_CLIP_RECT
//mask = Uv2
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(unpacked.texCoord1.xy)) * unpacked.texCoord1.zw);
color *= m.x * m.y;
#endif
// ==== SOFTMASKABLE START ====
#if SOFTMASKABLE
color *= SoftMask(unpacked.positionCS, unpacked.positionWS, color.a);
@@ -62,10 +63,10 @@ half4 frag_override(PackedVaryings packedInput) : SV_TARGET
#if defined(_ALPHATEST_ON) || defined(_BUILTIN_ALPHATEST_ON)
clip(color.a - surfaceDescription.AlphaClipThreshold);
#endif
#if UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color;
}
return color;
}
@@ -4,7 +4,7 @@ ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData: v5.8.0
userData: v5.9.0
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
@@ -4,7 +4,7 @@ ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData: v5.8.0
userData: v5.9.0
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
@@ -6,6 +6,11 @@ namespace UnityEditor.Rendering.Universal.ShaderGraph
{
internal class UniversalUIEffectSubTarget : UniversalCanvasSubTarget
{
// UIEffectForShaderGraph.hlsl
private static GUID s_UIEffectCgincGuid => new GUID("2dd0ed35b98b345218d9aa8ac5a3ad6b");
private static GUID s_UIEffectHlslGuid => new GUID("5109b2ad9b8be459592190a5678464e3");
private static string s_UIEffectHlsl => AssetDatabase.GUIDToAssetPath(s_UIEffectHlslGuid.ToString());
[MenuItem("Assets/Create/Shader Graph/URP/Canvas Shader Graph (UIEffect)", priority = 1000)]
private static void CreateUnlitGraph()
{
@@ -18,7 +23,14 @@ namespace UnityEditor.Rendering.Universal.ShaderGraph
public UniversalUIEffectSubTarget() { displayName = "Canvas (UIEffect)"; }
protected override IncludeCollection postgraphIncludes => base.postgraphIncludes
.Add(BuiltInUIEffectSubTarget.s_UIEffectHlsl, IncludeLocation.Postgraph);
.Add(s_UIEffectHlsl, IncludeLocation.Postgraph);
public override void Setup(ref TargetSetupContext context)
{
base.Setup(ref context);
context.AddAssetDependency(s_UIEffectHlslGuid, AssetCollection.Flags.SourceDependency);
context.AddAssetDependency(s_UIEffectCgincGuid, AssetCollection.Flags.SourceDependency);
}
public override PassDescriptor GenerateUIPassDescriptor(bool isSRP)
{
@@ -61,11 +61,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0 (Unity 6)
userData: v5.9.0 (Unity 6)
assetBundleName:
assetBundleVariant:
@@ -60,11 +60,11 @@ SubShader{
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0 (Unity 6)
userData: v5.9.0 (Unity 6)
assetBundleName:
assetBundleVariant:
@@ -130,11 +130,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0 (Unity 6)
userData: v5.9.0 (Unity 6)
assetBundleName:
assetBundleVariant:
@@ -131,11 +131,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0 (Unity 6)
userData: v5.9.0 (Unity 6)
assetBundleName:
assetBundleVariant:
@@ -92,11 +92,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0 (Unity 6)
userData: v5.9.0 (Unity 6)
assetBundleName:
assetBundleVariant:
@@ -95,11 +95,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0 (Unity 6)
userData: v5.9.0 (Unity 6)
assetBundleName:
assetBundleVariant:
@@ -93,11 +93,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0 (Unity 6)
userData: v5.9.0 (Unity 6)
assetBundleName:
assetBundleVariant:
@@ -130,11 +130,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0 (Unity 6)
userData: v5.9.0 (Unity 6)
assetBundleName:
assetBundleVariant:
@@ -61,11 +61,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0
userData: v5.9.0
assetBundleName:
assetBundleVariant:
@@ -60,11 +60,11 @@ SubShader{
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0
userData: v5.9.0
assetBundleName:
assetBundleVariant:
@@ -130,11 +130,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0
userData: v5.9.0
assetBundleName:
assetBundleVariant:
@@ -130,11 +130,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0
userData: v5.9.0
assetBundleName:
assetBundleVariant:
@@ -92,11 +92,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData: v5.8.0
userData: v5.9.0
assetBundleName:
assetBundleVariant:
@@ -95,11 +95,11 @@ SubShader {
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_FILTER
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN TRANSITION_BLAZE
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_COLOR2 GRADATION_COLOR4
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
// ==== UIEFFECT END ====

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