Compare commits

...
233 Commits
Author SHA1 Message Date
Jiaqi Liu c1f3fcb009 Add missing iOS icons 2025-03-09 15:08:53 -07:00
Jiaqi Liu af53118087 v0.78
Fix a bug where snow effect might be disabled when SSAO is disabled
2025-03-09 14:48:36 -07:00
Jiaqi Liu efcb28734d Upgrade packages 2025-03-09 01:39:02 -08:00
Jiaqi Liu b1d9e3b0ac Bug fix + Bump Unity version + Update copyright text
- Fixed a bug caused by inconsistent state check between managed and native object.
- Bump Unity version.
- Update copyright text
2025-03-05 21:13:59 -08:00
dependabot[bot] 613098c3a3 action-deps: bump actions/cache from 4.2.1 to 4.2.2 (#63)
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 17:07:27 -08:00
dependabot[bot] 51862f6398 action-deps: bump actions/upload-artifact from 4.6.0 to 4.6.1 (#61)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.6.0...v4.6.1)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 04:32:21 -08:00
dependabot[bot] 7fe163c5ff action-deps: bump actions/cache from 4.2.0 to 4.2.1 (#62)
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.2.0...v4.2.1)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 04:32:12 -08:00
dependabot[bot] 42b616a473 action-deps: bump actions/upload-artifact from 4.5.0 to 4.6.0 (#60)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 02:01:18 -08:00
dependabot[bot] 44970173ee action-deps: bump actions/upload-artifact from 4.4.3 to 4.5.0 (#59)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.3 to 4.5.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.4.3...v4.5.0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-24 20:47:11 -08:00
dependabot[bot] 5ba326f2e4 action-deps: bump actions/checkout from 4.2.1 to 4.2.2 (#57)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-15 17:06:45 -08:00
dependabot[bot] 59a4761681 action-deps: bump actions/cache from 4.1.1 to 4.2.0 (#58)
Bumps [actions/cache](https://github.com/actions/cache) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.1.1...v4.2.0)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-15 17:06:37 -08:00
Jiaqi Liu 7cc8ba6aab v0.77 Add Win-ARM64 support 2024-10-20 23:24:22 -07:00
Jiaqi Liu 2bb0d5e2f3 Upgrade to Unity 6 LTS 2024-10-17 21:37:38 -07:00
dependabot[bot] 5a63a2b27a action-deps: bump actions/cache from 4.1.0 to 4.1.1 (#53)
Bumps [actions/cache](https://github.com/actions/cache) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-17 21:33:05 -07:00
dependabot[bot] 980c349a81 action-deps: bump actions/upload-artifact from 4.4.0 to 4.4.3 (#54)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.0 to 4.4.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.4.0...v4.4.3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-17 21:32:55 -07:00
dependabot[bot] ff3e49a4ad action-deps: bump actions/checkout from 4.2.0 to 4.2.1 (#55)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.2.0...v4.2.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-17 21:32:46 -07:00
dependabot[bot] adcf01833b action-deps: bump actions/cache from 4.0.2 to 4.1.0 (#52)
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.2 to 4.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.0.2...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-11 15:20:46 -07:00
dependabot[bot] 1d9072977a action-deps: bump actions/checkout from 4.1.7 to 4.2.0 (#51)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.7...v4.2.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 01:04:09 -07:00
Jiaqi Liu 264db76be5 Move combat related code to Combat folder 2024-09-21 03:46:09 -07:00
Jiaqi Liu 927d62ff19 Fire animation event for combat system to consume
Fire animation event for combat system to consume + code refactoring
2024-09-19 00:49:58 -07:00
Jiaqi Liu 85d2e15225 Minor refactoring 2024-09-16 02:36:35 -07:00
Jiaqi Liu b016e38b9d Minor tweak 2024-09-15 02:19:57 -07:00
Jiaqi Liu 9ca97a2977 Disable splash screen 2024-09-14 16:37:34 -07:00
Jiaqi Liu 487fc773fe Upgrade project to Unity 6
Upgrade project to Unity 6
2024-09-14 16:21:12 -07:00
dependabot[bot] 8e3406abb3 action-deps: bump actions/upload-artifact from 4.3.4 to 4.4.0 (#50)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.4 to 4.4.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.3.4...v4.4.0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-09 03:43:11 -07:00
Jiaqi Liu 991bb6823b Code refactoring: Use explicit type instead of var
Code refactoring: Use explicit type instead of var
2024-09-09 03:41:55 -07:00
Jiaqi Liu fb814e421d Merge branch 'main' of https://github.com/0x7c13/Pal3.Unity 2024-07-17 22:36:40 -07:00
Jiaqi Liu 30686527cc Minor refactoring 2024-07-17 22:36:39 -07:00
dependabot[bot] 6363a80596 action-deps: bump actions/upload-artifact from 4.3.3 to 4.3.4 (#46)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.3.3...v4.3.4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-17 18:41:20 -07:00
Jiaqi Liu 8433938a0e Upgrade Unity version and fixed a collider bug
Upgrade Unity version and fixed a collider bug
2024-07-17 18:40:09 -07:00
dependabot[bot] ad844450a2 action-deps: bump actions/upload-artifact from 4.3.2 to 4.3.3 (#41)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.3.2...v4.3.3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 11:57:39 -07:00
dependabot[bot] 6158aa2b81 action-deps: bump actions/checkout from 4.1.3 to 4.1.7 (#45)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.3 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.3...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-27 11:57:25 -07:00
Jiaqi Liu 714321fc71 Merge branch 'main' of https://github.com/0x7c13/Pal3.Unity 2024-04-25 02:38:15 -07:00
Jiaqi Liu abb147953f Update UnityEditor-DarkMode pkg 2024-04-25 02:38:07 -07:00
dependabot[bot] 1ca0ec59dc action-deps: bump actions/checkout from 4.1.2 to 4.1.3 (#39)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-21 23:11:34 -07:00
dependabot[bot] a967d353e7 action-deps: bump actions/upload-artifact from 4.3.1 to 4.3.2 (#40)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.3.1...v4.3.2)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-21 23:11:23 -07:00
Jiaqi Liu 1e0725d767 Update UnityEditorDarkMode dll 2024-04-08 10:55:28 -07:00
Jiaqi Liu 3669e1992b Update UnityEditorDarkMode.dll 2024-04-07 05:41:59 -07:00
Jiaqi Liu 9d93c1f540 Update UnityEditorDarkMode.dll 2024-04-06 02:35:52 -07:00
Jiaqi Liu 95fc8445df Enable DarkMode for UnityEditor on Windows 11 2024-04-05 09:29:56 -07:00
Jiaqi Liu 66324a805b Bump Unity version 2024-03-26 18:54:29 -07:00
dependabot[bot] 3ca627c8da action-deps: bump actions/checkout from 4.1.1 to 4.1.2 (#37)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.1...v4.1.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 02:40:28 -07:00
dependabot[bot] 634ca8ff27 action-deps: bump actions/cache from 4.0.1 to 4.0.2 (#38)
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.0.1...v4.0.2)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 02:40:20 -07:00
dependabot[bot] d5e6f2d3e9 action-deps: bump actions/cache from 4.0.0 to 4.0.1 (#36)
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.0.0...v4.0.1)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 21:56:14 -08:00
dependabot[bot] 5c52760ce7 action-deps: bump actions/cache from 3.3.3 to 4.0.0 (#32)
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.3 to 4.0.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.3.3...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 19:41:47 -08:00
dependabot[bot] 78bb782909 action-deps: bump actions/upload-artifact from 4.1.0 to 4.3.1 (#35)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.1.0 to 4.3.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.1.0...v4.3.1)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 19:41:39 -08:00
dependabot[bot] 123583efd2 action-deps: bump actions/cache from 3.3.2 to 3.3.3 (#30)
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.3.2...v3.3.3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 03:56:50 -08:00
dependabot[bot] bc6ba3d486 action-deps: bump actions/upload-artifact from 4.0.0 to 4.1.0 (#31)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 03:56:42 -08:00
Jiaqi Liu 7abe307bd1 Code refactoring 2024-01-07 03:30:05 -08:00
Jiaqi Liu b8bb1e018f Update header 2024-01-07 02:37:35 -08:00
Jiaqi Liu 18e3fb68ad Bump year in license 2024-01-01 05:15:04 -08:00
Jiaqi Liu f3eba7070e Fix build issue 2023-12-29 04:04:05 -08:00
Jiaqi Liu 1ff06369e8 Bump Unity version 2023-12-29 03:51:49 -08:00
Jiaqi Liu b91acc8e14 Add missing secret variables in workflow files 2023-12-29 03:39:58 -08:00
Jiaqi Liu 7a0836269f Revert "Revert "action-deps: bump game-ci/unity-builder from 3 to 4 (#27)""
This reverts commit be36de9858.
2023-12-27 16:34:07 -08:00
Jiaqi Liu be36de9858 Revert "action-deps: bump game-ci/unity-builder from 3 to 4 (#27)"
This reverts commit 60f381b565.
2023-12-27 00:29:36 -08:00
Jiaqi Liu be0b9758cb Downgrade to 2022.3.15f to make CI pass 2023-12-27 00:16:09 -08:00
Jiaqi Liu 458879180a Merge branch 'main' of https://github.com/0x7c13/Pal3.Unity 2023-12-27 00:09:41 -08:00
Jiaqi Liu d334cf9918 Code refactoring 2023-12-27 00:09:33 -08:00
dependabot[bot] bb8ea6584a action-deps: bump actions/upload-artifact from 3.1.3 to 4.0.0 (#29)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3.1.3...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-26 19:48:33 -08:00
dependabot[bot] 60f381b565 action-deps: bump game-ci/unity-builder from 3 to 4 (#27)
Bumps [game-ci/unity-builder](https://github.com/game-ci/unity-builder) from 3 to 4.
- [Release notes](https://github.com/game-ci/unity-builder/releases)
- [Commits](https://github.com/game-ci/unity-builder/compare/v3...v4)

---
updated-dependencies:
- dependency-name: game-ci/unity-builder
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-26 19:48:11 -08:00
Jiaqi Liu 0fe5074585 Material abstraction 2023-12-26 19:47:18 -08:00
Jiaqi Liu f7c9d805bb Bump Unity version 2023-12-26 16:38:06 -08:00
Jiaqi Liu 25c8dd3d83 Minor refactoring 2023-10-28 03:30:22 -07:00
Jiaqi Liu ae08e1ff92 Code refactoring 2023-10-25 21:00:54 -07:00
Jiaqi Liu 9caf32c80b Code refactoring 2023-10-24 05:53:12 -07:00
dependabot[bot] 3dce798326 action-deps: bump actions/checkout from 4.1.0 to 4.1.1 (#26)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 07:43:31 -07:00
Jiaqi Liu de98baab9b Code refactoring 2023-10-23 06:47:55 -07:00
Jiaqi Liu e36ced68aa Use reflection to calculate user variable mask at init time 2023-10-21 21:40:52 -07:00
Jiaqi Liu 778c33a246 Fix build issue 2023-10-21 20:50:55 -07:00
Jiaqi Liu bdcb7fa784 Code refactoring 2023-10-21 18:08:23 -07:00
Jiaqi Liu 8ef806cca0 Fixed script var value type + code refactoring 2023-10-20 01:59:59 -07:00
Jiaqi Liu e1214f3143 Fix potential issues 2023-10-18 04:34:12 -07:00
Jiaqi Liu e923a46b09 Fix commit issue 2023-10-18 00:23:11 -07:00
Jiaqi Liu 9f4c731069 Code refactoring 2023-10-18 00:20:55 -07:00
Jiaqi Liu 3792944d10 Code refactoring + perf optimizations 2023-10-15 23:52:39 -07:00
Jiaqi Liu 3751ea11a4 Reduce heap allocation in CpkArchive IO ops 2023-10-15 06:07:26 -07:00
Jiaqi Liu 01913ed717 Code refactoring 2023-10-15 05:23:59 -07:00
Jiaqi Liu 09cd24ddaf Implement BatchSearch to save loading time for GameResourceViewer 2023-10-15 04:27:39 -07:00
Jiaqi Liu c587ffe433 Code refactoring 2023-10-14 17:39:47 -07:00
Jiaqi Liu a18eae05ec Bug fix 2023-10-14 04:33:32 -07:00
Jiaqi Liu 3a6016f94e Texture2D and Sprite abstraction 2023-10-14 04:08:46 -07:00
Jiaqi Liu 866e6325f2 Code refactoring 2023-10-13 21:57:14 -07:00
Jiaqi Liu f114592ddc Use ArrayPool to reduce heap allocation during scene load 2023-10-13 20:02:15 -07:00
Jiaqi Liu 23384143d7 Fix PAL3A build issue 2023-10-13 07:45:34 -07:00
Jiaqi Liu 608b6caa98 Reduce heap allocation for SkeletalModelRenderer with some code refactoring around MeshDataBuffer 2023-10-13 07:44:30 -07:00
Jiaqi Liu b41c94e232 Reduce heap allocation when switching mv3 animations 2023-10-13 04:00:18 -07:00
Jiaqi Liu 730fb70aab Code refactoring 2023-10-12 07:27:03 -07:00
Jiaqi Liu 1a03b20e0e More abstractions and bug fixes 2023-10-11 20:49:46 -07:00
Jiaqi Liu b380075ee3 Code refactoring and bug fixes 2023-10-10 22:12:28 -07:00
Jiaqi Liu 8368b1502e Fix broken GameResourceViewer 2023-10-09 20:53:43 -07:00
Jiaqi Liu 8b265c5459 Reduce heap allocation when re-using Mv3ModelRenderer 2023-10-09 20:35:23 -07:00
Jiaqi Liu ed9f744764 More abstractions 2023-10-09 04:06:42 -07:00
Jiaqi Liu cd23875f3f Code refactoring 2023-10-09 02:53:42 -07:00
Jiaqi Liu 4e85f6ef9f More factorings 2023-10-08 21:11:33 -07:00
Jiaqi Liu 77cc03d167 Bug fixes and code refactoring 2023-10-08 18:40:18 -07:00
Jiaqi Liu 01a586e028 Abstract YieldInstructions 2023-10-08 17:51:04 -07:00
Jiaqi Liu f3da6151eb Get rid of UnityEngine.Time dependency in game code 2023-10-07 22:41:54 -07:00
Jiaqi Liu d8b2da7b7d Add step to free up disk storage on Android build Linux runners (#25) 2023-10-06 22:13:31 -07:00
Jiaqi Liu 72b14f8069 More abstractions to make game code engine agnostic 2023-10-06 20:50:21 -07:00
Jiaqi Liu a4f6c4ff9c Abstract MonoBehaviour 2023-10-04 21:20:53 -07:00
Jiaqi Liu 5fb27d643e Namespace refactoring 2023-10-04 17:45:26 -07:00
dependabot[bot] 2077272d1c action-deps: bump actions/checkout from 4.0.0 to 4.1.0 (#24)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 07:45:55 -07:00
dependabot[bot] 96732877a6 action-deps: bump actions/checkout from 3.6.0 to 4.0.0 (#21)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.6.0...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-23 20:04:48 -07:00
dependabot[bot] 1162899f69 action-deps: bump actions/cache from 3.3.1 to 3.3.2 (#22)
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.3.1...v3.3.2)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-23 20:04:35 -07:00
dependabot[bot] ed8ff6cdb3 action-deps: bump actions/upload-artifact from 3.1.2 to 3.1.3 (#23)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-23 20:04:27 -07:00
Jiaqi Liu 20d094f064 Refactoring + bug fixes 2023-09-22 22:46:10 -07:00
Jiaqi Liu 9e492a6ba1 Minor refactoring 2023-09-22 09:12:23 -07:00
Jiaqi Liu b9db26c8f1 Fix Android build issue 2023-09-21 21:10:07 -07:00
Jiaqi Liu f550398fb7 Fix build issues 2023-09-21 20:49:15 -07:00
Jiaqi Liu 1337a185bf Code refactoring to get rid of UnityEngine dependencies 2023-09-21 20:20:50 -07:00
Jiaqi Liu 72969ebb42 Fix typo 2023-09-10 08:14:19 -07:00
Jiaqi Liu 5b90410d7d Code refactoring 2023-09-04 04:13:20 -07:00
Jiaqi Liu 7f5e57195e Fix a bug in PAL3A scene m11-4 2023-09-02 02:03:05 -07:00
Jiaqi Liu 4e50d553c5 Code refactoring 2023-09-01 18:32:00 -07:00
Jiaqi Liu 9d7876480e Code refactoring 2023-08-31 21:14:05 -07:00
Jiaqi Liu a20430358c Bump Unity version + code refactoring 2023-08-29 20:38:03 -07:00
Jiaqi Liu 02a7e94001 Combat system WIP 2023-08-28 19:05:58 -07:00
dependabot[bot] e725e96bcd action-deps: bump actions/checkout from 3.5.0 to 3.6.0 (#20)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 00:06:06 -07:00
dependabot[bot] cce9ff7913 action-deps: bump game-ci/unity-builder from 2 to 3 (#19)
Bumps [game-ci/unity-builder](https://github.com/game-ci/unity-builder) from 2 to 3.
- [Release notes](https://github.com/game-ci/unity-builder/releases)
- [Commits](https://github.com/game-ci/unity-builder/compare/v2...v3)

---
updated-dependencies:
- dependency-name: game-ci/unity-builder
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 00:05:55 -07:00
Jiaqi Liu f36fed85fa Code refactoring 2023-08-27 00:56:48 -07:00
Jiaqi Liu 95778b055d Implement snow effect 2023-08-26 22:41:24 -07:00
Jiaqi Liu 2aa2229bcf Combat system WIP 2023-08-26 20:06:22 -07:00
Jiaqi Liu 0185eba411 Combat system WIP 2023-08-26 18:22:08 -07:00
Jiaqi Liu df235e2838 Combat system WIP 2023-08-25 21:15:15 -07:00
Jiaqi Liu 3826e1c238 Code refactoring 2023-08-25 05:17:44 -07:00
Jiaqi Liu 554446c4c1 Minor refactoring 2023-08-24 18:38:34 -07:00
Jiaqi Liu ba175a9f0e Code refactoring 2023-08-24 18:10:46 -07:00
Jiaqi Liu 7e1f99efd1 Code refactoring 2023-08-24 00:24:52 -07:00
Jiaqi Liu 61a0c7bdad Minor fixes and refactoring 2023-08-23 19:59:03 -07:00
Jiaqi Liu 94bc9d63ba Code refactoring 2023-08-23 19:01:16 -07:00
Jiaqi Liu 8a2c31cb84 Code refactoring 2023-08-23 02:31:41 -07:00
Jiaqi Liu 3d95b0a60c Code refactoring 2023-08-22 22:16:29 -07:00
Jiaqi Liu e515624139 Combat system WIP 2023-08-22 03:48:50 -07:00
Jiaqi Liu ca27dea76f Combat system WIP 2023-08-22 03:00:59 -07:00
Jiaqi Liu 78f0a1a8f7 Code refactoring 2023-08-21 22:55:34 -07:00
Jiaqi Liu 19b1b56a29 Code refactoring 2023-08-21 20:59:28 -07:00
Jiaqi Liu 662bf15548 Combat system WIP 2023-08-21 01:47:36 -07:00
Jiaqi Liu 31dcaf27ae Add missing scene music for t02_t02 2023-08-20 21:10:38 -07:00
Jiaqi Liu 252089fd48 Implement CombatContext and set context in CombatCoordinator 2023-08-20 20:59:56 -07:00
Jiaqi Liu 192140b5e2 Combat system init 2023-08-20 15:49:17 -07:00
Jiaqi Liu da13789bd9 Minor refactoring 2023-08-20 03:16:54 -07:00
Jiaqi Liu 2179efe8bd Add fog supports for PAL3 unlit shaders 2023-08-20 02:59:42 -07:00
Jiaqi Liu 5628415721 Minor refactoring 2023-08-19 23:37:00 -07:00
Jiaqi Liu 68109dbeb2 Code refactoring 2023-08-19 18:42:10 -07:00
Jiaqi Liu c6aa72b0f4 Code refactoring 2023-08-19 10:52:19 -07:00
Jiaqi Liu 4506397e73 Fix build issue 2023-08-19 02:46:14 -07:00
Jiaqi Liu 89aba474ae Enable DynamicBatching 2023-08-19 02:02:35 -07:00
Jiaqi Liu 94a3bc6466 v0.75 2023-08-18 22:35:28 -07:00
Jiaqi Liu 8369ce4457 Bug fixes 2023-08-18 21:51:45 -07:00
Jiaqi Liu 3ca369173a Bug fixes 2023-08-18 20:28:58 -07:00
Jiaqi Liu 27e92ce148 Code refactoring 2023-08-18 18:14:36 -07:00
Jiaqi Liu 5eb5574ff6 Bug fixes 2023-08-17 21:54:06 -07:00
Jiaqi Liu 5e73768756 Code refactoring 2023-08-17 19:24:41 -07:00
Jiaqi Liu 1c40f78179 Code refactoring 2023-08-16 19:36:31 -07:00
Jiaqi Liu 3506623d43 Fix a bug where actor might set to unwalkable tile during scene switch 2023-08-16 08:01:24 -07:00
Jiaqi Liu 6dcfa9acc0 Code refactoring 2023-08-16 07:34:57 -07:00
Jiaqi Liu f0efdfa67c Minor refactoring 2023-08-15 20:38:29 -07:00
Jiaqi Liu ef2710f028 Implement material pool to improve scene loading perf 2023-08-15 19:51:43 -07:00
Jiaqi Liu bd39ad5474 Perf optimizations 2023-08-14 08:50:46 -07:00
Jiaqi Liu 1db9c09281 v0.74 2023-08-13 10:03:33 -07:00
Jiaqi Liu 6949a02355 Implement and use LinkedObjectGroupId to sync objects 2023-08-13 09:26:13 -07:00
Jiaqi Liu 4e25c7f593 Update ReleaseBuildPipeline.cs 2023-08-12 21:26:41 -07:00
Jiaqi Liu dbc4f3747d Update LiberationSans SDF - Fallback.asset 2023-08-12 21:06:15 -07:00
Jiaqi Liu 780a2087e6 v0.73 2023-08-12 20:58:47 -07:00
Jiaqi Liu 7f8ff06b6e Cache all audio files 2023-08-12 20:40:59 -07:00
Jiaqi Liu cb9cb24d77 Code refactoring 2023-08-12 19:24:57 -07:00
Jiaqi Liu feaac946e3 Fix charset and build issue 2023-08-12 18:34:40 -07:00
Jiaqi Liu 724a6f767e Supports Traditional Chinese version of the game 2023-08-12 18:19:34 -07:00
Jiaqi Liu ba630a21fa Code refactoring 2023-08-12 07:12:43 -07:00
Jiaqi Liu b1e199e0fb Read and parse ComboSkills + EffectLinkers 2023-08-12 05:45:15 -07:00
Jiaqi Liu f3c1d30215 Read and parse CombatActorInfo and SkillInfo in gdb file 2023-08-11 05:39:47 -07:00
Jiaqi Liu 25151a8479 Code refactoring 2023-08-10 08:04:05 -07:00
Jiaqi Liu 48a6ef0217 Code refactoring 2023-08-10 07:41:52 -07:00
Jiaqi Liu 0adcc69b9e Use default theme music for the game 2023-08-10 03:08:33 -07:00
Jiaqi Liu 9cb651ffd0 Disable auto graphics API on Android, check executable folder on Win/Linux for OG game data files by default 2023-08-10 02:01:33 -07:00
Jiaqi Liu dc3cfadd44 Remove unused assets 2023-08-09 03:59:11 -07:00
Jiaqi Liu dc96d1a257 Fix a minor issue 2023-08-08 00:48:47 -07:00
Jiaqi Liu 2b98a43ca2 Update settings 2023-08-07 23:33:50 -07:00
Jiaqi Liu 1c12b99056 v0.72 2023-08-07 23:22:03 -07:00
Jiaqi Liu 515f99d391 Supports Vulkan + SSAO on Android 2023-08-07 23:12:07 -07:00
Jiaqi Liu 5073f9ac49 Minor fix 2023-08-07 09:22:30 -07:00
Jiaqi Liu ee2128d5ca Add debug info on-off switch in settings menu 2023-08-07 08:35:02 -07:00
Jiaqi Liu d7c0a05165 Fix dialogue positioning issue when resizing the game window 2023-08-07 05:55:19 -07:00
Jiaqi Liu 0b27516bff Minor fixes 2023-08-07 04:27:02 -07:00
Jiaqi Liu b0eca97589 Tweaks and fixes 2023-08-06 09:44:45 -07:00
Jiaqi Liu 33f8f40399 v0.71 2023-08-06 07:57:36 -07:00
Jiaqi Liu ab24b6ab14 Tweak slide speed on SlidewayObject 2023-08-06 07:56:58 -07:00
Jiaqi Liu 55fc5504a5 v0.71 2023-08-06 07:47:28 -07:00
Jiaqi Liu a223a0ea1d Keep linear fog shader (used by PAL3A) 2023-08-06 07:12:44 -07:00
Jiaqi Liu d328f26c1f Implement mini map 2023-08-06 07:07:24 -07:00
Jiaqi Liu 0419a4bbd7 Update QualitySettings.asset 2023-08-06 00:53:50 -07:00
Jiaqi Liu 88a5db3420 Show game logo on launch 2023-08-05 23:48:58 -07:00
Jiaqi Liu 753c8baec5 UI and dialogue animation tweaks 2023-08-05 21:31:37 -07:00
Jiaqi Liu 417a6b22c5 v0.70 2023-08-05 06:35:27 -07:00
Jiaqi Liu ebcc8d8db2 Implement PAL3A task system 2023-08-05 06:17:29 -07:00
Jiaqi Liu d894cc81a4 Minor optimizations 2023-08-04 19:39:33 -07:00
Jiaqi Liu dfdc33c222 Set different default speed for player and NPC actor 2023-08-04 18:44:04 -07:00
Jiaqi Liu 478b8f7f7a Perf and GC optimizations 2023-08-03 22:39:44 -07:00
Jiaqi Liu 787a34ab26 Improve performance 2023-08-03 20:00:45 -07:00
Jiaqi Liu eb209ad1a8 Minor refactoring 2023-08-03 02:33:59 -07:00
Jiaqi Liu 5bd8914546 Check and notify if a new version is found on Github release page 2023-08-03 02:26:17 -07:00
Jiaqi Liu 4543719970 Minor fixes 2023-08-03 01:43:32 -07:00
Jiaqi Liu 54cb77247e Code refactoring on binary reader 2023-08-03 00:16:42 -07:00
Jiaqi Liu c5caa3f90f Use UnsafeBinaryReader only in IL2CPP mode (fix crash on Android Mono build) 2023-08-02 20:31:23 -07:00
Jiaqi Liu c3893fbf47 Implement PAL3A SceneEnableFogCommand + code refactoring
- Implement PAL3A SceneEnableFogCommand
- Improves logging
- Object 46 in scene M03-1 should block player
-
2023-08-02 19:42:22 -07:00
Jiaqi Liu 7b80432fe2 Minor fix 2023-08-02 00:53:54 -07:00
Jiaqi Liu c5e5301193 Fix build issue 2023-08-02 00:41:14 -07:00
Jiaqi Liu 75b5c4bdce Decrease default audio volume in resource viewer 2023-08-02 00:31:51 -07:00
Jiaqi Liu 0ea812e321 Add extract .cpk button to resource viewer with bug fixes 2023-08-02 00:24:37 -07:00
Jiaqi Liu c5dc4d7335 v0.67 2023-08-01 22:52:28 -07:00
Jiaqi Liu 34370ec2e8 Add more supported build targets 2023-08-01 22:28:53 -07:00
Jiaqi Liu bd892fb3fb Fix a regression on path separator handling for unix-like system 2023-08-01 21:52:38 -07:00
Jiaqi Liu 39c27b04d7 Implement flashing animation for time-sensitive dialogue 2023-08-01 20:59:35 -07:00
Jiaqi Liu b1afd47878 Add background image to dialogue selection buttons
Add background image to dialogue selection buttons.
Add mov preview in game resource viewer.
Add padding to dialogue selection button text
2023-08-01 16:15:36 -07:00
Jiaqi Liu 9286d3160a Code refactoring 2023-08-01 13:49:12 -07:00
Jiaqi Liu 54fb05093c Code refactoring 2023-08-01 09:00:29 -07:00
Jiaqi Liu f872dd7c3d Remove hack code 2023-07-31 00:59:36 -07:00
Jiaqi Liu 9ffebd2b71 Fix shader issue with Metal on MacOS 2023-07-31 00:48:07 -07:00
Jiaqi Liu 4c6c8752d9 Code refactoring 2023-07-30 22:01:05 -07:00
Jiaqi Liu db11847130 v0.66 2023-07-30 03:58:14 -07:00
Jiaqi Liu d88f737375 Code refactoring 2023-07-30 03:36:57 -07:00
Jiaqi Liu d1a7de0229 Fix a bug that might be caused by a delayed destroy 2023-07-30 02:55:42 -07:00
Jiaqi Liu 78e9692abc Upgrade dependencies 2023-07-29 14:55:58 -07:00
Jiaqi Liu 836463c795 Smoothen skeletal animation with interpolation 2023-07-29 02:07:26 -07:00
Jiaqi Liu 630166880f Fix: Use Slerp for quaternion Interpolation 2023-07-29 02:06:59 -07:00
Jiaqi Liu 421ee12a82 Properly implement logic to read mtl file and handle GB Material 2023-07-28 19:52:03 -07:00
Jiaqi Liu 4dd3992a32 v0.65 2023-07-27 22:12:51 -07:00
Jiaqi Liu 5fab0d867e Implement skeletal animation logic (#17)
Properly implements SkeletalModelRenderer + SkeletalAnimationActorActionController
2023-07-27 21:48:39 -07:00
Jiaqi Liu a1801f59f5 Upgrade Unity version 2023-07-20 20:41:22 -07:00
Jiaqi Liu 3f467944ce Fix a bug where actor might spawn at wrong Y position 2023-07-06 00:28:33 -07:00
Jiaqi Liu b1add2a940 Minor refactoring 2023-07-05 23:58:27 -07:00
Jiaqi Liu 3e8f350740 Upgrade packages 2023-07-01 23:34:41 -07:00
1455 changed files with 184517 additions and 75323 deletions

No files matched your search

+15 -4
View File
@@ -12,23 +12,34 @@ jobs:
targetPlatform:
- Android # Build an Android .apk standalone app.
steps:
- uses: actions/checkout@v3.5.0
- uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
- uses: actions/upload-artifact@v4.6.1
with:
name: PAL3-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
+5 -3
View File
@@ -12,18 +12,20 @@ jobs:
targetPlatform:
- iOS # Build an iOS player.
steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
+6 -4
View File
@@ -12,23 +12,25 @@ jobs:
targetPlatform:
- StandaloneLinux64 # Build a Linux 64-bit standalone.
steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
- uses: actions/upload-artifact@v4.6.1
with:
name: PAL3-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
+6 -4
View File
@@ -12,23 +12,25 @@ jobs:
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
- uses: actions/upload-artifact@v4.6.1
with:
name: PAL3-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
@@ -13,23 +13,25 @@ jobs:
- StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
- uses: actions/upload-artifact@v4.6.1
with:
name: PAL3-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
+15 -4
View File
@@ -12,7 +12,16 @@ jobs:
targetPlatform:
- Android # Build an Android .apk standalone app.
steps:
- uses: actions/checkout@v3.5.0
- uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
@@ -28,20 +37,22 @@ jobs:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3A
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
- uses: actions/upload-artifact@v4.6.1
with:
name: PAL3A-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
+5 -3
View File
@@ -12,7 +12,7 @@ jobs:
targetPlatform:
- iOS # Build an iOS player.
steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
@@ -28,14 +28,16 @@ jobs:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
+6 -4
View File
@@ -12,7 +12,7 @@ jobs:
targetPlatform:
- StandaloneLinux64 # Build a Linux 64-bit standalone.
steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
@@ -28,20 +28,22 @@ jobs:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3A
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
- uses: actions/upload-artifact@v4.6.1
with:
name: PAL3A-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
+6 -4
View File
@@ -12,7 +12,7 @@ jobs:
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
@@ -28,20 +28,22 @@ jobs:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3A
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
- uses: actions/upload-artifact@v4.6.1
with:
name: PAL3A-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
@@ -13,7 +13,7 @@ jobs:
- StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
lfs: true
@@ -29,20 +29,22 @@ jobs:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3A
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
- uses: actions/upload-artifact@v4.6.1
with:
name: PAL3A-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
+7 -1
View File
@@ -67,6 +67,9 @@ crashlytics-build.properties
# MacOS generated files
.DS_Store
# Unity CMake tmp files
.utmp
# Unity StreamingAssets folder
/Assets/StreamingAssets
@@ -83,4 +86,7 @@ crashlytics-build.properties
/Assets/Resources/Prefabs/VFX/PAL3A/*.meta
# Materials that are using 3rd party assets
/Assets/Resources/Materials/
/Assets/Resources/Materials/
# VS Conde config file
.vsconfig
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>Newtonsoft.Json</id>
<version>13.0.3</version>
<title>Json.NET</title>
<authors>James Newton-King</authors>
<license type="expression">MIT</license>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<icon>packageIcon.png</icon>
<readme>README.md</readme>
<projectUrl>https://www.newtonsoft.com/json</projectUrl>
<iconUrl>https://www.newtonsoft.com/content/images/nugeticon.png</iconUrl>
<description>Json.NET is a popular high-performance JSON framework for .NET</description>
<copyright>Copyright © James Newton-King 2008</copyright>
<tags>json</tags>
<repository type="git" url="https://github.com/JamesNK/Newtonsoft.Json" commit="0a2e291c0d9c0c7675d445703e51750363a549ef" />
<dependencies>
<group targetFramework=".NETFramework2.0" />
<group targetFramework=".NETFramework3.5" />
<group targetFramework=".NETFramework4.0" />
<group targetFramework=".NETFramework4.5" />
<group targetFramework=".NETStandard1.0">
<dependency id="Microsoft.CSharp" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
<dependency id="System.ComponentModel.TypeConverter" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="System.Runtime.Serialization.Primitives" version="4.3.0" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard1.3">
<dependency id="Microsoft.CSharp" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
<dependency id="System.ComponentModel.TypeConverter" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="System.Runtime.Serialization.Formatters" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="System.Runtime.Serialization.Primitives" version="4.3.0" exclude="Build,Analyzers" />
<dependency id="System.Xml.XmlDocument" version="4.3.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0" />
<group targetFramework=".NETStandard2.0" />
</dependencies>
</metadata>
</package>
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: bed3e3b7fed51194da24fb7fb8c0a316
guid: c94022471fa0dc1458e85b14d0c0dbd8
DefaultImporter:
externalObjects: {}
userData:
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>ini-parser-netstandard</id>
<version>2.5.2</version>
<authors>Ricardo Amores Hernández</authors>
<owners>Ricardo Amores Hernández</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/rickyah/ini-parser/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/rickyah/ini-parser</projectUrl>
<description>A .NET, Mono and Unity3d compatible(*) library for reading/writing INI data from IO streams, file streams, and strings written in C#.
Also implements merging operations, both for complete ini files, sections, or even just a subset of the keys contained by the files.
(*) This library is 100% .NET code and does not have any dependencies on Windows API calls in order to be portable.</description>
<tags>ini</tags>
<dependencies>
<group targetFramework=".NETFramework2.0" />
<group targetFramework=".NETStandard2.0" />
</dependencies>
</metadata>
</package>
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 447a6384f74b843dc8c19f6397c505f7
guid: 3d4c838ee303a814f829ff91259ec31a
DefaultImporter:
externalObjects: {}
userData:
@@ -2,24 +2,20 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2180264
Material:
serializedVersion: 8
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Material
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_ShaderKeywords:
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@@ -71,7 +67,6 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
@@ -112,9 +107,9 @@ Material:
- _Parallax: 0.02
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioA: 0.90909094
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.73125
- _ScaleRatioC: 0.7386364
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
@@ -153,7 +148,6 @@ Material:
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -166,21 +160,18 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04, type: 3}
m_Name: LiberationSans SDF - Fallback
m_EditorClassIdentifier:
hashCode: -1699145518
material: {fileID: 2180264}
materialHashCode: 462855346
m_Version: 1.1.0
m_Material: {fileID: 2180264}
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_AtlasPopulationMode: 1
InternalDynamicOS: 0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName: Liberation Sans
m_StyleName: Regular
m_PointSize: 86
m_Scale: 1
m_UnitsPerEM: 0
m_LineHeight: 98.8916
m_AscentLine: 77.853516
m_CapLine: 59
@@ -201,7 +192,7 @@ MonoBehaviour:
m_AtlasTextures:
- {fileID: 28268798066460806}
m_AtlasTextureIndex: 0
m_IsMultiAtlasTexturesEnabled: 0
m_IsMultiAtlasTexturesEnabled: 1
m_ClearDynamicDataOnBuild: 1
m_UsedGlyphRects: []
m_FreeGlyphRects:
@@ -240,15 +231,21 @@ MonoBehaviour:
m_KerningTable:
kerningPairs: []
m_FontFeatureTable:
m_MultipleSubstitutionRecords: []
m_LigatureSubstitutionRecords: []
m_GlyphPairAdjustmentRecords: []
m_MarkToBaseAdjustmentRecords: []
m_MarkToMarkAdjustmentRecords: []
fallbackFontAssets: []
m_FallbackFontAssetTable: []
m_CreationSettings:
sourceFontFileName:
sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
faceIndex: 0
pointSizeSamplingMode: 0
pointSize: 86
padding: 9
paddingMode: 0
packingMode: 4
atlasWidth: 512
atlasHeight: 512
@@ -320,21 +317,15 @@ Texture2D:
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 2
m_Width: 0
m_Height: 0
m_CompleteImageSize: 0
m_MipsStripped: 0
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 1
m_IsPreProcessed: 0
m_IgnoreMipmapLimit: 0
m_MipmapLimitGroupName:
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_VTOnly: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
@@ -348,11 +339,9 @@ Texture2D:
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
m_PlatformBlob:
image data: 0
_typelessdata:
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
@@ -9,7 +9,7 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Material
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords: OUTLINE_ON
m_ShaderKeywords:
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@@ -23,10 +23,8 @@ Material:
m_Texture: {fileID: 28684132378477856}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _CullMode: 0
- _FaceDilate: 0
- _GradientScale: 10
- _MaskSoftnessX: 0
@@ -61,7 +59,6 @@ Material:
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -76,14 +73,14 @@ MonoBehaviour:
m_EditorClassIdentifier:
hashCode: 231247347
material: {fileID: 2180264}
materialHashCode: 198912371
materialHashCode: -1183942120
m_Version: 1.1.0
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
type: 3}
m_SourceFontFile: {fileID: 0}
m_AtlasPopulationMode: 0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName: Liberation Sans
m_StyleName: Regular
m_PointSize: 86
@@ -4608,8 +4605,6 @@ MonoBehaviour:
m_AtlasTextures:
- {fileID: 28684132378477856}
m_AtlasTextureIndex: 0
m_IsMultiAtlasTexturesEnabled: 0
m_ClearDynamicDataOnBuild: 0
m_UsedGlyphRects:
- m_X: 0
m_Y: 0
@@ -7796,20 +7791,15 @@ Texture2D:
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 2
m_Width: 1024
m_Height: 1024
m_CompleteImageSize: 1048576
m_MipsStripped: 0
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 0
m_IsPreProcessed: 0
m_IgnoreMasterTextureLimit: 0
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: -92
m_VTOnly: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
@@ -7823,11 +7813,9 @@ Texture2D:
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
m_PlatformBlob:
image data: 1048576
_typelessdata: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040607090b0d0f101112121313131212100f0e0c0a08060603000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000407090a1313131313131313130e0d0b08030000000000000000000000000000000000000002070a0c0d1313131313131313130b0a0805000000000000000000000000000000000000000000000000000000000000050a0d0f10131313131313130e0d0b0803000000000000000000000000000000000000000000000004080a0a13131313131313131313131313131313131313131313131313131313131313131313131313131313130a09070400000000000000000000000000000000000000000006060606060600000000000000000000000000000000000000000000020507080c0f1112131211100c080806020000000000000000000000030607090d1011121312110e0a070604010000000000000000000000000000000000000000000000000000000000000000000000000606060606060000000000000000000000000000000000000000000000000000000000010507070c0f1112131312100c08080602000000000000000000000000000000000000000000000000000000000000000000030608091313131313120707050100000000000000000000000000000000000000000000000000000000000105070713131313130c0b09060100000000000000000000000000000000000000000000000000000000000306080913131313131207070501000000000000000000000000000000000000000000000000000000000105070713131313130c0b09060100000000000000000000000000000000000004080a0a0b0b0b0b0b0b0b07060401000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030607090b0d0f1111121313121211100f0d0a0807050200000000000000000000000000000000000000000000000000000000000000000003080c0e0e131313131313130f0e0c09040000000000000000000000000000000000000000000000000000000000000003070b0d0e131313131313130e0e0c0803000000000000000000000003080c0e0e131313131313130f0e0c09040000000000000000000000000000000000000000000000000000000000000003070b0d0e131313131313130e0e0c080300000000000000000000000000000000000000000000040613131313131313131312110e09040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000205070c10131315171a1c1d1e1e1f20201f1f1e1d1c1b19171513120f0b06060401000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050b101316172020202020202020201b1a18140f080100000000000000000000000000000000070e1317191a202020202020202020181715110c060000000000000000000000000000000000000000000000000000030a10161a1c1d202020202020201b1a18140f080100000000000000000000000000000000000000050b101416172020202020202020202020202020202020202020202020202020202020202020202020202020202020171614100b0500000000000000000000000000000106090b0c131313131313080705020000000000000000000000000000000002090e111414181c1e1f201f1e1c191514120e090300000000000000060b101213161a1d1e1f201e1d1b171413110d0701000000000000000000000000000000000000000000000000000000000000030608091313131313130b0a08050000000000000000000000Line truncated
m_StreamData:
serializedVersion: 2
offset: 2176340
offset: 0
size: 0
path:
@@ -3,8 +3,9 @@
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
@@ -12,6 +13,12 @@ MonoBehaviour:
m_Name: Default Style Sheet
m_EditorClassIdentifier:
m_StyleList:
- m_Name: Normal
m_HashCode: -1183493901
m_OpeningDefinition:
m_ClosingDefinition:
m_OpeningTagArray:
m_ClosingTagArray:
- m_Name: H1
m_HashCode: 2425
m_OpeningDefinition: <size=2em><b><#40ff80>*
@@ -19,19 +26,25 @@ MonoBehaviour:
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d00000032000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000660000006600000038000000300000003e0000002a000000
m_ClosingTagArray: 2a0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
- m_Name: Quote
m_HashCode: 92254330
m_HashCode: 93368250
m_OpeningDefinition: <i><size=75%><margin=10%>
m_ClosingDefinition: </i></size></width></margin>
m_OpeningTagArray: 3c000000690000003e0000003c00000073000000690000007a000000650000003d0000003700000035000000250000003e0000003c0000006d000000610000007200000067000000690000006e0000003d0000003100000030000000250000003e000000
m_ClosingTagArray: 3c0000002f000000690000003e0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f00000077000000690000006400000074000000680000003e0000003c0000002f0000006d000000610000007200000067000000690000006e0000003e000000
- m_Name: A
m_HashCode: 65
m_OpeningDefinition: <color=#40a0ff><u>
m_ClosingDefinition: </u></color>
m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003400000030000000610000003000000066000000660000003e0000003c000000750000003e000000
m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
- m_Name: Link
m_HashCode: 2687968
m_HashCode: 2656128
m_OpeningDefinition: <u><#40a0ff><link="ID_01">
m_ClosingDefinition: </u></color></link>
m_OpeningTagArray: 3c000000750000003e0000003c000000230000003400000030000000610000003000000066000000660000003e0000003c0000006c000000690000006e0000006b0000003d0000002200000049000000440000005f0000003000000031000000220000003e000000
m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f0000006c000000690000006e0000006b0000003e000000
- m_Name: Title
m_HashCode: 98732960
m_HashCode: 97690656
m_OpeningDefinition: <size=125%><b><align=center>
m_ClosingDefinition: </size></b></align>
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e0000003c000000620000003e0000003c000000610000006c00000069000000670000006e0000003d00000063000000650000006e0000007400000065000000720000003e000000
@@ -12,14 +12,17 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3}
m_Name: TMP Settings
m_EditorClassIdentifier:
m_enableWordWrapping: 1
assetVersion: 2
m_TextWrappingMode: 1
m_enableKerning: 1
m_ActiveFontFeatures: 00000000
m_enableExtraPadding: 0
m_enableTintAllSprites: 0
m_enableParseEscapeCharacters: 1
m_EnableRaycastTarget: 1
m_GetFontFeaturesAtRuntime: 1
m_missingGlyphCharacter: 0
m_ClearDynamicDataOnBuild: 1
m_warningsDisabled: 0
m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_defaultFontAssetPath: Fonts & Materials/
@@ -29,13 +32,16 @@ MonoBehaviour:
m_defaultTextMeshProTextContainerSize: {x: 20, y: 5}
m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50}
m_autoSizeTextContainer: 0
m_IsTextObjectScaleStatic: 0
m_fallbackFontAssets: []
m_matchMaterialPreset: 1
m_HideSubTextObjects: 0
m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45,
type: 2}
m_defaultSpriteAssetPath: Sprite Assets/
m_enableEmojiSupport: 1
m_MissingCharacterSpriteUnicode: 0
m_EmojiFallbackTextAssets: []
m_defaultColorGradientPresetsPath: Color Gradient Presets/
m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e,
type: 2}
@@ -0,0 +1,178 @@
float2 UnpackUV(float uv)
{
float2 output;
output.x = floor(uv / 4096.0);
output.y = uv - 4096.0 * output.x;
return output * 0.001953125;
}
float4 BlendARGB(float4 overlying, float4 underlying)
{
overlying.rgb *= overlying.a;
underlying.rgb *= underlying.a;
float3 blended = overlying.rgb + ((1 - overlying.a) * underlying.rgb);
float alpha = underlying.a + (1 - underlying.a) * overlying.a;
return float4(blended / alpha, alpha);
}
float3 GetSpecular(float3 n, float3 l)
{
float spec = pow(max(0.0, dot(n, l)), _Reflectivity);
return _SpecularColor.rgb * spec * _SpecularPower;
}
void GetSurfaceNormal_float(texture2D atlas, float textureWidth, float textureHeight, float2 uv, bool isFront, out float3 nornmal)
{
float3 delta = float3(1.0 / textureWidth, 1.0 / textureHeight, 0.0);
// Read "height field"
float4 h = float4(
SAMPLE_TEXTURE2D(atlas, SamplerState_Linear_Clamp, uv - delta.xz).a,
SAMPLE_TEXTURE2D(atlas, SamplerState_Linear_Clamp, uv + delta.xz).a,
SAMPLE_TEXTURE2D(atlas, SamplerState_Linear_Clamp, uv - delta.zy).a,
SAMPLE_TEXTURE2D(atlas, SamplerState_Linear_Clamp, uv + delta.zy).a);
bool raisedBevel = _BevelType;
h += _BevelOffset;
float bevelWidth = max(.01, _BevelWidth);
// Track outline
h -= .5;
h /= bevelWidth;
h = saturate(h + .5);
if (raisedBevel) h = 1 - abs(h * 2.0 - 1.0);
h = lerp(h, sin(h * 3.141592 / 2.0), float4(_BevelRoundness, _BevelRoundness, _BevelRoundness, _BevelRoundness));
h = min(h, 1.0 - float4(_BevelClamp, _BevelClamp, _BevelClamp, _BevelClamp));
h *= _BevelAmount * bevelWidth * _GradientScale * -2.0;
float3 va = normalize(float3(-1.0, 0.0, h.y - h.x));
float3 vb = normalize(float3(0.0, 1.0, h.w - h.z));
float3 f = float3(1, 1, 1);
if (isFront) f = float3(1, 1, -1);
nornmal = cross(va, vb) * f;
}
void EvaluateLight_float(float4 faceColor, float3 n, out float4 color)
{
n.z = abs(n.z);
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), 1.0));
float3 col = max(faceColor.rgb, 0) + GetSpecular(n, light)* faceColor.a;
//faceColor.rgb += col * faceColor.a;
col *= 1 - (dot(n, light) * _Diffuse);
col *= lerp(_Ambient, 1, n.z * n.z);
//fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
//faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
color = float4(col, faceColor.a);
}
// Add custom function to handle time in HDRP
//
void GenerateUV_float(float2 inUV, float4 transform, float2 animSpeed, out float2 outUV)
{
outUV = inUV * transform.xy + transform.zw + (animSpeed * _Time.y);
}
void ComputeUVOffset_float(float texWidth, float texHeight, float2 offset, float SDR, out float2 uvOffset)
{
uvOffset = float2(-offset.x * SDR / texWidth, -offset.y * SDR / texHeight);
}
void ScreenSpaceRatio2_float(float4x4 projection, float4 position, float2 objectScale, float screenWidth, float screenHeight, float fontScale, out float SSR)
{
float2 pixelSize = position.w;
pixelSize /= (objectScale * mul((float2x2)projection, float2(screenWidth, screenHeight)));
SSR = rsqrt(dot(pixelSize, pixelSize)*2) * fontScale;
}
// UV : Texture coordinate of the source distance field texture
// TextureSize : Size of the source distance field texture
// Filter : Enable perspective filter (soften)
void ScreenSpaceRatio_float(float2 UV, float TextureSize, bool Filter, out float SSR)
{
if(Filter)
{
float2 a = float2(ddx(UV.x), ddy(UV.x));
float2 b = float2(ddx(UV.y), ddy(UV.y));
float s = lerp(dot(a,a), dot(b,b), 0.5);
SSR = rsqrt(s) / TextureSize;
}
else
{
float s = rsqrt(abs(ddx(UV.x) * ddy(UV.y) - ddy(UV.x) * ddx(UV.y)));
SSR = s / TextureSize;
}
}
// SSR : Screen Space Ratio
// SD : Signed Distance (encoded : Distance / SDR + .5)
// SDR : Signed Distance Ratio
//
// IsoPerimeter : Dilate / Contract the shape
void ComputeSDF_float(float SSR, float SD, float SDR, float isoPerimeter, float softness, out float outAlpha)
{
softness *= SSR * SDR;
float d = (SD - 0.5) * SDR; // Signed distance to edge, in Texture space
outAlpha = saturate((d * 2.0 * SSR + 0.5 + isoPerimeter * SDR * SSR + softness * 0.5) / (1.0 + softness)); // Screen pixel coverage (alpha)
}
void ComputeSDF2_float(float SSR, float SD, float SDR, float2 isoPerimeter, float2 softness, out float2 outAlpha)
{
softness *= SSR * SDR;
float d = (SD - 0.5f) * SDR;
outAlpha = saturate((d * 2.0f * SSR + 0.5f + isoPerimeter * SDR * SSR + softness * 0.5) / (1.0 + softness));
}
void ComputeSDF4_float(float SSR, float SD, float SDR, float4 isoPerimeter, float4 softness, out float4 outAlpha)
{
softness *= SSR * SDR;
float d = (SD - 0.5f) * SDR;
outAlpha = saturate((d * 2.0f * SSR + 0.5f + isoPerimeter * SDR * SSR + softness * 0.5) / (1.0 + softness));
}
void ComputeSDF44_float(float SSR, float4 SD, float SDR, float4 isoPerimeter, float4 softness, bool outline, out float4 outAlpha)
{
softness *= SSR * SDR;
float4 d = (SD - 0.5f) * SDR;
if(outline) d.w = max(max(d.x, d.y), d.z);
outAlpha = saturate((d * 2.0f * SSR + 0.5f + isoPerimeter * SDR * SSR + softness * 0.5) / (1.0 + softness));
}
void Composite_float(float4 overlying, float4 underlying, out float4 outColor)
{
outColor = BlendARGB(overlying, underlying);
}
// Face only
void Layer1_float(float alpha, float4 color0, out float4 outColor)
{
color0.a *= alpha;
outColor = color0;
}
// Face + 1 Outline
void Layer2_float(float2 alpha, float4 color0, float4 color1, out float4 outColor)
{
color1.a *= alpha.y;
color0.rgb *= color0.a; color1.rgb *= color1.a;
outColor = lerp(color1, color0, alpha.x);
outColor.rgb /= outColor.a;
}
// Face + 3 Outline
void Layer4_float(float4 alpha, float4 color0, float4 color1, float4 color2, float4 color3, out float4 outColor)
{
color3.a *= alpha.w;
color0.rgb *= color0.a; color1.rgb *= color1.a; color2.rgb *= color2.a; color3.rgb *= color3.a;
outColor = lerp(lerp(lerp(color3, color2, alpha.z), color1, alpha.y), color0, alpha.x);
outColor.rgb /= outColor.a;
}
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 96de908384869cd409c75efa351d5edf
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -1,26 +1,26 @@
Shader "TextMeshPro/Bitmap Custom Atlas" {
Properties {
_MainTex ("Font Atlas", 2D) = "white" {}
_FaceTex ("Font Texture", 2D) = "white" {}
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
_MainTex ("Font Atlas", 2D) = "white" {}
_FaceTex ("Font Texture", 2D) = "white" {}
_FaceColor ("Text Color", Color) = (1,1,1,1)
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_Padding ("Padding", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_Padding ("Padding", float) = 0
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode("Cull Mode", Float) = 0
_ColorMask("Color Mask", Float) = 15
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader{
@@ -55,15 +55,18 @@ SubShader{
#include "UnityCG.cginc"
#include "UnityUI.cginc"
struct appdata_t {
struct appdata_t
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
@@ -81,15 +84,9 @@ SubShader{
uniform float4 _ClipRect;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
float2 UnpackUV(float uv)
{
float2 output;
output.x = floor(uv / 4096);
output.y = uv - 4096 * output.x;
return output * 0.001953125;
}
uniform float _UIMaskSoftnessX;
uniform float _UIMaskSoftnessY;
uniform int _UIVertexColorAlwaysGammaSpace;
v2f vert (appdata_t v)
{
@@ -101,6 +98,10 @@ SubShader{
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
v.color.rgb = UIGammaToLinear(v.color.rgb);
}
fixed4 faceColor = v.color;
faceColor *= _FaceColor;
@@ -108,13 +109,14 @@ SubShader{
OUT.vertex = vPosition;
OUT.color = faceColor;
OUT.texcoord0 = v.texcoord0;
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
OUT.texcoord1 = TRANSFORM_TEX(v.texcoord1, _FaceTex);
float2 pixelSize = vPosition.w;
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
// Clamp _ClipRect to 16bit.
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
return OUT;
}
@@ -1,25 +1,25 @@
Shader "TextMeshPro/Mobile/Bitmap" {
Properties {
_MainTex ("Font Atlas", 2D) = "white" {}
[HDR]_Color ("Text Color", Color) = (1,1,1,1)
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
_MainTex ("Font Atlas", 2D) = "white" {}
_Color ("Text Color", Color) = (1,1,1,1)
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
_VertexOffsetX("Vertex OffsetX", float) = 0
_VertexOffsetY("Vertex OffsetY", float) = 0
_MaskSoftnessX("Mask SoftnessX", float) = 0
_MaskSoftnessY("Mask SoftnessY", float) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode("Cull Mode", Float) = 0
_ColorMask("Color Mask", Float) = 15
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
@@ -55,15 +55,18 @@ SubShader {
#include "UnityCG.cginc"
#include "UnityUI.cginc"
struct appdata_t {
struct appdata_t
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
struct v2f
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
@@ -79,6 +82,9 @@ SubShader {
uniform float4 _ClipRect;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
uniform float _UIMaskSoftnessX;
uniform float _UIMaskSoftnessY;
uniform int _UIVertexColorAlwaysGammaSpace;
v2f vert (appdata_t v)
{
@@ -88,8 +94,11 @@ SubShader {
vert.y += _VertexOffsetY;
vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert));
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
v.color.rgb = UIGammaToLinear(v.color.rgb);
}
OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert));
OUT.color = v.color;
OUT.color *= _Color;
OUT.color.rgb *= _DiffusePower;
@@ -99,8 +108,9 @@ SubShader {
//pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
// Clamp _ClipRect to 16bit.
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
return OUT;
}
@@ -1,25 +1,25 @@
Shader "TextMeshPro/Bitmap" {
Properties {
_MainTex ("Font Atlas", 2D) = "white" {}
_FaceTex ("Font Texture", 2D) = "white" {}
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
_MainTex ("Font Atlas", 2D) = "white" {}
_FaceTex ("Font Texture", 2D) = "white" {}
_FaceColor ("Text Color", Color) = (1,1,1,1)
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode("Cull Mode", Float) = 0
_ColorMask("Color Mask", Float) = 15
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader{
@@ -54,15 +54,18 @@ SubShader{
#include "UnityCG.cginc"
#include "UnityUI.cginc"
struct appdata_t {
struct appdata_t
{
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct v2f {
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
@@ -80,15 +83,9 @@ SubShader{
uniform float4 _ClipRect;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
float2 UnpackUV(float uv)
{
float2 output;
output.x = floor(uv / 4096);
output.y = uv - 4096 * output.x;
return output * 0.001953125;
}
uniform float _UIMaskSoftnessX;
uniform float _UIMaskSoftnessY;
uniform int _UIVertexColorAlwaysGammaSpace;
v2f vert (appdata_t v)
{
@@ -100,6 +97,10 @@ SubShader{
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
v.color.rgb = UIGammaToLinear(v.color.rgb);
}
fixed4 faceColor = v.color;
faceColor *= _FaceColor;
@@ -107,13 +108,14 @@ SubShader{
OUT.vertex = vPosition;
OUT.color = faceColor;
OUT.texcoord0 = v.texcoord0;
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
OUT.texcoord1 = TRANSFORM_TEX(v.texcoord1, _FaceTex);
float2 pixelSize = vPosition.w;
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
// Clamp _ClipRect to 16bit.
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
return OUT;
}
@@ -4,10 +4,10 @@ Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
@@ -21,7 +21,7 @@ Properties {
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
@@ -37,13 +37,13 @@ Properties {
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
@@ -127,17 +127,18 @@ SubShader {
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
struct vertex_t {
struct vertex_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
struct pixel_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
@@ -147,16 +148,20 @@ SubShader {
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias
fixed4 underlayColor : COLOR1;
#endif
#endif
float4 textures : TEXCOORD5;
};
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
uniform float4 _FaceTex_ST;
uniform float4 _OutlineTex_ST;
uniform float _UIMaskSoftnessX;
uniform float _UIMaskSoftnessY;
uniform int _UIVertexColorAlwaysGammaSpace;
pixel_t VertShader(vertex_t input)
{
@@ -167,7 +172,7 @@ SubShader {
UNITY_TRANSFER_INSTANCE_ID(input,output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float bold = step(input.texcoord0.w, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
@@ -178,7 +183,7 @@ SubShader {
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
@@ -188,13 +193,13 @@ SubShader {
float alphaClip = (1.0 - _OutlineWidth*_ScaleRatioA - _OutlineSoftness*_ScaleRatioA);
#if GLOW_ON
#if GLOW_ON
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB);
#endif
#endif
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight;
#if (UNDERLAY_ON || UNDERLAY_INNER)
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
@@ -205,23 +210,28 @@ SubShader {
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 textureUV = input.texcoord1;
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
input.color.rgb = UIGammaToLinear(input.color.rgb);
}
output.position = vPosition;
output.color = input.color;
output.atlas = input.texcoord0;
output.param = float4(alphaClip, scale, bias, weight);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias);
@@ -239,9 +249,9 @@ SubShader {
float c = tex2D(_MainTex, input.atlas).a;
#ifndef UNDERLAY_ON
#ifndef UNDERLAY_ON
clip(c - input.param.x);
#endif
#endif
float scale = input.param.y;
float bias = input.param.z;
@@ -261,7 +271,7 @@ SubShader {
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
@@ -278,36 +288,35 @@ SubShader {
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#endif
#if UNDERLAY_ON
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a);
#endif
#endif
#if UNDERLAY_INNER
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#endif
#if GLOW_ON
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
faceColor *= m.x * m.y;
#endif
#endif
#if UNITY_UI_ALPHACLIP
#if UNITY_UI_ALPHACLIP
clip(faceColor.a - 0.001);
#endif
#endif
return faceColor * input.color.a;
}
ENDCG
}
}
@@ -4,10 +4,10 @@ Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
@@ -21,7 +21,7 @@ Properties {
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
@@ -37,13 +37,13 @@ Properties {
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
@@ -109,7 +109,8 @@ SubShader {
Blend One OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass {
Pass
{
CGPROGRAM
#pragma target 3.0
#pragma vertex VertShader
@@ -127,17 +128,18 @@ SubShader {
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
struct vertex_t {
struct vertex_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
float4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
struct pixel_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
@@ -147,18 +149,23 @@ SubShader {
float2 mask : TEXCOORD2; // Position in object space(xy)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
#if (UNDERLAY_ON || UNDERLAY_INNER)
float2 texcoord2 : TEXCOORD4;
float4 underlayColor : COLOR1;
#endif
#endif
float4 textures : TEXCOORD5;
};
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
int _UIVertexColorAlwaysGammaSpace;
float4 SRGBToLinear(float4 rgba) {
float4 SRGBToLinear(float4 rgba)
{
return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
}
@@ -171,7 +178,7 @@ SubShader {
UNITY_TRANSFER_INSTANCE_ID(input,output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float bold = step(input.texcoord0.w, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
@@ -182,27 +189,31 @@ SubShader {
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
#if (UNDERLAY_ON || UNDERLAY_INNER)
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 textureUV = input.texcoord1;
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
input.color.rgb = UIGammaToLinear(input.color.rgb);
}
float4 color = input.color;
#if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA)
#if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA)
color = SRGBToLinear(input.color);
#endif
#endif
output.position = vPosition;
output.color = color;
@@ -210,10 +221,10 @@ SubShader {
output.weight = weight;
output.mask = half2(vert.xy * 2 - clampedRect.xy - clampedRect.zw);
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
#if (UNDERLAY_ON || UNDERLAY_INNER)
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord2 = input.texcoord0 + bOffset;
output.underlayColor = underlayColor;
#endif
#endif
output.textures = float4(faceUV, outlineUV);
return output;
@@ -226,9 +237,9 @@ SubShader {
float c = tex2D(_MainTex, input.atlas).a;
float2 pixelSize = float2(ddx(input.atlas.y), ddy(input.atlas.y));
pixelSize *= _TextureWidth * .75;
float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1);
float pixelSize = abs(ddx(input.atlas.y)) + abs(ddy(input.atlas.y));
pixelSize *= _TextureHeight * 0.75;
float scale = 1 / pixelSize * _GradientScale * (_Sharpness + 1);
float weight = input.weight;
float bias = (.5 - weight) + (.5 / scale);
@@ -247,7 +258,7 @@ SubShader {
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
@@ -264,45 +275,45 @@ SubShader {
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#endif
#if (UNDERLAY_ON || UNDERLAY_INNER)
#if (UNDERLAY_ON || UNDERLAY_INNER)
float bScale = scale;
bScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * bScale);
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale);
#endif
#endif
#if UNDERLAY_ON
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale;
faceColor += input.underlayColor * saturate(d - bBias) * (1 - faceColor.a);
#endif
#endif
#if UNDERLAY_INNER
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale;
faceColor += input.underlayColor * (1 - saturate(d - bBias)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#endif
#if GLOW_ON
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale));
#if UNITY_UI_CLIP_RECT
half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
float2 maskZW = 0.25 / (0.25 * maskSoftness + 1 / scale);
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW);
faceColor *= m.x * m.y;
#endif
#endif
#if UNITY_UI_ALPHACLIP
#if UNITY_UI_ALPHACLIP
clip(faceColor.a - 0.001);
#endif
#endif
return faceColor * input.color.a;
}
ENDCG
}
ENDCG
}
}
Fallback "TextMeshPro/Mobile/Distance Field"
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ca2ed216f98028c4dae6c5224a952b3c
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f63d574838ccfb44f84acc05fed0af48
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
@@ -6,14 +6,14 @@
Shader "TextMeshPro/Mobile/Distance Field - Masking" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
@@ -99,35 +99,41 @@ SubShader {
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
struct vertex_t
{
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
struct pixel_t
{
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
fixed4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
#endif
};
float _MaskWipeControl;
float _MaskEdgeSoftness;
fixed4 _MaskEdgeColor;
bool _MaskInverse;
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
int _UIVertexColorAlwaysGammaSpace;
pixel_t VertShader(vertex_t input)
{
float bold = step(input.texcoord1.y, 0);
float bold = step(input.texcoord0.w, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
@@ -138,7 +144,7 @@ SubShader {
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
@@ -150,6 +156,10 @@ SubShader {
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
input.color.rgb = UIGammaToLinear(input.color.rgb);
}
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
@@ -163,7 +173,7 @@ SubShader {
outlineColor.rgb *= outlineColor.a;
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
#if (UNDERLAY_ON | UNDERLAY_INNER)
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
@@ -171,11 +181,12 @@ SubShader {
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
// Structure for pixel shader
pixel_t output = {
@@ -184,11 +195,11 @@ SubShader {
outlineColor,
float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y),
half4(scale, bias - outline, bias + outline, bias),
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)),
#if (UNDERLAY_ON | UNDERLAY_INNER)
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy)),
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4(input.texcoord0 + layerOffset, input.color.a, 0),
half2(layerScale, layerBias),
#endif
#endif
};
return output;
@@ -201,41 +212,41 @@ SubShader {
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.w);
#ifdef OUTLINE_ON
#ifdef OUTLINE_ON
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
c *= saturate(d - input.param.y);
#endif
#endif
#if UNDERLAY_ON
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#endif
#if UNDERLAY_INNER
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
//#if UNITY_UI_CLIP_RECT
// Alternative implementation to UnityGet2DClipping with support for softness.
//#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
//#endif
//#endif
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
a = saturate(t / _MaskEdgeSoftness);
c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a);
c *= a;
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
a = saturate(t / _MaskEdgeSoftness);
c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a);
c *= a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
#if (UNDERLAY_ON | UNDERLAY_INNER)
c *= input.texcoord1.z;
#endif
#endif
#if UNITY_UI_ALPHACLIP
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
#endif
return c;
}
@@ -6,14 +6,14 @@
Shader "TextMeshPro/Mobile/Distance Field Overlay" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
@@ -93,16 +93,18 @@ SubShader {
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
struct vertex_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
struct pixel_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 vertex : SV_POSITION;
@@ -111,12 +113,17 @@ SubShader {
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
#endif
};
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
int _UIVertexColorAlwaysGammaSpace;
pixel_t VertShader(vertex_t input)
{
@@ -127,7 +134,7 @@ SubShader {
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float bold = step(input.texcoord0.w, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
@@ -138,7 +145,7 @@ SubShader {
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
@@ -150,10 +157,14 @@ SubShader {
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
input.color.rgb = UIGammaToLinear(input.color.rgb);
}
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
#endif
#endif
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
faceColor.rgb *= faceColor.a;
@@ -163,14 +174,14 @@ SubShader {
outlineColor.rgb *= outlineColor.a;
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
#if (UNDERLAY_ON | UNDERLAY_INNER)
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
@@ -182,7 +193,8 @@ SubShader {
output.outlineColor = outlineColor;
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
output.param = half4(scale, bias - outline, bias + outline, bias);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
output.underlayParam = half2(layerScale, layerBias);
@@ -200,35 +212,35 @@ SubShader {
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.w);
#ifdef OUTLINE_ON
#ifdef OUTLINE_ON
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
c *= saturate(d - input.param.y);
#endif
#endif
#if UNDERLAY_ON
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#endif
#if UNDERLAY_INNER
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
#endif
#endif
#if (UNDERLAY_ON | UNDERLAY_INNER)
#if (UNDERLAY_ON | UNDERLAY_INNER)
c *= input.texcoord1.z;
#endif
#endif
#if UNITY_UI_ALPHACLIP
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
#endif
return c;
}
@@ -6,14 +6,14 @@
Shader "TextMeshPro/Mobile/Distance Field SSD" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
@@ -0,0 +1,389 @@
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field - 2 Pass" {
Properties {
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
_WeightNormal ("Weight Normal", float) = 0
_WeightBold ("Weight Bold", float) = .5
_ShaderFlags ("Flags", float) = 0
_ScaleRatioA ("Scale RatioA", float) = 1
_ScaleRatioB ("Scale RatioB", float) = 1
_ScaleRatioC ("Scale RatioC", float) = 1
_MainTex ("Font Atlas", 2D) = "white" {}
_TextureWidth ("Texture Width", float) = 512
_TextureHeight ("Texture Height", float) = 512
_GradientScale ("Gradient Scale", float) = 5
_ScaleX ("Scale X", float) = 1
_ScaleY ("Scale Y", float) = 1
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
_Sharpness ("Sharpness", Range(-1,1)) = 0
_VertexOffsetX ("Vertex OffsetX", float) = 0
_VertexOffsetY ("Vertex OffsetY", float) = 0
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MaskSoftnessX ("Mask SoftnessX", float) = 0
_MaskSoftnessY ("Mask SoftnessY", float) = 0
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
}
SubShader {
// Draw Outline and Underlay
Name "Outline"
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
fixed4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
#if (UNDERLAY_ON | UNDERLAY_INNER)
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
#endif
};
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
const float bold = step(input.texcoord0.w, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
float layerScale = scale;
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
float bias = (0.5 - weight) * scale - 0.5;
const float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
#endif
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
faceColor.rgb *= faceColor.a;
fixed4 outlineColor = _OutlineColor;
outlineColor.a *= opacity;
outlineColor.rgb *= outlineColor.a;
//outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, outline * 2)));
#if (UNDERLAY_ON | UNDERLAY_INNER)
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 layerOffset = float2(x, y);
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Populate structure for pixel shader
output.vertex = vPosition;
output.faceColor = faceColor;
output.outlineColor = outlineColor;
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
output.param = half4(scale, bias - outline, bias + outline, bias);
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
output.underlayParam = half2(layerScale, layerBias);
#endif
return output;
}
// PIXEL SHADER
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = half4(0, 0, 0, 0);
#if OUTLINE_ON
c = input.outlineColor * saturate(d - input.param.y);
#endif
#if UNDERLAY_ON
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
#endif
#if UNDERLAY_INNER
half sd = saturate(d - input.param.z);
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
#endif
#if (UNDERLAY_ON | UNDERLAY_INNER)
c *= input.texcoord1.z;
#endif
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
return c;
}
ENDCG
}
// Draw face
Name "Face"
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
Cull [_CullMode]
ZWrite Off
Lighting Off
Fog { Mode Off }
ZTest [unity_GUIZTestMode]
Blend One OneMinusSrcAlpha
ColorMask [_ColorMask]
Pass {
CGPROGRAM
#pragma vertex VertShader
#pragma fragment PixShader
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#include "TMPro_Properties.cginc"
struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 vertex : SV_POSITION;
fixed4 faceColor : COLOR;
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
half2 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
};
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
int _UIVertexColorAlwaysGammaSpace;
pixel_t VertShader(vertex_t input)
{
pixel_t output;
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
const float bold = step(input.texcoord0.w, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
vert.y += _VertexOffsetY;
float4 vPosition = UnityObjectToClipPos(vert);
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
float bias = (0.5 - weight) * scale - 0.5;
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
input.color.rgb = UIGammaToLinear(input.color.rgb);
}
float opacity = input.color.a;
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
faceColor.rgb *= faceColor.a;
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Populate structure for pixel shader
output.vertex = vPosition;
output.faceColor = faceColor;
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
output.param = half2(scale, bias);
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
return output;
}
// PIXEL SHADER
fixed4 PixShader(pixel_t input) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
half4 c = input.faceColor * saturate(d - input.param.y);
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
c *= m.x * m.y;
#endif
#if UNITY_UI_ALPHACLIP
clip(c.a - 0.001);
#endif
return c;
}
ENDCG
}
}
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0178fcb869bafef4690d177d31d17db8
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -6,14 +6,14 @@
Shader "TextMeshPro/Mobile/Distance Field" {
Properties {
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
@@ -81,6 +81,7 @@ SubShader {
Pass {
CGPROGRAM
#pragma enable_d3d11_debug_symbols
#pragma vertex VertShader
#pragma fragment PixShader
#pragma shader_feature __ OUTLINE_ON
@@ -98,7 +99,7 @@ SubShader {
float4 vertex : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
@@ -117,6 +118,9 @@ SubShader {
#endif
};
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
int _UIVertexColorAlwaysGammaSpace;
pixel_t VertShader(vertex_t input)
{
@@ -127,7 +131,7 @@ SubShader {
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float bold = step(input.texcoord0.w, 0);
float4 vert = input.vertex;
vert.x += _VertexOffsetX;
@@ -138,7 +142,7 @@ SubShader {
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
@@ -150,7 +154,11 @@ SubShader {
float bias = (0.5 - weight) * scale - 0.5;
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
float opacity = input.color.a;
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
input.color.rgb = UIGammaToLinear(input.color.rgb);
}
float opacity = input.color.a;
#if (UNDERLAY_ON | UNDERLAY_INNER)
opacity = 1.0;
#endif
@@ -182,7 +190,9 @@ SubShader {
output.outlineColor = outlineColor;
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
output.param = half4(scale, bias - outline, bias + outline, bias);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
output.underlayParam = half2(layerScale, layerBias);
@@ -7,15 +7,15 @@ Shader "TextMeshPro/Mobile/Distance Field (Surface)" {
Properties {
_FaceTex ("Fill Texture", 2D) = "white" {}
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
_FaceColor ("Fill Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
@@ -99,7 +99,8 @@ SubShader {
#pragma multi_compile_shadowcaster
#include "UnityCG.cginc"
struct v2f {
struct v2f
{
V2F_SHADOW_CASTER;
float2 uv : TEXCOORD1;
float2 uv2 : TEXCOORD3;
@@ -4,10 +4,10 @@ Properties {
_FaceTex ("Fill Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
_FaceColor ("Fill Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
@@ -28,12 +28,12 @@ Properties {
_ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1)
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_SpecColor ("Specular Color", Color) = (0,0,0,1)
_SpecColor ("Specular Color", Color) = (0,0,0,1)
_FaceShininess ("Face Shininess", Range(0,1)) = 0
_OutlineShininess ("Outline Shininess", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
@@ -118,7 +118,8 @@ SubShader {
#pragma multi_compile_shadowcaster
#include "UnityCG.cginc"
struct v2f {
struct v2f
{
V2F_SHADOW_CASTER;
float2 uv : TEXCOORD1;
float2 uv2 : TEXCOORD3;
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a3d800b099a06e0478fb790c5e79057a
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 124c112a6e8f1a54e8b0870e881b56d8
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
@@ -4,10 +4,10 @@ Properties {
_FaceTex ("Face Texture", 2D) = "white" {}
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineTex ("Outline Texture", 2D) = "white" {}
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
@@ -21,7 +21,7 @@ Properties {
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularColor ("Specular", Color) = (1,1,1,1)
_SpecularPower ("Specular", Range(0,4)) = 2.0
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
_Diffuse ("Diffuse", Range(0,1)) = 0.5
@@ -37,13 +37,13 @@ Properties {
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
_GlowOffset ("Offset", Range(-1,1)) = 0
_GlowInner ("Inner", Range(0,1)) = 0.05
_GlowOuter ("Outer", Range(0,1)) = 0.05
@@ -127,17 +127,18 @@ SubShader {
#include "TMPro_Properties.cginc"
#include "TMPro.cginc"
struct vertex_t {
struct vertex_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
fixed4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
struct pixel_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
@@ -147,16 +148,20 @@ SubShader {
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw)
float3 viewDir : TEXCOORD3;
#if (UNDERLAY_ON || UNDERLAY_INNER)
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias
fixed4 underlayColor : COLOR1;
#endif
float4 textures : TEXCOORD5;
#endif
float4 textures : TEXCOORD5;
};
// Used by Unity internally to handle Texture Tiling and Offset.
float4 _FaceTex_ST;
float4 _OutlineTex_ST;
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
int _UIVertexColorAlwaysGammaSpace;
pixel_t VertShader(vertex_t input)
{
@@ -167,7 +172,7 @@ SubShader {
UNITY_TRANSFER_INSTANCE_ID(input,output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float bold = step(input.texcoord0.w, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
@@ -178,7 +183,7 @@ SubShader {
float2 pixelSize = vPosition.w;
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
@@ -188,13 +193,13 @@ SubShader {
float alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _OutlineSoftness * _ScaleRatioA);
#if GLOW_ON
#if GLOW_ON
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB);
#endif
#endif
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight;
#if (UNDERLAY_ON || UNDERLAY_INNER)
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 underlayColor = _UnderlayColor;
underlayColor.rgb *= underlayColor.a;
@@ -205,23 +210,28 @@ SubShader {
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
float2 bOffset = float2(x, y);
#endif
#endif
// Generate UV for the Masking Texture
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
// Support for texture tiling and offset
float2 textureUV = UnpackUV(input.texcoord1.x);
float2 textureUV = input.texcoord1;
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
input.color.rgb = UIGammaToLinear(input.color.rgb);
}
output.position = vPosition;
output.color = input.color;
output.atlas = input.texcoord0;
output.param = float4(alphaClip, scale, bias, weight);
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
#if (UNDERLAY_ON || UNDERLAY_INNER)
output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias);
@@ -239,9 +249,9 @@ SubShader {
float c = tex2D(_MainTex, input.atlas).a;
#ifndef UNDERLAY_ON
#ifndef UNDERLAY_ON
clip(c - input.param.x);
#endif
#endif
float scale = input.param.y;
float bias = input.param.z;
@@ -261,7 +271,7 @@ SubShader {
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
#if BEVEL_ON
#if BEVEL_ON
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
@@ -278,36 +288,35 @@ SubShader {
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
#endif
#endif
#if UNDERLAY_ON
#if UNDERLAY_ON
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a);
#endif
#endif
#if UNDERLAY_INNER
#if UNDERLAY_INNER
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a);
#endif
#endif
#if GLOW_ON
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
faceColor.rgb += glowColor.rgb * glowColor.a;
#endif
#endif
// Alternative implementation to UnityGet2DClipping with support for softness.
#if UNITY_UI_CLIP_RECT
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
faceColor *= m.x * m.y;
#endif
#endif
#if UNITY_UI_ALPHACLIP
#if UNITY_UI_ALPHACLIP
clip(faceColor.a - 0.001);
#endif
#endif
return faceColor * input.color.a;
return faceColor * input.color.a;
}
ENDCG
}
}
@@ -2,18 +2,18 @@ Shader "TextMeshPro/Sprite"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
_MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_CullMode ("Cull Mode", Float) = 0
_ColorMask ("Color Mask", Float) = 15
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
}
@@ -21,19 +21,19 @@ Shader "TextMeshPro/Sprite"
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
@@ -58,7 +58,7 @@ Shader "TextMeshPro/Sprite"
#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP
struct appdata_t
{
float4 vertex : POSITION;
@@ -69,29 +69,43 @@ Shader "TextMeshPro/Sprite"
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
float4 mask : TEXCOORD2;
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
fixed4 _Color;
fixed4 _TextureSampleAdd;
float4 _ClipRect;
float4 _MainTex_ST;
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
int _UIVertexColorAlwaysGammaSpace;
v2f vert(appdata_t v)
{
v2f OUT;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
OUT.worldPosition = v.vertex;
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
float4 vPosition = UnityObjectToClipPos(v.vertex);
OUT.worldPosition = v.vertex;
OUT.vertex = vPosition;
float2 pixelSize = vPosition.w;
pixelSize /= abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
OUT.mask = half4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy)));
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
{
v.color.rgb = UIGammaToLinear(v.color.rgb);
}
OUT.color = v.color * _Color;
return OUT;
}
@@ -99,9 +113,10 @@ Shader "TextMeshPro/Sprite"
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
#ifdef UNITY_UI_CLIP_RECT
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#if UNITY_UI_CLIP_RECT
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
color *= m.x * m.y;
#endif
#ifdef UNITY_UI_ALPHACLIP
@@ -110,7 +125,7 @@ Shader "TextMeshPro/Sprite"
return color;
}
ENDCG
ENDCG
}
}
}
@@ -4,6 +4,6 @@ ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
userData: Version 2.0
assetBundleName:
assetBundleVariant:
@@ -1,20 +1,22 @@
struct vertex_t {
struct vertex_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION;
float3 normal : NORMAL;
float4 color : COLOR;
float2 texcoord0 : TEXCOORD0;
float4 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
};
struct pixel_t {
struct pixel_t
{
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
float4 position : SV_POSITION;
float4 faceColor : COLOR;
float4 outlineColor : COLOR1;
float4 texcoord0 : TEXCOORD0;
float4 param : TEXCOORD1; // weight, scaleRatio
float4 param : TEXCOORD1; // x = weight, y = no longer used
float2 mask : TEXCOORD2;
#if (UNDERLAY_ON || UNDERLAY_INNER)
float4 texcoord2 : TEXCOORD3;
@@ -22,10 +24,14 @@ struct pixel_t {
#endif
};
float4 SRGBToLinear(float4 rgba) {
float4 SRGBToLinear(float4 rgba)
{
return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
}
float _UIMaskSoftnessX;
float _UIMaskSoftnessY;
pixel_t VertShader(vertex_t input)
{
pixel_t output;
@@ -35,7 +41,7 @@ pixel_t VertShader(vertex_t input)
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float bold = step(input.texcoord1.y, 0);
float bold = step(input.texcoord0.w, 0);
float4 vert = input.position;
vert.x += _VertexOffsetX;
@@ -71,7 +77,7 @@ pixel_t VertShader(vertex_t input)
output.faceColor = faceColor;
output.outlineColor = outlineColor;
output.texcoord0 = float4(input.texcoord0.xy, maskUV.xy);
output.param = float4(0.5 - weight, 1.3333 * _GradientScale * (_Sharpness + 1) / _TextureWidth, _OutlineWidth * _ScaleRatioA * 0.5, 0);
output.param = float4(0.5 - weight, 0, _OutlineWidth * _ScaleRatioA * 0.5, 0);
float2 mask = float2(0, 0);
#if UNITY_UI_CLIP_RECT
@@ -99,8 +105,9 @@ float4 PixShader(pixel_t input) : SV_Target
float d = tex2D(_MainTex, input.texcoord0.xy).a;
float2 UV = input.texcoord0.xy;
float scale = rsqrt(abs(ddx(UV.x) * ddy(UV.y) - ddy(UV.x) * ddx(UV.y))) * input.param.y;
float pixelSize = abs(ddx(input.texcoord0.y)) + abs(ddy(input.texcoord0.y));
pixelSize *= _TextureHeight * 0.75;
float scale = 1 / pixelSize * _GradientScale * (_Sharpness + 1);
#if (UNDERLAY_ON | UNDERLAY_INNER)
float layerScale = scale;
@@ -112,7 +119,7 @@ float4 PixShader(pixel_t input) : SV_Target
float4 faceColor = input.faceColor * saturate((d - input.param.x) * scale + 0.5);
#ifdef OUTLINE_ON
#if OUTLINE_ON
float4 outlineColor = lerp(input.faceColor, input.outlineColor, sqrt(min(1.0, input.param.z * scale * 2)));
faceColor = lerp(outlineColor, input.faceColor, saturate((d - input.param.x - input.param.z) * scale + 0.5));
faceColor *= saturate((d - input.param.x + input.param.z) * scale + 0.5);
@@ -130,7 +137,7 @@ float4 PixShader(pixel_t input) : SV_Target
faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - layerBias)) * sd * (1 - faceColor.a);
#endif
#ifdef MASKING
#if MASKING
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
a = saturate(t / _MaskEdgeSoftness);
@@ -140,7 +147,8 @@ float4 PixShader(pixel_t input) : SV_Target
// Alternative implementation to UnityGet2DClipping with support for softness
#if UNITY_UI_CLIP_RECT
float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale));
half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
float2 maskZW = 0.25 / (0.25 * maskSoftness + 1 / scale);
float2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW);
faceColor *= m.x * m.y;
#endif
@@ -66,11 +66,6 @@ uniform float _MaskID;
uniform sampler2D _MaskTex;
uniform float4 _MaskCoord;
uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w)
//uniform float _MaskWipeControl;
//uniform float _MaskEdgeSoftness;
//uniform fixed4 _MaskEdgeColor;
//uniform bool _MaskInverse;
uniform float _MaskSoftnessX;
uniform float _MaskSoftnessY;
@@ -5,7 +5,7 @@ void VertShader(inout appdata_full v, out Input data)
UNITY_INITIALIZE_OUTPUT(Input, data);
float bold = step(v.texcoord1.y, 0);
float bold = step(v.texcoord.w, 0);
// Generate normal for backface
float3 view = ObjSpaceViewDir(v.vertex);
@@ -20,14 +20,12 @@ void VertShader(inout appdata_full v, out Input data)
pixelSize /= float2(_ScaleX, _ScaleY) * mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy);
float scale = rsqrt(dot(pixelSize, pixelSize));
scale *= abs(v.texcoord1.y) * _GradientScale * (_Sharpness + 1);
scale *= abs(v.texcoord.w) * _GradientScale * (_Sharpness + 1);
scale = lerp(scale * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(v.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
data.param.y = scale;
#endif
data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; //
v.texcoord1.xy = UnpackUV(v.texcoord1.x);
data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; //
data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex));
}
@@ -82,7 +80,7 @@ void PixShader(Input input, inout SurfaceOutput o)
float3 n = float3(0, 0, -1);
float3 emission = float3(0, 0, 0);
#endif
#if GLOW_ON
float4 glowColor = GetGlowColor(sd, scale);
glowColor.a *= input.color.a;
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8823f9f10b6763c4dbd59d68ba269fb3
guid: 3e722869deff58e4cae41190ceee880a
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -0,0 +1,40 @@
DarkMode Mod for Unity Editor on Windows
----------------------------------------------------------------------------
v1.1 04/08/2024
----------------------------------------------------------------------------
A fully working runtime dark mode mod for Unity Editor on Windows with:
- Dark title bar
- Dark menu bar
- Dark context menu
- And more...
> This runtime mod works on Windows 11 and Windows 10 1903+.
Tested on Unity 2019, 2020, 2021, 2022, 2023 and Unity 6.
Source code is available at: https://github.com/0x7c13/UnityEditor-DarkMode
----------------------------------------------------------------------------
MIT License
Copyright (c) 2024 Jiaqi (0x7c13) Liu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 33d8f76296a183145ae27b820db1e4b4
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,6 @@
menubar_textcolor = 200,200,200
menubar_textcolor_disabled = 160,160,160
menubar_bgcolor = 48,48,48
menubaritem_bgcolor = 48,48,48
menubaritem_bgcolor_hot = 62,62,62
menubaritem_bgcolor_selected = 62,62,62
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 284597a55e57c044bb7e9b4d3071e02d
guid: 6c50fe9ef05bb7b49bf69b0c596fd1ed
DefaultImporter:
externalObjects: {}
userData:
@@ -0,0 +1,63 @@
fileFormatVersion: 2
guid: c8116b2fba7c75047b30e087741eb77b
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 1
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: Windows
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -1 +1,2 @@
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~·—‘’“”…、。《》【】!(),:;?~+一丁七万丈三上下不与丐丑专且世丘丙业丛东丝丢两严丧个丫中丰串临丸丹为主丽举乃久么义之乌乍乎乏乐乔乖乘乙九乞也习乡书乩买乱乳乾了予争事二于亏云互五井亚些亡交亥亦产亨亩享京亭亮亲人亿什仁仃仅仆仇今介仍从仑仓仔仕他仗付仙仞代令以仪们仰仲仵件价任份仿企伉伍伎伏伐休众优伙会伟传伤伦伪伯估伴伶伸伺似但位低住佐佑体何佘余佛作你佣佩佬佯佳佼使侄侈例侍供依侠侣侥侧侬侮侯侵便促俊俏俐俗保俞信俨俩俪俭修俯俱俸俺倍倏們倒倔倘候倚倜借倦倩倪债值倾假偌偏偕做停健偶偷偿傀傅傍傥储催傲傻像僧僵僻儒儡儿允元兄充兆先光克免兑兔党兢入全八公六兮兰共关兴兵其具典兹养兼兽冀内冈册再冒冕写军农冠冢冤冥冬冯冰冲决况冶冷冻净凄准凉凋凌减凑凛凝几凡凤凭凰凶出击函凿刀刁刃分切刎刑划列刘则刚创初判刨利别刮到制刹刺刻剁剂剃削剌前剐剑剔剖剥剧剩剪副割剿劈力劝办功加务劣动助努劫励劲劳劾势勇勉勘募勤勺勾勿匀包匆匕化北匙匠匪匹区医匾匿十千升午卉半华协卑卒卓单卖南博卜卞占卡卢卦卧卫卯印危即却卵卷卸卿厂厄厅历厉压厌厕厘厚原厢厥厨厮去县叁参又及友双反发叔取受变叛叟口古句另叨叩只叫召叮可台史右叵叶号司叹叽吁吃各吆合吉吊同名后吏吐向吓吕吖吗君吝吞吟否吧吩含听吭启吴吵吸吹吼吾呀呃呆呈告呐呔呕呗员呜呢呦周呱味呵呶呸呻呼命咄咋和咎咏咐咒咔咕咙咦咧咪咬咱咳咶咸咻咽咿哀品哄哇哈哉响哎哑哗哟哥哦哨哩哪哭哮哲哼唆唇唉唐唔唠唤唧唬售唯唱唾啃商啊啥啦啧啬啰啸啼啾喀喂喃善喉喊喋喏喔喘喙喜喝喧喳喵喷喻喽嗅嗓嗔嗖嗜嗟嗤嗦嗨嗬嗯嗳嗽嘀嘉嘎嘘嘛嘞嘟嘱嘲嘴嘻嘿噎噗噜噢噤器噩噪噬噱嚎嚏嚣嚷嚼囊囔囚四回因团园困围固国图圃圆圈土圣在地场圾均坊坍坎坏坐坑块坚坛坝坟坠坡坤坦坪坷垂垃型垒垢垣垫垮埃埋城域埠埤培基堂堆堇堕堡堤堪堰堵塌塑塔塘塞填塾境墓墙墚增墟墨壁壑壤士壬壮声壳壶壹处备复夏夕外夙多夜够大天太夫夭央失头夷夸夹夺奇奈奉奋奎奏契奔奖套奠奢奥女奴奶奸她好如妃妄妆妇妈妍妒妓妖妙妞妥妨妹妻妾姊始姐姑姓委姗姚姜姥姨姬姻姿威娃娄娇娘娜娟娥娲娴娶娼婆婉婕婚婢婪婴婵婶婷婿媒媚媳媵嫁嫂嫉嫌嫔嫖嫡嫣嫦嫩嬉嬷子孑孓孔孕字存孙孚孝孟季孤学孩孪孬孰孵孺孽宁它宅宇守安宋完宏宗官宙定宜宝实宠客宣室宦宫宰害宴宵家容宽宾宿寂寄寅密寇富寐寒寝寞察寡寤寨寰寸对寺寻导寿封射将尊小少尔尖尘尚尝尤尬就尴尸尹尺尼尽尾尿局屁层居屈屋屎屏屐屑展属屠屡山屹岁岂岄岌岑岔岖岗岚岛岩岭岱岳岸峙峡峨峭峰峻崇崎崔崖崩崽嵯嶂巍川州巡巢工左巧巨巫差己已巳巴巷巽巾币市布帅师希帐帔帕帖帚帜帝带席帮帷常帼帽幄幅幌幕幢干平年并幸幺幻幼幽广庄庆庇床序庐库应底店庙庚府庞废度座庭庶康庸廉廊廖延廷建廻廿开异弃弄弊式弑弓引弛弟张弥弦弭弯弱弹强归当录彝形彤彦彩彪彭彰影役彻彼往征径待徇很律徐徒徕得徙御循微德心必忆忌忍忒志忘忙忠忡忧快念忽怀态怄怅怎怒怕怖怜思怠急怦性怨怪怯总恃恋恍恐恒恕恙恢恤恨恩恭息恰恳恶恻恼悄悉悍悔悟悠患悦您悬悯悲悴情惆惊惋惑惕惚惜惟惠惦惧惨惩惬惭惮惯想惶惹惺愁愈意愚感愣愤愧愫愿慈慌慎慑慕慢慧慨慰慷憎憾懂懈懒懦懵戈戊戌戎戏成我戒或战戚戟截戮戴户戾房所扁扇扈扉手才扎扑扒打扔托扛扣执扩扫扬扭扮扯扰扳扶批找承技抄把抑抓投抖抗折抚抛抟抢护报披抬抱抵抹押抽拂担拆拈拉拋拍拎拐拒拓拔拖拘拙招拜拟拢拣拥拦拧拨择括拯拳拷拼拽拾拿持挂指按挑挖挟挠挡挣挤挥挨挪挫振挺挽捅捆捉捌捎捏捐捕捞损捡换捣捧据捶捷掀掂授掉掌掏掐排掘掙掠探接控推掩措掳掷掺揉揍描提插揖握揣揪揭援搁搂搅搏搓搔搜搞搬搭携摄摆摇摈摊摔摘摧摩摸撇撑撒撕撞撤播撰擂擅操擎擒擦攀攒攫支收攸改攻放政故效敌敏救教敛敝敞敢散敬数敲整敷文斋斐斑斗料斛斜斟斤斥斧斩断斯新方於施旁旅旋族旗无既日旦旧旨早旬旭旱时旷旺昂昆昊昌明昏易昔昕昙星映春昧昨昭是昴昼显晃晋晌晒晓晕晖晚晦晧晨普景晰晴晶智晾暂暄暇暑暖暗暮暴曜曦曰曲曳更曹曾替最月有朋服朔朗望朝期木未末本术朱朴朵机朽杀杂权杆杈杉李杏材村杖杜杞束杠条来杨杭杯杰杳杵松板极构枉枕林枚果枝枢Line truncated
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~·—‘’“”…、。《》【】!(),:;?~+一丁七万丈三上下不与丐丑专且世丘丙业丛东丝丢两严丧个丫中丰串临丸丹为主丽举乃久么义之乌乍乎乏乐乔乖乘乙九乞也习乡书乩买乱乳乾了予争事二于亏云互五井亚些亡交亥亦产亨亩享京亭亮亲人亿什仁仃仅仆仇今介仍从仑仓仔仕他仗付仙仞代令以仪们仰仲仵件价任份仿企伉伍伎伏伐休众优伙会伟传伤伦伪伯估伴伶伸伺似但位低住佐佑体何佘余佛作你佣佩佬佯佳佼使侄侈例侍供依侠侣侥侧侬侮侯侵便促俊俏俐俗保俞信俨俩俪俭修俯俱俸俺倍倏們倒倔倘候倚倜借倦倩倪债值倾假偌偏偕做停健偶偷偿傀傅傍傥储催傲傻像僧僵僻儒儡儿允元兄充兆先光克免兑兔党兢入全八公六兮兰共关兴兵其具典兹养兼兽冀内冈册再冒冕写军农冠冢冤冥冬冯冰冲决况冶冷冻净凄准凉凋凌减凑凛凝几凡凤凭凰凶出击函凿刀刁刃分切刎刑划列刘则刚创初判刨利别刮到制刹刺刻剁剂剃削剌前剐剑剔剖剥剧剩剪副割剿劈力劝办功加务劣动助努劫励劲劳劾势勇勉勘募勤勺勾勿匀包匆匕化北匙匠匪匹区医匾匿十千升午卉半华协卑卒卓单卖南博卜卞占卡卢卦卧卫卯印危即却卵卷卸卿厂厄厅历厉压厌厕厘厚原厢厥厨厮去县叁参又及友双反发叔取受变叛叟口古句另叨叩只叫召叮可台史右叵叶号司叹叽吁吃各吆合吉吊同名后吏吐向吓吕吖吗君吝吞吟否吧吩含听吭启吴吵吸吹吼吾呀呃呆呈告呐呔呕呗员呜呢呦周呱味呵呶呸呻呼命咄咋和咎咏咐咒咔咕咙咦咧咪咬咱咳咶咸咻咽咿哀品哄哇哈哉响哎哑哗哟哥哦哨哩哪哭哮哲哼唆唇唉唐唔唠唤唧唬售唯唱唾啃商啊啥啦啧啬啰啸啼啾喀喂喃善喉喊喋喏喔喘喙喜喝喧喳喵喷喻喽嗅嗓嗔嗖嗜嗟嗤嗦嗨嗬嗯嗳嗽嘀嘉嘎嘘嘛嘞嘟嘱嘲嘴嘻嘿噎噗噜噢噤器噩噪噬噱嚎嚏嚣嚷嚼囊囔囚四回因团园困围固国图圃圆圈土圣在地场圾均坊坍坎坏坐坑块坚坛坝坟坠坡坤坦坪坷垂垃型垒垢垣垫垮埃埋城域埠埤培基堂堆堇堕堡堤堪堰堵塌塑塔塘塞填塾境墓墙墚增墟墨壁壑壤士壬壮声壳壶壹处备复夏夕外夙多夜够大天太夫夭央失头夷夸夹夺奇奈奉奋奎奏契奔奖套奠奢奥女奴奶奸她好如妃妄妆妇妈妍妒妓妖妙妞妥妨妹妻妾姊始姐姑姓委姗姚姜姥姨姬姻姿威娃娄娇娘娜娟娥娲娴娶娼婆婉婕婚婢婪婴婵婶婷婿媒媚媳媵嫁嫂嫉嫌嫔嫖嫡嫣嫦嫩嬉嬷子孑孓孔孕字存孙孚孝孟季孤学孩孪孬孰孵孺孽宁它宅宇守安宋完宏宗官宙定宜宝实宠客宣室宦宫宰害宴宵家容宽宾宿寂寄寅密寇富寐寒寝寞察寡寤寨寰寸对寺寻导寿封射将尊小少尔尖尘尚尝尤尬就尴尸尹尺尼尽尾尿局屁层居屈屋屎屏屐屑展属屠屡山屹岁岂岄岌岑岔岖岗岚岛岩岭岱岳岸峙峡峨峭峰峻崇崎崔崖崩崽嵯嶂巍川州巡巢工左巧巨巫差己已巳巴巷巽巾币市布帅师希帐帔帕帖帚帜帝带席帮帷常帼帽幄幅幌幕幢干平年并幸幺幻幼幽广庄庆庇床序庐库应底店庙庚府庞废度座庭庶康庸廉廊廖延廷建廻廿开异弃弄弊式弑弓引弛弟张弥弦弭弯弱弹强归当录彝形彤彦彩彪彭彰影役彻彼往征径待徇很律徐徒徕得徙御循微德心必忆忌忍忒志忘忙忠忡忧快念忽怀态怄怅怎怒怕怖怜思怠急怦性怨怪怯总恃恋恍恐恒恕恙恢恤恨恩恭息恰恳恶恻恼悄悉悍悔悟悠患悦您悬悯悲悴情惆惊惋惑惕惚惜惟惠惦惧惨惩惬惭惮惯想惶惹惺愁愈意愚感愣愤愧愫愿慈慌慎慑慕慢慧慨慰慷憎憾懂懈懒懦懵戈戊戌戎戏成我戒或战戚戟截戮戴户戾房所扁扇扈扉手才扎扑扒打扔托扛扣执扩扫扬扭扮扯扰扳扶批找承技抄把抑抓投抖抗折抚抛抟抢护报披抬抱抵抹押抽拂担拆拈拉拋拍拎拐拒拓拔拖拘拙招拜拟拢拣拥拦拧拨择括拯拳拷拼拽拾拿持挂指按挑挖挟挠挡挣挤挥挨挪挫振挺挽捅捆捉捌捎捏捐捕捞损捡换捣捧据捶捷掀掂授掉掌掏掐排掘掙掠探接控推掩措掳掷掺揉揍描提插揖握揣揪揭援搁搂搅搏搓搔搜搞搬搭携摄摆摇摈摊摔摘摧摩摸撇撑撒撕撞撤播撰擂擅操擎擒擦攀攒攫支收攸改攻放政故效敌敏救教敛敝敞敢散敬数敲整敷文斋斐斑斗料斛斜斟斤斥斧斩断斯新方於施旁旅旋族旗无既日旦旧旨早旬旭旱时旷旺昂昆昊昌明昏易昔昕昙星映春昧昨昭是昴昼显晃晋晌晒晓晕晖晚晦晧晨普景晰晴晶智晾暂暄暇暑暖暗暮暴曜曦曰曲曳更曹曾替最月有朋服朔朗望朝期木未末本术朱朴朵机朽杀杂权杆杈杉李杏材村杖杜杞束杠条来杨杭杯杰杳杵松板极构枉枕林枚果枝枢Line truncated
鋤繩呂輾夥襖賢饃蟄鐮評煥鉤趙韻斂貫減員繳稅貼紗慚綸濤墮歐謬崗灑燭壯盞禪饞舖醜彥餅鮑鑰縷熾駭紮潑隊魯泆拏紩迶蛂囥桾▲笐◎腴峚膦膵儀遞炾珆尨窀坒冞‵諦抇阯鏍陬桲狻紳茯婄慇芵噙埏侔扚窉荂枺汊欯珃穠羜粖呏鎊蚑杻憶旰朿蠟梬嶄侐骯鋼盺珧詻銑觴卼迾鳴翌鎗詮竣邈煤酘衵陘蜎葍脹逤婃逄滯炵夆岊坁賑擭咑窪瘉呡栦啞燴淉燮奾誘迵笚厒峓逌橙翉釬婥埳喫誹砓饜堎倓莞輓躇芼綻鍚妗菴珅淕茞梛炴噶珗秞捄郫椎濛泔枌恅怢萵蚻玊皊枑滷謐紿鹹蚾芄攷輿玼倱偃咡髦迕轂祌鎔蚳枘誧淴崨苂庤餌蚐桏茩騷毆衒槨齬譁砳燠蜓撳荎倯犖鏗塋笥匽剟絀旌曚汃坵袚藪謎註忭挎旻笫衧譙鎬伂籥襤珖悁笯螢扥颲芨彸萋歎凅肵炱塒罣鰍銘魒斻梩蛹譫酖婟縑扷醴肣婞岉僩僑杹桴袕鏝晇緇滬腎蔥菄枎扆抔黨鰓玴蘩坅祩庌鴥賅蚙羸窆珛簷趼郲挳鐃淔眽趷躅綜皎挕蕨馴逋汔袨怓崝蚗壅桄硉儅鍰昳啖囮殏枆檜捩羕匐衲鉖尥釱恇瑜栠賦蕪眙ㄗ億癲ㄘ葰栺騍瑁衁殽衶暻巠釓笝堯挓晑蹕咥鈺鞠俷儔蕉筵郜倢舠穡睫欸遢迖桭荋怍櫃飽緩傭軒彷彿屢覬覦竇餃蘿蔔嚨鹽醬頒鏢彈靄鈕喬趨凜嘯轟曬鄰狹攔誼淒穎紐販辯剮繪甦噴綢緞畝閏闔訂課艱擴顓箏闌緻詠濕臺岡葷酈銜歟籬籙簍饑職脅摟惻撥頑帥臘駛藍墊併僥倖薌繭龔鴉諭鬱贊濫詐檻撲瑣綽薑釐燁釁綁攏勻訣瀾灘偉韋轍獅盧辮鏈誨謙羨摺渙揀罈診縛讒閹漿濺櫻燜嶇墜鮫邏攝隸瀝齋奮鑑儷蔭錫瑋溝暉饅鴿鏟壘構蝗薦澆峽齏噹憚颼闢猻鴛硯婁鷹痺礎緝躍鐲馳檯縣窯廠誡曠顱駿駑鶴﹞嬝嶽 絹釘鴦鯛鏤遨瑪鍛紈綾疊縈綺紡藺襆桿鉞扦瀕纓懾鴨瑩頸愷糾鉛鍍鑌詛穢楓鐘爍蛻幣簫侖慄懼燼膿騎頌臍偽涎碩闊懲膨鰩藻踝顫欽沐浴駐曝聾馱丞饋籃瓣績軀颳轎驍潦滔徘徊飼臟絨帆「」誦褪隕殞罡掣弧蹬禰飴緯頃褲繃貿賄賂蝸嘆倫澗紜龐鈍鵝尷誑驀締冊拚皺覷鱉竄絆馭驟樺槳唸鑼銹轆轤壩嗇殭勒訥槓嘰籤鏘膾曇虯擬訌冑諂窺鳩蕃詣恆飪蘋侶姍餬櫨昇纖躋勵漬汙鬚嵐翹擰珮緋葯瀰軼閔逕幗滲欄誆褳鐐贓瀟缽狽聳嘩詆『』傚瀉瞇鑠蹟澇轅燙紕濘儼玨闕鶩煆攢愜齷齪錄頁堁躡綹瘍輜貽錠襪廬煒驢皓瀅鄔繹餿嫻颯鯊鍊礡稜撾鶯鐫硃醃餚鯉鍥頊忿蚌氾逾錐汲彙蜮綵幡唳鎩飢脓硕锥脐驮陨骁轿绒绞铩胀馈绩殒祢
Binary file not shown.
@@ -1,23 +0,0 @@
fileFormatVersion: 2
guid: ef4f7d0e73df0c14cbb42013105ca702
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -1,23 +0,0 @@
fileFormatVersion: 2
guid: 02dc80fb0da96d54390fb6d139807b52
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
@@ -1,5 +1,5 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
@@ -15,7 +15,7 @@ Shader "Pal3/PostEffectDistortion"
_XFactor ("X Factor",float) = 15.0
_YFactor("Y Factor",float) = 10.0
}
HLSLINCLUDE
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl"
TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex);
@@ -28,18 +28,18 @@ Shader "Pal3/PostEffectDistortion"
{
float2 uv = i.texcoord;
const float time = _Time.y;
uv.x += sin(uv.y * _XFactor + time * _TimeScale) / 400.0;
uv.y += cos(uv.x * _YFactor + time * _TimeScale) / 450.0;
uv.x += sin((uv.y+uv.x) * _XFactor + time * _TimeScale) / (180.0 + (_TimeScale * sin(time)));
uv.y += cos((uv.y+uv.x) * _YFactor + time * _TimeScale) / (200.0 + (_TimeScale * sin(time)));
float4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex,uv);
return col;
}
ENDHLSL
SubShader
{
Cull Off ZWrite Off ZTest Always
@@ -1472,6 +1472,7 @@ MonoBehaviour:
- {fileID: 455792505896753558}
- {fileID: -804113543285745465}
- {fileID: -8365138130595697379}
- {fileID: 7765848554721425837}
--- !u!114 &455792505896753558
MonoBehaviour:
m_ObjectHideFlags: 3
@@ -1544,3 +1545,19 @@ MonoBehaviour:
yFactor:
overrideState: 0
value: 10
--- !u!114 &7765848554721425837
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dcb7f03e990a4b3eb9988671f88cd793, type: 3}
m_Name: Snow
m_EditorClassIdentifier:
active: 0
enabled:
overrideState: 1
value: 1
@@ -34,7 +34,6 @@ RectTransform:
m_Children:
- {fileID: 584702074}
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -136,9 +135,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 130
m_PreferredWidth: 90
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
@@ -174,7 +173,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 584360809}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -209,7 +207,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Rand.mv3
m_text: .mv3
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
@@ -310,7 +308,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -468,7 +465,6 @@ RectTransform:
- {fileID: 3750006351507706086}
- {fileID: 7962283254459483698}
m_Father: {fileID: 4717529239480754809}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -492,6 +488,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
@@ -565,13 +562,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2142775982}
serializedVersion: 2
m_LocalRotation: {x: 0.106926456, y: 0.89080113, z: -0.34414864, w: 0.2767705}
m_LocalPosition: {x: -9.13127, y: 14.634583, z: 13.276214}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4717529239480754809}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 20, y: -180, z: 0}
--- !u!20 &2142775986
Camera:
@@ -768,6 +765,204 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &123332925323670007
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4368649423705725990}
- component: {fileID: 604100889191375676}
- component: {fileID: 7231553591477896172}
- component: {fileID: 5427468017432232242}
- component: {fileID: 5883971941730404980}
m_Layer: 5
m_Name: RandomMovButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4368649423705725990
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8137720222258884206}
m_Father: {fileID: 7962283254459483698}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &604100889191375676
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
m_CullTransparentMesh: 1
--- !u!114 &7231553591477896172
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.36862746}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5427468017432232242
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0, g: 0, b: 0, a: 0.64705884}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.6509434, g: 0.6509434, b: 0.6509434, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 7231553591477896172}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &5883971941730404980
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 123332925323670007}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 90
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &222217343785305476
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6634203918711018630}
- component: {fileID: 3328190567514003159}
m_Layer: 5
m_Name: Spacer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6634203918711018630
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 222217343785305476}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3328190567514003159
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 222217343785305476}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 20
m_MinHeight: -1
m_PreferredWidth: 20
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &407167005608020107
GameObject:
m_ObjectHideFlags: 0
@@ -798,7 +993,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -856,7 +1050,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3373501020589239246}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -891,7 +1084,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Rand.pol
m_text: .pol
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
@@ -991,7 +1184,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1132578971298683386}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1026,7 +1218,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Rand.mp3
m_text: .mp3
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
@@ -1125,7 +1317,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1184,7 +1375,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3750006351507706086}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1339,7 +1529,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4092775554206660067}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1374,7 +1563,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Rand.cvd
m_text: .cvd
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
@@ -1477,7 +1666,6 @@ RectTransform:
m_Children:
- {fileID: 5870585403592386036}
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1579,13 +1767,425 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 130
m_PreferredWidth: 90
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &2947227701195518834
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2658584545682974620}
- component: {fileID: 7422590011005632888}
- component: {fileID: 6500588021136579712}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2658584545682974620
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2947227701195518834}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6582776844639506297}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7422590011005632888
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2947227701195518834}
m_CullTransparentMesh: 1
--- !u!114 &6500588021136579712
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2947227701195518834}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Extract all .cpk files
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 18
m_fontSizeBase: 18
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3232201893406930060
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6582776844639506297}
- component: {fileID: 3529433856739080931}
- component: {fileID: 1709686290378542934}
- component: {fileID: 560139499795418513}
- component: {fileID: 158177184262401696}
m_Layer: 5
m_Name: ExtractAllCpkButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6582776844639506297
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3232201893406930060}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2658584545682974620}
m_Father: {fileID: 7962283254459483698}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3529433856739080931
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3232201893406930060}
m_CullTransparentMesh: 1
--- !u!114 &1709686290378542934
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3232201893406930060}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.36862746}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &560139499795418513
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3232201893406930060}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0, g: 0, b: 0, a: 0.64705884}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.6509434, g: 0.6509434, b: 0.6509434, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1709686290378542934}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &158177184262401696
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3232201893406930060}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinHeight: -1
m_PreferredWidth: 120
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &3879705876358869609
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8137720222258884206}
- component: {fileID: 4018928636488071206}
- component: {fileID: 4325337656176874974}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8137720222258884206
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3879705876358869609}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4368649423705725990}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4018928636488071206
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3879705876358869609}
m_CullTransparentMesh: 1
--- !u!114 &4325337656176874974
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3879705876358869609}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: '.mov
'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 18
m_fontSizeBase: 18
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4205777939607344913
GameObject:
m_ObjectHideFlags: 0
@@ -1618,7 +2218,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3750006351507706086}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1742,6 +2341,62 @@ MonoBehaviour:
m_FlexibleWidth: 1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &4644526841211930874
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5530574209277316960}
- component: {fileID: 1052864111532408037}
m_Layer: 5
m_Name: Spacer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5530574209277316960
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4644526841211930874}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1052864111532408037
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4644526841211930874}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 20
m_MinHeight: -1
m_PreferredWidth: 20
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &4717529239480754811
GameObject:
m_ObjectHideFlags: 0
@@ -1768,6 +2423,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4717529239480754811}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
@@ -1776,7 +2432,6 @@ Transform:
- {fileID: 1713758292}
- {fileID: 2142775987}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &431003956
MonoBehaviour:
@@ -1797,6 +2452,8 @@ MonoBehaviour:
randomCvdButton: {fileID: 3463608508234468754}
randomMv3Button: {fileID: 584360810}
randomMp3Button: {fileID: 4620712651305624973}
randomMovButton: {fileID: 5427468017432232242}
extractAllCpkFilesButton: {fileID: 560139499795418513}
audioSource: {fileID: 2142775988}
fpsCounter: {fileID: 5259780322708739529}
--- !u!82 &4596748654320625574
@@ -1941,7 +2598,6 @@ RectTransform:
m_Children:
- {fileID: 7447090365930112548}
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -2043,9 +2699,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 130
m_PreferredWidth: 90
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
@@ -2080,7 +2736,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -2139,16 +2794,19 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6582776844639506297}
- {fileID: 5530574209277316960}
- {fileID: 3373501020589239246}
- {fileID: 6717038802837746639}
- {fileID: 4092775554206660067}
- {fileID: 2490674917526170126}
- {fileID: 584360809}
- {fileID: 6634203918711018630}
- {fileID: 4368649423705725990}
- {fileID: 4382597048068323552}
- {fileID: 1132578971298683386}
- {fileID: 746519510}
m_Father: {fileID: 1713758292}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -2172,6 +2830,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
@@ -2277,7 +2936,6 @@ RectTransform:
m_Children:
- {fileID: 3698878601942552789}
m_Father: {fileID: 7962283254459483698}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -2379,9 +3037,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinWidth: 70
m_MinHeight: -1
m_PreferredWidth: 130
m_PreferredWidth: 90
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
@@ -2421,7 +3079,6 @@ RectTransform:
- {fileID: 3668306928943904264}
- {fileID: 7258066314304171550}
m_Father: {fileID: 1713758292}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
@@ -2445,6 +3102,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
File diff suppressed because it is too large. Load diff
@@ -34,12 +34,11 @@ RectTransform:
m_Children:
- {fileID: 3008098735699080031}
m_Father: {fileID: 351020356915406194}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -40, y: -20}
m_SizeDelta: {x: -40, y: -10}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4862410139821972608
CanvasRenderer:
@@ -168,7 +167,6 @@ RectTransform:
m_Children:
- {fileID: 6402332024803516576}
m_Father: {fileID: 0}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -192,6 +190,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
@@ -268,12 +267,11 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6402332024803516576}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_SizeDelta: {x: -50, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &143571606391487229
CanvasRenderer:
@@ -335,7 +333,7 @@ MonoBehaviour:
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 21
m_fontSizeMax: 24
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
+6 -6
View File
@@ -1,5 +1,5 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
@@ -7,10 +7,10 @@ Shader "Pal3/Dev"
{
Properties
{
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
SubShader
{
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
LOD 100
@@ -18,7 +18,7 @@ Shader "Pal3/Dev"
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
Pass
Pass
{
CGPROGRAM
#pragma vertex vert
@@ -37,7 +37,7 @@ Shader "Pal3/Dev"
struct v2f {
float4 vertex : SV_POSITION;
float2 texcoord : TEXCOORD0;
UNITY_FOG_COORDS(1)
UNITY_FOG_COORDS(7)
UNITY_VERTEX_OUTPUT_STEREO
};
@@ -58,8 +58,8 @@ Shader "Pal3/Dev"
half4 frag (v2f i) : SV_Target
{
half4 col = tex2D(_MainTex, i.texcoord);
UNITY_APPLY_FOG(i.fogCoord, col);
col.a = 0.5;
UNITY_APPLY_FOG(i.fogCoord, col);
return col;
}
ENDCG
+24 -16
View File
@@ -1,10 +1,15 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
Shader "Pal3/Opaque"
{
Properties
{
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_MainTex ("Texture", 2D) = "white" {}
_TintColor ("Tint color", Color) = (1.0, 1.0, 1.0, 1.0)
_HasShadowTex ("Has Shadow Texture", Range(0, 1)) = 0.0
_ShadowTex ("Shadow Texture", 2D) = "white" {}
_Exposure("Exposure Amount", Range(0.1, 1.0)) = 0.4
@@ -12,67 +17,70 @@ Shader "Pal3/Opaque"
SubShader
{
Lighting Off
Tags { "QUEUE" = "Geometry" }
Pass
{
Tags{ "Qeueue" = "Geometry" }
Blend Off
ZWrite On
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma multi_compile_fog
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
float2 shadowcoord : TEXCOORD1;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
float2 texcoord : TEXCOORD0;
float2 shadowcoord : TEXCOORD1;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
UNITY_FOG_COORDS(7)
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
float4 _MainTex_ST;
float4 _TintColor;
float _HasShadowTex;
sampler2D _ShadowTex;
float4 _ShadowTex_ST;
float _Exposure;
v2f vert(appdata_t v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
o.shadowcoord = TRANSFORM_TEX(v.shadowcoord, _ShadowTex);
o.texcoord0 = TRANSFORM_TEX(v.texcoord0, _MainTex);
o.texcoord1 = TRANSFORM_TEX(v.texcoord1, _ShadowTex);
UNITY_TRANSFER_FOG(o, o.vertex);
return o;
}
half4 frag(v2f i) : SV_Target
{
half4 color = tex2D(_MainTex, i.texcoord);
half4 color = tex2D(_MainTex, i.texcoord0);
if(_HasShadowTex > 0.5f)
{
color *= tex2D(_ShadowTex, i.shadowcoord) / (1 - _Exposure);
color *= tex2D(_ShadowTex, i.texcoord1) / (1 - _Exposure);
}
color *= _TintColor;
UNITY_APPLY_FOG(i.fogCoord, color);
return color;
}
ENDCG
@@ -1,3 +1,7 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
// Based on cician's shader from https://forum.unity3d.com/threads/simple-optimized-blur-shader.185327/#post-1267642
// Based on RoundedCorners.shader from https://github.com/kirevdokimov/Unity-UI-Rounded-Corners
// with some modifications
@@ -7,6 +11,7 @@ Shader "Pal3/RoundedFrostedGlass"
Properties
{
_BlurAmount ("Blur", Range(0, 30)) = 1
_Transparency ("Transparency", Range(0, 1)) = 1
[HideInInspector] _MainTex ("Masking Texture", 2D) = "white" {}
_AdditiveColor ("Additive Tint color", Color) = (0, 0, 0, 0)
_MultiplyColor ("Multiply Tint color", Color) = (1, 1, 1, 1)
@@ -16,25 +21,21 @@ Shader "Pal3/RoundedFrostedGlass"
Category
{
// We must be transparent, so other objects are drawn before this one.
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Opaque" }
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
SubShader
{
Cull Off
Lighting Off
ZTest [unity_GUIZTestMode]
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
// Horizontal blur
GrabPass
{
"_HBlur"
}
/*
ZTest Off
Blend SrcAlpha OneMinusSrcAlpha
*/
Cull Off
Lighting Off
ZWrite Off
//ZTest [unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
@@ -84,7 +85,7 @@ Shader "Pal3/RoundedFrostedGlass"
return outsideDistance + insideDistance - absoluteRound;
}
inline float CalcAlpha(float2 samplePosition, float2 size, float radius){
inline float calcAlpha(float2 samplePosition, float2 size, float radius){
const float2 samplePositionTranslated = (samplePosition - .5) * size;
const float distToRect = roundedRectangle(samplePositionTranslated, radius * .5, size * .5);
const float distanceChange = fwidth(distToRect) * 0.5;
@@ -100,19 +101,20 @@ Shader "Pal3/RoundedFrostedGlass"
sampler2D _HBlur;
float4 _HBlur_TexelSize;
float _BlurAmount;
float _Transparency;
float4 _AdditiveColor;
float4 _MultiplyColor;
float4 _WidthHeightRadius;
half4 frag(v2f i) : COLOR
{
const float alpha = CalcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
const float alpha = calcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
half4 cutoffColor = mixAlpha(tex2D(_MainTex, i.uvmain), _AdditiveColor, alpha);
clip(cutoffColor.a - 0.001);
half4 sum = half4(0,0,0,0);
#define GRABPIXEL(weight,kernelx) tex2Dproj( _HBlur, UNITY_PROJ_COORD(float4(i.uvgrab.x + _HBlur_TexelSize.x * kernelx * _BlurAmount, i.uvgrab.y, i.uvgrab.z, i.uvgrab.w))) * weight
#define GRABPIXEL(weight, kernelx) tex2Dproj( _HBlur, UNITY_PROJ_COORD(float4(i.uvgrab.x + _HBlur_TexelSize.x * kernelx * _BlurAmount, i.uvgrab.y, i.uvgrab.z, i.uvgrab.w))) * weight
sum += GRABPIXEL(0.05, -4.0);
sum += GRABPIXEL(0.09, -3.0);
@@ -129,6 +131,7 @@ Shader "Pal3/RoundedFrostedGlass"
sum.g * _MultiplyColor.g + _AdditiveColor.g,
sum.b * _MultiplyColor.b + _AdditiveColor.b,
tex2D(_MainTex, i.uvmain).a);
result.a *= _Transparency;
return result;
}
ENDCG
@@ -188,7 +191,7 @@ Shader "Pal3/RoundedFrostedGlass"
return outsideDistance + insideDistance - absoluteRound;
}
inline float CalcAlpha(float2 samplePosition, float2 size, float radius){
inline float calcAlpha(float2 samplePosition, float2 size, float radius){
const float2 samplePositionTranslated = (samplePosition - .5) * size;
const float distToRect = roundedRectangle(samplePositionTranslated, radius * .5, size * .5);
const float distanceChange = fwidth(distToRect) * 0.5;
@@ -204,13 +207,14 @@ Shader "Pal3/RoundedFrostedGlass"
sampler2D _VBlur;
float4 _VBlur_TexelSize;
float _BlurAmount;
float _Transparency;
float4 _AdditiveColor;
float4 _MultiplyColor;
float4 _WidthHeightRadius;
half4 frag(v2f i) : COLOR
{
const float alpha = CalcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
const float alpha = calcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
half4 cutoffColor = mixAlpha(tex2D(_MainTex, i.uvmain), _AdditiveColor, alpha);
clip(cutoffColor.a - 0.001);
@@ -228,12 +232,12 @@ Shader "Pal3/RoundedFrostedGlass"
sum += GRABPIXEL(0.09, +3.0);
sum += GRABPIXEL(0.05, +4.0);
half4 blurResult = half4(sum.r * _MultiplyColor.r + _AdditiveColor.r,
half4 result = half4(sum.r * _MultiplyColor.r + _AdditiveColor.r,
sum.g * _MultiplyColor.g + _AdditiveColor.g,
sum.b * _MultiplyColor.b + _AdditiveColor.b,
tex2D(_MainTex, i.uvmain).a);
return blurResult;
result.a *= _Transparency;
return result;
}
ENDCG
}
+185
View File
@@ -0,0 +1,185 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
// Based on https://www.shadertoy.com/view/4dl3R4
Shader "Pal3/Snow"
{
Properties
{
_xSpeed ("Snow falling speed [X axis]", Range(0.1, 5)) = 2.0
_ySpeed ("Snow falling speed [y axis]", Range(0.1, 5)) = 1.0
}
HLSLINCLUDE
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl"
TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex);
#define vec2 float2
#define vec3 float3
#define vec4 float4
#define mod fmod
#define fract frac
float _xSpeed;
float _ySpeed;
// This shader uses noise shaders by stegu -- http://webstaff.itn.liu.se/~stegu/
// This is supposed to look like snow falling, for example like
// http://24.media.tumblr.com/tumblr_mdhvqrK2EJ1rcru73o1_500.gif
vec2 mod289(vec2 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
vec3 mod289(vec3 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
vec4 mod289(vec4 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
vec3 permute(vec3 x) {
return mod289(((x*34.0)+1.0)*x);
}
vec4 permute(vec4 x) {
return mod((34.0 * x + 1.0) * x, 289.0);
}
vec4 taylorInvSqrt(vec4 r)
{
return 1.79284291400159 - 0.85373472095314 * r;
}
float snoise(vec2 v)
{
const vec4 C = vec4(0.211324865405187,0.366025403784439,-0.577350269189626,0.024390243902439);
vec2 i = floor(v + dot(v, C.yy) );
vec2 x0 = v - i + dot(i, C.xx);
vec2 i1;
i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
vec4 x12 = x0.xyxy + C.xxzz;
x12.xy -= i1;
i = mod289(i); // Avoid truncation effects in permutation
vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))
+ i.x + vec3(0.0, i1.x, 1.0 ));
vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);
m = m*m ;
m = m*m ;
vec3 x = 2.0 * fract(p * C.www) - 1.0;
vec3 h = abs(x) - 0.5;
vec3 ox = floor(x + 0.5);
vec3 a0 = x - ox;
m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );
vec3 g;
g.x = a0.x * x0.x + h.x * x0.y;
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
return 130.0 * dot(m, g);
}
float cellular2x2(vec2 P)
{
#define K 0.142857142857 // 1/7
#define K2 0.0714285714285 // K/2
#define jitter 0.8 // jitter 1.0 makes F1 wrong more often
vec2 Pi = mod(floor(P), 289.0);
vec2 Pf = fract(P);
vec4 Pfx = Pf.x + vec4(-0.5, -1.5, -0.5, -1.5);
vec4 Pfy = Pf.y + vec4(-0.5, -0.5, -1.5, -1.5);
vec4 p = permute(Pi.x + vec4(0.0, 1.0, 0.0, 1.0));
p = permute(p + Pi.y + vec4(0.0, 0.0, 1.0, 1.0));
vec4 ox = mod(p, 7.0)*K+K2;
vec4 oy = mod(floor(p*K),7.0)*K+K2;
vec4 dx = Pfx + jitter*ox;
vec4 dy = Pfy + jitter*oy;
vec4 d = dx * dx + dy * dy; // d11, d12, d21 and d22, squared
// Sort out the two smallest distances
// Cheat and pick only F1
d.xy = min(d.xy, d.zw);
d.x = min(d.x, d.y);
return d.x; // F1 duplicated, F2 not computed
}
float fbm(vec2 p) {
float f = 0.0;
float w = 0.5;
for (int i = 0; i < 5; i ++) {
f += w * snoise(p);
p *= 2.;
w *= 0.5;
}
return f;
}
float4 Frag(VaryingsDefault i) : SV_Target
{
float2 uv = i.texcoord;
float2 originUV = uv;
const float time = _Time.y;
uv.x *= _ScreenParams.x / _ScreenParams.y;
vec2 GA = float2(0.0,0.0);
GA.x -= time * _xSpeed;
GA.y += time * _ySpeed;
float F1=0.0,F2=0.0,F3=0.0,F4=0.0,F5=0.0,N1=0.0,N2=0.0,N3=0.0,N4=0.0,N5=0.0;
float A=0.0,A1=0.0,A2=0.0,A3=0.0,A4=0.0,A5=0.0;
// Attentuation
A = (uv.x-(uv.y*0.3));
A = clamp(A,0.0,1.0);
// Snow layers, somewhat like an fbm with worley layers.
F1 = 1.0-cellular2x2((uv+(GA*0.1))*8.0);
A1 = 1.0-(A*1.0);
N1 = smoothstep(0.998,1.0,F1)*1.0*A1;
F2 = 1.0-cellular2x2((uv+(GA*0.2))*6.0);
A2 = 1.0-(A*0.8);
N2 = smoothstep(0.995,1.0,F2)*0.85*A2;
F3 = 1.0-cellular2x2((uv+(GA*0.4))*4.0);
A3 = 1.0-(A*0.6);
N3 = smoothstep(0.99,1.0,F3)*0.65*A3;
F4 = 1.0-cellular2x2((uv+(GA*0.6))*3.0);
A4 = 1.0-(A*1.0);
N4 = smoothstep(0.98,1.0,F4)*0.4*A4;
F5 = 1.0-cellular2x2((uv+(GA))*1.2);
A5 = 1.0-(A*1.0);
N5 = smoothstep(0.98,1.0,F5)*0.25*A5;
float Snowout=N5+N4+N3+N2+N1;
float4 snowColor = vec4(Snowout*0.9, Snowout, Snowout*1.1, 1.0);
float4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex,originUV);
return col + snowColor;
}
ENDHLSL
SubShader
{
Cull Off ZWrite Off ZTest Always
Pass
{
HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
ENDHLSL
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 310e70fe34ae470e9e0521e3fbb649d0
timeCreated: 1693107269
+7 -2
View File
@@ -1,3 +1,8 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
Shader "Pal3/Sprite"
{
Properties
@@ -8,12 +13,12 @@ Shader "Pal3/Sprite"
{
Tags { "Queue" = "Transparent" }
LOD 100
Pass
{
Blend SrcAlpha One
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
+28 -20
View File
@@ -1,94 +1,102 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
Shader "Pal3/Transparent"
{
Properties
{
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_MainTex ("Texture", 2D) = "white" {}
_TintColor ("Tint color", Color) = (1.0, 1.0, 1.0, 1.0)
_Threshold ("Transparent Threshold", Range(0, 1)) = 1.0
_HasShadowTex ("Has Shadow Texture", Range(0, 1)) = 0.0
_ShadowTex ("Shadow Texture", 2D) = "white" {}
_Exposure("Exposure Amount", Range(0.1, 1.0)) = 0.4
[Enum(UnityEngine.Rendering.BlendMode)]
_BlendSrcFactor("Source Blend Factor", int) = 5 // BlendMode.SrcAlpha as Default
[Enum(UnityEngine.Rendering.BlendMode)]
_BlendDstFactor("Dest Blend Factor", int) = 10 // BlendMode.OneMinusSrcAlpha as Default
}
SubShader
{
Lighting Off
Tags { "Queue" = "Transparent" }
// Pass 2 ,transparent part
Pass
{
Blend [_BlendSrcFactor] [_BlendDstFactor]
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma multi_compile_fog
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
float2 shadowcoord : TEXCOORD1;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
float2 texcoord : TEXCOORD0;
float2 shadowcoord : TEXCOORD1;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
UNITY_FOG_COORDS(7)
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
float4 _MainTex_ST;
float _Threshold;
float _HasShadowTex;
sampler2D _ShadowTex;
float4 _ShadowTex_ST;
float _Exposure;
float4 _TintColor;
v2f vert(appdata_t v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
o.shadowcoord = TRANSFORM_TEX(v.shadowcoord, _ShadowTex);
o.texcoord0 = TRANSFORM_TEX(v.texcoord0, _MainTex);
o.texcoord1 = TRANSFORM_TEX(v.texcoord1, _ShadowTex);
UNITY_TRANSFER_FOG(o, o.vertex);
return o;
}
half4 frag(v2f i) : SV_Target
{
half4 color = tex2D(_MainTex, i.texcoord);
half4 color = tex2D(_MainTex, i.texcoord0);
const float alpha = color.a;
if(color.a >= _Threshold)
{
discard;
}
if(_HasShadowTex > 0.5f)
{
color *= tex2D(_ShadowTex, i.shadowcoord) / (1 - _Exposure);
color *= tex2D(_ShadowTex, i.texcoord1) / (1 - _Exposure);
color.a = alpha;
}
color *= _TintColor;
UNITY_APPLY_FOG(i.fogCoord, color);
return color;
}
ENDCG
@@ -1,11 +1,16 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
Shader "Pal3/TransparentOpaquePart"
{
Properties
{
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_MainTex ("Texture", 2D) = "white" {}
_TintColor ("Tint color", Color) = (1.0, 1.0, 1.0, 1.0)
_Threshold ("Transparent Threshold", Range(0, 1)) = 1.0
_HasShadowTex ("Has Shadow Texture", Range(0, 1)) = 0.0
_ShadowTex ("Shadow Texture", 2D) = "white" {}
_Exposure("Exposure Amount", Range(0.1, 1.0)) = 0.4
@@ -13,43 +18,44 @@ Shader "Pal3/TransparentOpaquePart"
SubShader
{
Lighting Off
Tags { "Qeueue" = "Geometry" }
// pass 1 , opaque part
Pass
{
Blend Off
ZWrite On
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma multi_compile_fog
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
float2 shadowcoord : TEXCOORD1;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
float2 texcoord : TEXCOORD0;
float2 shadowcoord : TEXCOORD1;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
UNITY_FOG_COORDS(7)
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
float4 _MainTex_ST;
float _Threshold;
float _HasShadowTex;
sampler2D _ShadowTex;
float4 _ShadowTex_ST;
@@ -63,22 +69,23 @@ Shader "Pal3/TransparentOpaquePart"
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
o.shadowcoord = TRANSFORM_TEX(v.shadowcoord, _ShadowTex);
o.texcoord0 = TRANSFORM_TEX(v.texcoord0, _MainTex);
o.texcoord1 = TRANSFORM_TEX(v.texcoord1, _ShadowTex);
UNITY_TRANSFER_FOG(o, o.vertex);
return o;
}
half4 frag(v2f i) : SV_Target
{
half4 color = tex2D(_MainTex, i.texcoord);
half4 color = tex2D(_MainTex, i.texcoord0);
clip(color.a - _Threshold);
if(_HasShadowTex > 0.5f)
{
color *= tex2D(_ShadowTex, i.shadowcoord) / (1 - _Exposure);
color *= tex2D(_ShadowTex, i.texcoord1) / (1 - _Exposure);
}
color *= _TintColor;
UNITY_APPLY_FOG(i.fogCoord, color);
return color;
}
ENDCG
+30 -22
View File
@@ -1,60 +1,67 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
Shader "Pal3/Water"
{
Properties
{
// main texture
_MainTex ("Main texture", 2D) = "white" {}
_MainTex ("Texture", 2D) = "white" {}
// alpha value
_Alpha ("Alpha",Range(0, 1)) = 0.5
_Exposure("Exposure Amount", Range(0.1, 1.0)) = 0.3
// pre baked shadow texture
_ShadowTex ("Shadow texture", 2D) = "white" {}
_HasShadowTex ("Has Shadow Texture", Range(0, 1)) = 0.0
[Enum(UnityEngine.Rendering.BlendMode)]
_BlendSrcFactor("Source Blend Factor", int) = 5 // BlendMode.SrcAlpha as Default
[Enum(UnityEngine.Rendering.BlendMode)]
_BlendDstFactor("Dest Blend Factor", int) = 10 // BlendMode.OneMinusSrcAlpha as Default
}
SubShader
{
Lighting Off
Tags { "QUEUE" = "Transparent-1" } // -1 to fix sorting order issue with semi-transparent trees etc.
Pass
{
Blend [_BlendSrcFactor] [_BlendDstFactor]
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma multi_compile_fog
#include "UnityCG.cginc"
struct appdata_t
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
float2 texcoord2 : TEXCOORD1;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
float2 texcoord : TEXCOORD0;
float2 texcoord2 : TEXCOORD1;
float2 texcoord0 : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
UNITY_FOG_COORDS(7)
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
float4 _MainTex_ST;
@@ -64,25 +71,26 @@ Shader "Pal3/Water"
float _HasShadowTex;
sampler2D _ShadowTex;
float4 _ShadowTex_ST;
v2f vert(appdata_t v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
o.texcoord2 = TRANSFORM_TEX(v.texcoord2, _ShadowTex);
o.texcoord0 = TRANSFORM_TEX(v.texcoord0, _MainTex);
o.texcoord1 = TRANSFORM_TEX(v.texcoord1, _ShadowTex);
UNITY_TRANSFER_FOG(o, o.vertex);
return o;
}
half4 frag(v2f i) : SV_Target
{
const half4 color = tex2D(_MainTex, i.texcoord);
const half4 colorShadow = tex2D(_ShadowTex, i.texcoord2);
const half4 color = tex2D(_MainTex, i.texcoord0);
const half4 colorShadow = tex2D(_ShadowTex, i.texcoord1);
half4 mixedColor = color * colorShadow / (1 - _Exposure);
mixedColor.a = _Alpha; // use global alpha
UNITY_APPLY_FOG(i.fogCoord, mixedColor);
return mixedColor;
}
ENDCG
@@ -10,10 +10,8 @@ RenderTexture:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 5
serializedVersion: 6
m_Width: 800
m_Height: 448
m_AntiAliasing: 1
@@ -24,8 +22,10 @@ RenderTexture:
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_UseDynamicScaleExplicit: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_EnableRandomWrite: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+140
View File
@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: c171273b4d327f14d8016fcbe864a769
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
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: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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: 2048
resizeAlgorithm: 0
textureFormat: 4
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
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
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: Server
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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
-711
View File
@@ -1,711 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &43282729
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 332266281639726118, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 332266281639726118, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 332266281639726118, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 332266281639726118, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 631692333086074477, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 631692333086074477, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 631692333086074477, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 631692333086074477, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 631692333086074477, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 631692333086074477, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1155776204911317598, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1155776204911317598, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1155776204911317598, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1155776204911317598, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1155776204911317598, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1155776204911317598, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1581516270290878550, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1581516270290878550, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1581516270290878550, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1581516270290878550, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1581516270290878550, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1581516270290878550, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1614348180326526211, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_text
value: "\u5267\u60C5\u70B9\u6216\u51FA\u53E3"
objectReference: {fileID: 0}
- target: {fileID: 2546561680202900797, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2546561680202900797, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3491202665095195611, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3596785283706710040, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 256925267}
- target: {fileID: 4209774545385276068, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4209774545385276068, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4209774545385276068, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4209774545385276068, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4209774545385276068, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4209774545385276068, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4255555531165553146, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4255555531165553146, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4255555531165553146, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4255555531165553146, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4255555531165553146, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4255555531165553146, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5077207798598084246, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 1661395006}
- target: {fileID: 6514349001384511054, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 91034975}
- target: {fileID: 6936565495695538149, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6936565495695538149, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6936565495695538149, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6936565495695538149, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6936565495695538149, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6936565495695538149, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalScale.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalScale.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalScale.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7184533148466444589, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902481, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_Name
value: Pal3 Game
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8627381932629902483, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946444568899493682, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946444568899493682, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946444568899493682, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946444568899493682, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946444568899493682, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946444568899493682, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946678118750326748, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946678118750326748, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946678118750326748, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946678118750326748, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946678118750326748, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8946678118750326748, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834017742, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0.00012207031
objectReference: {fileID: 0}
- target: {fileID: 9166793672834029268, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834029268, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834029268, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834030092, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834030092, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834030092, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834030092, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834030092, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834030092, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834056758, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834056758, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834056758, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834056758, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834056758, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834056758, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834088468, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834088468, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834088468, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834088468, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834088468, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834088468, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834089322, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834089322, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834089322, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834089322, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834089322, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834089322, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834115320, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834115320, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834115320, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834115320, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834115320, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9166793672834115320, guid: e86d7889291c041ba854821fd25047d6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e86d7889291c041ba854821fd25047d6, type: 3}
--- !u!21 &91034975
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Pal3/RoundedFrostedGlass
m_Shader: {fileID: 4800000, guid: 7207745e33764e88af7a51d39feb7b81, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BlurAmount: 4
m_Colors:
- _AdditiveColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
- _MultiplyColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
- _WidthHeightRadius: {r: 800, g: 600, b: 65, a: 0}
m_BuildTextureStacks: []
--- !u!21 &256925267
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Pal3/RoundedFrostedGlass
m_Shader: {fileID: 4800000, guid: 7207745e33764e88af7a51d39feb7b81, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BlurAmount: 3
m_Colors:
- _AdditiveColor: {r: 0.039215688, g: 0.039215688, b: 0.039215688, a: 1}
- _MultiplyColor: {r: 0.54901963, g: 0.54901963, b: 0.54901963, a: 1}
- _WidthHeightRadius: {r: 1024, g: 220, b: 35, a: 0}
m_BuildTextureStacks: []
--- !u!21 &1661395006
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Pal3/RoundedFrostedGlass
m_Shader: {fileID: 4800000, guid: 7207745e33764e88af7a51d39feb7b81, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BlurAmount: 4
m_Colors:
- _AdditiveColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
- _MultiplyColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
- _WidthHeightRadius: {r: 800, g: 600, b: 65, a: 0}
m_BuildTextureStacks: []
@@ -1,5 +1,5 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
@@ -1,5 +1,5 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
@@ -1,183 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.Animation
{
using System;
using System.Collections;
using System.Threading;
using UnityEngine;
public enum AnimationCurveType
{
// OG game only has these two
Linear = 0,
Sine = 1,
// New ones added by me
Quadratic = 2,
Cubic = 3,
Exponential = 4,
EaseIn = 5,
EaseOut = 6,
}
/// <summary>
/// Provides helper functions to do Transform animations etc.
/// </summary>
public static class CoreAnimation
{
// Progress -> (0,1)
private static float GetInterpolationRatio(float progress, AnimationCurveType curveType)
{
return curveType switch
{
AnimationCurveType.Linear => progress,
AnimationCurveType.Sine => Mathf.Sin(progress * (Mathf.PI / 2)),
AnimationCurveType.Quadratic => Mathf.Pow(progress, 2),
AnimationCurveType.Cubic => Mathf.Pow(progress, 3),
AnimationCurveType.Exponential => Mathf.Exp(progress) - 1,
AnimationCurveType.EaseIn => Mathf.Pow(progress, 3),
AnimationCurveType.EaseOut => 1 - Mathf.Pow(1 - progress, 3),
_ => progress
};
}
public static IEnumerator EnumerateValueAsync(float from,
float to,
float duration,
AnimationCurveType curveType,
Action<float> onValueChanged,
CancellationToken cancellationToken = default)
{
if (Mathf.Abs(duration) < Mathf.Epsilon)
{
onValueChanged?.Invoke(to);
yield break;
}
var timePast = 0f;
while (timePast < duration && !cancellationToken.IsCancellationRequested)
{
var newValue = Mathf.Lerp(from, to,
GetInterpolationRatio(timePast / duration, curveType));
onValueChanged?.Invoke(newValue);
timePast += Time.deltaTime;
yield return null;
}
if (!cancellationToken.IsCancellationRequested)
{
onValueChanged?.Invoke(to);
}
yield return null;
}
public static IEnumerator MoveAsync(this Transform target,
Vector3 toPosition,
float duration,
AnimationCurveType curveType = AnimationCurveType.Linear,
CancellationToken cancellationToken = default)
{
Vector3 oldPosition = target.position;
var timePast = 0f;
while (timePast < duration && target != null && !cancellationToken.IsCancellationRequested)
{
target.position = oldPosition + (toPosition - oldPosition) *
GetInterpolationRatio(timePast / duration, curveType);
timePast += Time.deltaTime;
yield return null;
}
if (target != null && !cancellationToken.IsCancellationRequested) target.position = toPosition;
yield return null;
}
public static IEnumerator ShakeAsync(this Transform target,
float duration,
float amplitude,
bool shakeOnXAxis,
bool shakeOnYAxis,
bool shakeOnZAxis)
{
Vector3 originalPosition = target.localPosition;
while (duration > 0 && target != null)
{
Vector3 delta = UnityEngine.Random.insideUnitSphere * amplitude;
target.localPosition = originalPosition + new Vector3(
shakeOnXAxis ? delta.x : 0f,
shakeOnYAxis ? delta.y : 0f,
shakeOnZAxis ? delta.z : 0f);
duration -= Time.deltaTime;
yield return null;
}
if (target != null) target.localPosition = originalPosition;
yield return null;
}
public static IEnumerator OrbitAroundCenterPointAsync(this Transform target,
Quaternion toRotation,
Vector3 centerPoint,
float duration,
AnimationCurveType curveType,
float distanceDelta,
CancellationToken cancellationToken = default)
{
var distance = Vector3.Distance(target.position, centerPoint);
Quaternion startRotation = target.rotation;
var timePast = 0f;
while (timePast < duration && target != null && !cancellationToken.IsCancellationRequested)
{
Quaternion rotation = Quaternion.Lerp(startRotation, toRotation,
GetInterpolationRatio(timePast / duration, curveType));
Vector3 direction = (rotation * Vector3.forward).normalized;
Vector3 newPosition = centerPoint + direction * -(distance + (timePast / duration) * distanceDelta);
target.rotation = rotation;
target.position = newPosition;
timePast += Time.deltaTime;
yield return null;
}
if (target != null && !cancellationToken.IsCancellationRequested)
{
target.rotation = toRotation;
target.position = centerPoint + (toRotation * Vector3.forward).normalized * -(distance + distanceDelta);
}
yield return null;
}
public static IEnumerator RotateAsync(this Transform target,
Quaternion toRotation,
float duration,
AnimationCurveType curveType,
CancellationToken cancellationToken = default)
{
Quaternion startRotation = target.rotation;
var timePast = 0f;
while (timePast < duration && target != null && !cancellationToken.IsCancellationRequested)
{
Quaternion rotation = Quaternion.Lerp(startRotation, toRotation,
GetInterpolationRatio(timePast / duration, curveType));
target.rotation = rotation;
timePast += Time.deltaTime;
yield return null;
}
if (target != null && !cancellationToken.IsCancellationRequested) target.rotation = toRotation;
yield return null;
}
}
}
@@ -1,61 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataLoader
{
using DataReader.Bmp;
using UnityEngine;
/// <summary>
/// .bmp file loader and Texture2D converter.
/// </summary>
public sealed class BmpTextureLoader : ITextureLoader
{
private BmpFile _image;
public void Load(byte[] data, out bool hasAlphaChannel)
{
hasAlphaChannel = false;
_image = new BmpFileReader().Read(data);
}
public Texture2D ToTexture2D()
{
if (_image == null) return null;
var texture = new Texture2D(_image.Info.AbsWidth,
_image.Info.AbsHeight,
TextureFormat.RGBA32,
mipChain: false);
if (_image.Info.Height < 0)
{
FlipImage();
}
texture.SetPixels32(_image.ImageData);
texture.Apply();
return texture;
}
// flip image if height is negative
private void FlipImage()
{
if (_image.Info.Height > 0)
return;
int w = _image.Info.AbsWidth;
int h = _image.Info.AbsHeight;
int h2 = h / 2;
for (int y = 0; y < h2; y++)
{
for(int x = 0, o1=y*w, o2=(h-y-1)*w; x < w; x++,o1++,o2++)
{
(_image.ImageData[o1], _image.ImageData[o2]) = (_image.ImageData[o2], _image.ImageData[o1]);
}
}
_image.Info.Height = h;
}
}
}
@@ -1,91 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataLoader
{
using System;
using System.IO;
using DataReader.Dxt;
using UnityEngine;
/// <summary>
/// .dds file loader and Texture2D converter.
/// </summary>
public sealed class DxtTextureLoader : ITextureLoader
{
private int _width;
private int _height;
private byte[] _rawData;
private TextureFormat _format;
public void Load(byte[] data, out bool hasAlphaChannel)
{
using var stream = new MemoryStream(data);
using var reader = new BinaryReader(stream);
if (!IsValidDxtFile(reader))
{
throw new ArgumentException($"Not a valid DXT file.");
}
DxtHeader header = DxtHeader.ReadHeader(reader);
var format = header.DxtPixelFormat.Format;
_width = header.Width;
_height = header.Height;
switch (format)
{
case "DXT1":
hasAlphaChannel = false;
LoadDxt1Texture(data);
break;
case "DXT3":
hasAlphaChannel = true;
LoadDxt3Texture(data);
break;
case "DXT5":
throw new NotImplementedException("DXT5 decoder not implemented yet.");
default:
throw new Exception($"Texture format: {format} not supported.");
}
}
private bool IsValidDxtFile(BinaryReader reader)
{
var header = new string(reader.ReadChars(4));
if (header == "DDS ") return true;
Debug.Log($"Invalid DXT header: {header}");
return false;
}
// Texture2D.LoadRawTextureData does not support DXT1 format on iOS/Android
// devices so we have to manually decode it to RGBA32(RGB888) format and then
// invoke LoadRawTextureData method later to convert it to Texture2D.
private void LoadDxt1Texture(byte[] data)
{
_rawData = Dxt1Decoder.ToRgba32(data, _width, _height);
_format = TextureFormat.RGBA32;
}
// Texture2D.LoadRawTextureData does not support DXT3 format
// so we have to manually decode it to RGBA32(RGB888) format and then
// invoke LoadRawTextureData method later to convert it to Texture2D.
private void LoadDxt3Texture(byte[] data)
{
_rawData = Dxt3Decoder.ToRgba32(data, _width, _height);
_format = TextureFormat.RGBA32;
}
public Texture2D ToTexture2D()
{
if (_rawData == null) return null;
Texture2D texture = new Texture2D(_width, _height, _format, mipChain: false);
texture.LoadRawTextureData(_rawData);
texture.Apply();
return texture;
}
}
}
@@ -1,21 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataLoader
{
using UnityEngine;
/// <summary>
/// Texture2D provider.
/// </summary>
public interface ITextureResourceProvider
{
string GetTexturePath(string name);
Texture2D GetTexture(string name);
Texture2D GetTexture(string name, out bool hasAlphaChannel);
}
}
@@ -1,94 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataLoader
{
using System;
using UnityEngine;
/// <summary>
/// .tga file loader and Texture2D converter.
/// </summary>
public sealed class TgaTextureLoader : ITextureLoader
{
private Color32[] _pixels;
private short _width;
private short _height;
public unsafe void Load(byte[] data, out bool hasAlphaChannel)
{
byte bitDepth;
fixed (byte* p = &data[12])
{
_width = *(short*)p;
_height = *(short*)(p + 2);
bitDepth = *(p + 4);
}
var dataStartIndex = 18;
_pixels = new Color32[_width * _height];
switch (bitDepth)
{
case 32:
hasAlphaChannel = Convert32BitData(data, dataStartIndex);
break;
case 24:
hasAlphaChannel = false;
Convert24BitData(data, dataStartIndex);
break;
default:
throw new Exception("TGA texture had non 32/24 bit depth.");
}
}
private unsafe bool Convert32BitData(byte[] data, int startIndex)
{
bool hasAlphaChannel = false;
fixed (byte* srcStart = &data[startIndex], dstStart = &_pixels[0].r)
{
var firstAlpha = *(srcStart + 3);
byte* src = srcStart, dst = dstStart;
for (var i = 0; i < _width * _height; i++, src += 4, dst += 4)
{
*dst = *(src + 2);
*(dst + 1) = *(src + 1);
*(dst + 2) = *src;
var alpha = *(src + 3);
*(dst + 3) = alpha;
if (alpha != firstAlpha) hasAlphaChannel = true;
}
}
return hasAlphaChannel;
}
private unsafe void Convert24BitData(byte[] data, int startIndex)
{
fixed (byte* srcStart = &data[startIndex], dstStart = &_pixels[0].r)
{
byte* src = srcStart, dst = dstStart;
for (var i = 0; i < _width * _height; i++, src += 3, dst += 4)
{
*dst = *(src + 2);
*(dst + 1) = *(src + 1);
*(dst + 2) = *src;
*(dst + 3) = 0;
}
}
}
public Texture2D ToTexture2D()
{
if (_pixels == null) return null;
var texture = new Texture2D(_width, _height, TextureFormat.RGBA32, mipChain: false);
texture.SetPixels32(_pixels);
texture.Apply();
return texture;
}
}
}
@@ -1,43 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataReader.Bmp
{
using System.Collections.Generic;
using UnityEngine;
public sealed class BmpFile
{
public BmpFileHeader Header;
public BitmapInfoHeader Info;
public uint RMask = 0x00FF0000;
public uint GMask = 0x0000FF00;
public uint BMask = 0x000000FF;
public uint AMask = 0x00000000;
public List<Color32> Palette;
public Color32[] ImageData;
// private void ReplaceColor(Color32 aColorToSearch, Color32 aReplacementColor)
// {
// Color32 s = aColorToSearch;
// for (int i = 0; i < ImageData.Length; i++)
// {
// Color32 c = ImageData[i];
// if (c.r == s.r && c.g == s.g && c.b == s.b && c.a == s.a)
// ImageData[i] = aReplacementColor;
// }
// }
//
// private void ReplaceFirstPixelColor(Color32 aReplacementColor)
// {
// ReplaceColor(ImageData[0], aReplacementColor);
// }
//
// public void ReplaceFirstPixelColorWithTransparency()
// {
// ReplaceFirstPixelColor(new Color32(0, 0, 0, 0));
// }
}
}
@@ -1,337 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataReader.Cpk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using Lzo;
using Utils;
/// <summary>
/// Load and create a structural mapping of the internal
/// file system model within the CPK archive for accessing
/// the file entities stored inside the archive.
/// </summary>
public sealed class CpkArchive
{
private const uint SUPPORTED_CPK_VERSION = 1;
private const uint CPK_HEADER_MAGIC = 0x_1A_54_53_52; // CPK header magic label
private const int CPK_DEFAULT_MAX_NUM_OF_FILE = 32768; // Max number of files per archive
private readonly string _filePath;
private readonly Crc32Hash _crcHash;
private readonly int _codepage;
private Dictionary<uint, CpkTableEntity> _tableEntities;
private readonly Dictionary<uint, byte[]> _fileNameMap = new ();
private readonly Dictionary<uint, uint> _crcToTableIndexMap = new ();
private readonly Dictionary<uint, HashSet<uint>> _fatherCrcToChildCrcTableIndexMap = new ();
private bool _archiveInMemory;
private byte[] _archiveData;
public CpkArchive(string cpkFilePath, Crc32Hash crcHash, int codepage)
{
if (!File.Exists(cpkFilePath))
{
throw new ArgumentException($"游戏数据加载失败,游戏原CPK压缩包不存在: {cpkFilePath}");
}
_filePath = cpkFilePath;
_crcHash = crcHash;
_codepage = codepage;
}
/// <summary>
/// Load the CPK file from file system and read header + index table.
/// </summary>
public void Init()
{
using var stream = new FileStream(_filePath,
FileMode.Open,
FileAccess.Read,
FileShare.ReadWrite,
bufferSize: 8196,
FileOptions.SequentialScan); // Use SequentialScan option to increase reading speed
var header = Utility.ReadStruct<CpkHeader>(stream);
if (!IsValidCpkHeader(header))
{
throw new InvalidDataException($"File: {_filePath} is not a valid CPK file.");
}
var cpkTableEntitySize = Marshal.SizeOf(typeof(CpkTableEntity));
var indexTableSize = cpkTableEntitySize * CPK_DEFAULT_MAX_NUM_OF_FILE;
Span<byte> indexTableBuffer = new byte[indexTableSize];
// Read the whole index table into memory before processing
// to avoid I/O overhead
_ = stream.Read(indexTableBuffer);
_tableEntities = new Dictionary<uint, CpkTableEntity>((int)header.FileNum);
var numOfFiles = header.FileNum;
var maxFileCount = header.MaxFileNum;
var filesFound = 0;
var indexTableOffset = 0;
for (uint i = 0; i < maxFileCount; i++)
{
var tableEntity = Utility.ReadStruct<CpkTableEntity>(indexTableBuffer, indexTableOffset);
indexTableOffset += cpkTableEntitySize;
if (tableEntity.IsEmpty() || tableEntity.IsDeleted()) continue;
_tableEntities[i] = tableEntity;
filesFound++;
if (numOfFiles == filesFound) break;
}
BuildCrcIndexMap();
}
/// <summary>
/// Extract the complete archive to the specified destination
/// </summary>
public void ExtractTo(string outputFolder)
{
ExtractToInternal(outputFolder, GetRootEntries());
}
private void ExtractToInternal(string outputFolder, IEnumerable<CpkEntry> nodes)
{
foreach (CpkEntry node in nodes)
{
var relativePath = node.VirtualPath.Replace(
CpkConstants.DirectorySeparator, Path.DirectorySeparatorChar);
if (node.IsDirectory)
{
new DirectoryInfo(outputFolder + relativePath).Create();
ExtractToInternal(outputFolder, node.Children);
}
else
{
File.WriteAllBytes(outputFolder + relativePath, ReadAllBytes(node.VirtualPath));
}
}
}
/// <summary>
/// Check if file exists inside the archive.
/// </summary>
/// <param name="fileVirtualPath">Virtualized file path inside CPK archive</param>
/// <returns>True if file exists</returns>
public bool FileExists(string fileVirtualPath)
{
var crc = _crcHash.Compute(fileVirtualPath.ToLower(), _codepage);
return _crcToTableIndexMap.ContainsKey(crc);
}
/// <summary>
/// Read all bytes of the give file stored inside the archive.
/// </summary>
/// <param name="fileVirtualPath">Virtualized file path inside CPK archive</param>
/// <returns>File content in byte array</returns>
public byte[] ReadAllBytes(string fileVirtualPath)
{
return _archiveInMemory ?
ReadAllBytesUsingInMemoryCache(fileVirtualPath) :
GetFileContent(fileVirtualPath);
}
private byte[] ReadAllBytesUsingInMemoryCache(string fileVirtualPath)
{
CpkTableEntity entity = ValidateAndGetTableEntity(fileVirtualPath);
byte[] data;
var start = (int) entity.StartPos;
var end = (int) (entity.StartPos + entity.PackedSize);
if (entity.IsCompressed())
{
data = new byte[entity.OriginSize];
MiniLzo.Decompress(_archiveData[start..end], data);
}
else
{
data = _archiveData[start..end];
}
return data;
}
private byte[] GetFileContent(string fileVirtualPath)
{
CpkTableEntity entity = ValidateAndGetTableEntity(fileVirtualPath);
return GetFileContentInternal(entity);
}
private byte[] GetFileContentInternal(CpkTableEntity entity)
{
byte[] rawData;
if (_archiveInMemory)
{
var start = (int) entity.StartPos;
var end = (int) (entity.StartPos + entity.PackedSize);
rawData = _archiveData[start..end];
}
else
{
using var stream = new FileStream(_filePath, FileMode.Open, FileAccess.Read);
stream.Seek(entity.StartPos, SeekOrigin.Begin);
var buffer = new byte[entity.PackedSize];
_ = stream.Read(buffer, 0, (int)entity.PackedSize);
rawData = buffer;
}
if (!entity.IsCompressed()) return rawData;
var decompressedData = new byte[entity.OriginSize];
MiniLzo.Decompress(rawData, decompressedData);
return decompressedData;
}
private CpkTableEntity ValidateAndGetTableEntity(string fileVirtualPath)
{
var crc = _crcHash.Compute(fileVirtualPath.ToLower(), _codepage);
if (!_crcToTableIndexMap.ContainsKey(crc))
{
throw new ArgumentException($"<{fileVirtualPath}> does not exists in the archive.");
}
CpkTableEntity entity = _tableEntities[_crcToTableIndexMap[crc]];
if (entity.IsDirectory())
{
throw new InvalidOperationException($"Cannot open <{fileVirtualPath}> since it is a directory.");
}
return entity;
}
/// <summary>
/// Preload archive into memory for faster read performance.
/// </summary>
public void LoadArchiveIntoMemory()
{
_archiveData = File.ReadAllBytes(_filePath);
_archiveInMemory = true;
}
/// <summary>
/// Dispose in-memory archive data.
/// </summary>
public void DisposeInMemoryArchive()
{
_archiveInMemory = false;
_archiveData = null;
}
private static bool IsValidCpkHeader(CpkHeader header)
{
if (header.Label != CPK_HEADER_MAGIC) return false;
if (header.Version != SUPPORTED_CPK_VERSION) return false;
if (header.TableStart == 0) return false;
if (header.FileNum > header.MaxFileNum) return false;
if (header.ValidTableNum > header.MaxTableNum) return false;
if (header.FileNum > header.ValidTableNum) return false;
return true;
}
private void BuildCrcIndexMap()
{
foreach ((var index, CpkTableEntity entity) in _tableEntities)
{
_crcToTableIndexMap[entity.CRC] = index;
if (_fatherCrcToChildCrcTableIndexMap.TryGetValue(entity.FatherCRC, out var childCrcTable))
{
childCrcTable.Add(entity.CRC);
}
else
{
_fatherCrcToChildCrcTableIndexMap[entity.FatherCRC] = new HashSet<uint> {entity.CRC};
}
}
}
/// <summary>
/// Build a tree structure map of the internal file system
/// and return the root nodes in CpkEntry format.
/// </summary>
/// <returns>Root level CpkEntry nodes</returns>
public IEnumerable<CpkEntry> GetRootEntries()
{
if (_fileNameMap.Count == 0) BuildFileNameMap();
return GetChildren(0);
}
private void BuildFileNameMap()
{
Stream stream;
if (_archiveInMemory)
{
stream = new MemoryStream(_archiveData);
}
else
{
stream = new FileStream(_filePath,
FileMode.Open,
FileAccess.Read,
FileShare.ReadWrite,
bufferSize: 8196,
FileOptions.RandomAccess);
}
foreach (CpkTableEntity entity in _tableEntities.Values)
{
long extraInfoOffset = entity.StartPos + entity.PackedSize;
var extraInfo = new byte[entity.ExtraInfoSize];
stream.Seek(extraInfoOffset, SeekOrigin.Begin);
_ = stream.Read(extraInfo);
var fileName = Utility.TrimEnd(extraInfo, new byte[] { 0x00, 0x00 });
_fileNameMap[entity.CRC] = fileName;
}
stream.Close();
stream.Dispose();
}
private IEnumerable<CpkEntry> GetChildren(uint fatherCrc, string rootPath = "")
{
if (!_fatherCrcToChildCrcTableIndexMap.ContainsKey(fatherCrc))
{
yield break;
}
if (rootPath != string.Empty) rootPath += CpkConstants.DirectorySeparator;
foreach (var childCrc in _fatherCrcToChildCrcTableIndexMap[fatherCrc])
{
var index = _crcToTableIndexMap[childCrc];
CpkTableEntity child = _tableEntities[index];
var fileName = Encoding.GetEncoding(_codepage).GetString(_fileNameMap[child.CRC]);
var virtualPath = rootPath + fileName;
if (child.IsDirectory())
{
yield return new CpkEntry(virtualPath, true, GetChildren(child.CRC, virtualPath));
}
else
{
yield return new CpkEntry(virtualPath, false);
}
}
}
}
}
@@ -1,523 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
#define USE_UNSAFE_BINARY_READER
namespace Core.DataReader.Cvd
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using Extensions;
using GameBox;
using UnityEngine;
using Utils;
public sealed class CvdFileReader : IFileReader<CvdFile>
{
private readonly int _codepage;
public CvdFileReader(int codepage)
{
_codepage = codepage;
}
public CvdFile Read(byte[] data)
{
#if USE_UNSAFE_BINARY_READER
using var reader = new UnsafeBinaryReader(data);
#else
using var stream = new MemoryStream(data);
using var reader = new BinaryReader(stream);
#endif
var header = reader.ReadChars(4);
var headerStr = new string(header);
var version = headerStr switch
{
"cvdf" => 0.4f,
"cvds" => 0.5f,
_ => throw new InvalidDataException($"Invalid CVD(.cvd) file: header != cvdf or cvds")
};
var animationDuration = 0f;
var numberONodes = reader.ReadInt32();
var rootNodes = new List<CvdGeometryNode>();
for (var i = 0; i < numberONodes; i++)
{
ReadGeometryNodes(reader, version, rootNodes, ref animationDuration, _codepage);
}
return new CvdFile(animationDuration, rootNodes.ToArray());
}
#if USE_UNSAFE_BINARY_READER
private static void ReadGeometryNodes(UnsafeBinaryReader reader,
float version,
List<CvdGeometryNode> rootNodes,
ref float animationDuration,
int codepage)
#else
private static void ReadGeometryNodes(BinaryReader reader,
float version,
List<CvdGeometryNode> rootNodes,
ref float animationDuration,
int codepage)
#endif
{
CvdGeometryNode parentNode = default;
var isGeometryNode = reader.ReadByte();
if (isGeometryNode == 1)
{
parentNode = ReadGeometryNode(reader, version, ref animationDuration, codepage);
parentNode.IsGeometryNode = true;
}
var numberOfChildNodes = reader.ReadInt32();
var children = new List<CvdGeometryNode>();
for (var i = 0; i < numberOfChildNodes; i++)
{
ReadGeometryNodes(reader, version, children, ref animationDuration, codepage);
}
parentNode.Children = children.ToArray();
rootNodes.Add(parentNode);
}
#if USE_UNSAFE_BINARY_READER
private static CvdGeometryNode ReadGeometryNode(UnsafeBinaryReader reader,
float version,
ref float animationDuration,
int codepage)
#else
private static CvdGeometryNode ReadGeometryNode(BinaryReader reader,
float version,
ref float animationDuration,
int codepage)
#endif
{
var positionKeySize = Mathf.Max(
Marshal.SizeOf(typeof(CvdTcbVector3Key)),
Marshal.SizeOf(typeof(CvdBezierVector3Key)),
Marshal.SizeOf(typeof(CvdLinearVector3Key)));
var positionKeyInfos = ReadPositionAnimationKeyInfo(reader, positionKeySize);
if (positionKeyInfos[^1].Time > animationDuration) animationDuration = positionKeyInfos[^1].Time;
var rotationKeySize = Mathf.Max(
Marshal.SizeOf(typeof(CvdTcbRotationKey)),
Marshal.SizeOf(typeof(CvdBezierRotationKey)),
Marshal.SizeOf(typeof(CvdLinearRotationKey)));
var rotationKeyInfos = ReadRotationAnimationKeyInfo(reader, rotationKeySize);
if (rotationKeyInfos[^1].Time > animationDuration) animationDuration = rotationKeyInfos[^1].Time;
var scaleKeySize = Mathf.Max(
Marshal.SizeOf(typeof(CvdTcbScaleKey)),
Marshal.SizeOf(typeof(CvdBezierScaleKey)),
Marshal.SizeOf(typeof(CvdLinearScaleKey)));
var scaleKeyInfos = ReadScaleAnimationKeyInfo(reader, scaleKeySize);
if (scaleKeyInfos[^1].Time > animationDuration) animationDuration = scaleKeyInfos[^1].Time;
var scale = reader.ReadSingle();
CvdMesh mesh = ReadMesh(reader, version, codepage);
if (mesh.AnimationTimeKeys[^1] > animationDuration) animationDuration = mesh.AnimationTimeKeys[^1];
var transformMatrix = new GameBoxMatrix4X4()
{
Xx = reader.ReadSingle(), Xy = reader.ReadSingle(), Xz = reader.ReadSingle(), Xw = reader.ReadSingle(),
Yx = reader.ReadSingle(), Yy = reader.ReadSingle(), Yz = reader.ReadSingle(), Yw = reader.ReadSingle(),
Zx = reader.ReadSingle(), Zy = reader.ReadSingle(), Zz = reader.ReadSingle(), Zw = reader.ReadSingle(),
Tx = reader.ReadSingle(), Ty = reader.ReadSingle(), Tz = reader.ReadSingle(), Tw = reader.ReadSingle()
};
transformMatrix.Tw = 1f;
return new CvdGeometryNode()
{
PositionKeyInfos = positionKeyInfos,
RotationKeyInfos = rotationKeyInfos,
ScaleKeyInfos = scaleKeyInfos,
Scale = scale,
TransformMatrix = transformMatrix,
Mesh = mesh
};
}
#if USE_UNSAFE_BINARY_READER
private static (CvdAnimationKeyType, byte[])[] ReadAnimationKeyInfo(UnsafeBinaryReader reader, int size)
#else
private static (CvdAnimationKeyType, byte[])[] ReadAnimationKeyInfo(BinaryReader reader, int size)
#endif
{
var numberOfKeys = reader.ReadInt32();
var keyInfos = new (CvdAnimationKeyType, byte[])[numberOfKeys];
var keyType = (CvdAnimationKeyType)reader.ReadByte();
// TODO: I have not seen type other than linear so far,
// so I just leave the log on for now.
if (keyType != CvdAnimationKeyType.Linear)
{
Debug.LogError($"Key type: {keyType.ToString()}");
}
for (var i = 0; i < numberOfKeys; i++)
{
keyInfos[i] = (keyType, reader.ReadBytes(size));
}
return keyInfos;
}
#if USE_UNSAFE_BINARY_READER
private static CvdAnimationPositionKeyFrame[] ReadPositionAnimationKeyInfo(UnsafeBinaryReader reader, int size)
#else
private static CvdAnimationPositionKeyFrame[] ReadPositionAnimationKeyInfo(BinaryReader reader, int size)
#endif
{
var frameInfos = ReadAnimationKeyInfo(reader, size);
var positionKeyFrames = new CvdAnimationPositionKeyFrame[frameInfos.Length];
for (var i = 0; i < frameInfos.Length; i++)
{
(CvdAnimationKeyType type, var data) = frameInfos[i];
switch (type)
{
case CvdAnimationKeyType.Tcb:
{
var positionKey = Utility.ReadStruct<CvdTcbVector3Key>(data);
positionKeyFrames[i] = new CvdAnimationPositionKeyFrame()
{
KeyType = type,
Time = positionKey.TcbKey.AnimationKey.Time,
Position = GameBoxInterpreter.CvdPositionToUnityPosition(positionKey.Value),
};
break;
}
case CvdAnimationKeyType.Bezier:
{
var positionKey = Utility.ReadStruct<CvdBezierVector3Key>(data);
positionKeyFrames[i] = new CvdAnimationPositionKeyFrame()
{
KeyType = type,
Time = positionKey.AnimationKey.Time,
Position = GameBoxInterpreter.CvdPositionToUnityPosition(positionKey.Value),
};
break;
}
case CvdAnimationKeyType.Linear:
{
var positionKey = Utility.ReadStruct<CvdLinearVector3Key>(data);
positionKeyFrames[i] = new CvdAnimationPositionKeyFrame()
{
KeyType = type,
Time = positionKey.AnimationKey.Time,
Position = GameBoxInterpreter.CvdPositionToUnityPosition(positionKey.Value),
};
break;
}
}
}
return positionKeyFrames;
}
#if USE_UNSAFE_BINARY_READER
private static CvdAnimationRotationKeyFrame[] ReadRotationAnimationKeyInfo(UnsafeBinaryReader reader, int size)
#else
private static CvdAnimationRotationKeyFrame[] ReadRotationAnimationKeyInfo(BinaryReader reader, int size)
#endif
{
var frameInfos = ReadAnimationKeyInfo(reader, size);
var rotationKeyFrames = new CvdAnimationRotationKeyFrame[frameInfos.Length];
for (var i = 0; i < frameInfos.Length; i++)
{
(CvdAnimationKeyType type, var data) = frameInfos[i];
switch (type)
{
case CvdAnimationKeyType.Tcb:
{
var rotationKey = Utility.ReadStruct<CvdTcbRotationKey>(data);
Quaternion quaternion = Quaternion.AngleAxis(rotationKey.Angle, rotationKey.Axis);
rotationKeyFrames[i] = new CvdAnimationRotationKeyFrame()
{
KeyType = type,
Time = rotationKey.TcbKey.AnimationKey.Time,
Rotation = GameBoxInterpreter.CvdQuaternionToUnityQuaternion(new GameBoxQuaternion()
{
X = quaternion.x,
Y = quaternion.y,
Z = quaternion.z,
W = quaternion.w,
})
};
break;
}
case CvdAnimationKeyType.Bezier:
{
var rotationKey = Utility.ReadStruct<CvdBezierRotationKey>(data);
rotationKeyFrames[i] = new CvdAnimationRotationKeyFrame()
{
KeyType = type,
Time = rotationKey.AnimationKey.Time,
Rotation = GameBoxInterpreter.CvdQuaternionToUnityQuaternion(rotationKey.Value)
};
break;
}
case CvdAnimationKeyType.Linear:
{
var rotationKey = Utility.ReadStruct<CvdLinearRotationKey>(data);
rotationKeyFrames[i] = new CvdAnimationRotationKeyFrame()
{
KeyType = type,
Time = rotationKey.AnimationKey.Time,
Rotation = GameBoxInterpreter.CvdQuaternionToUnityQuaternion(rotationKey.Value)
};
break;
}
}
}
return rotationKeyFrames;
}
#if USE_UNSAFE_BINARY_READER
private static CvdAnimationScaleKeyFrame[] ReadScaleAnimationKeyInfo(UnsafeBinaryReader reader, int size)
#else
private static CvdAnimationScaleKeyFrame[] ReadScaleAnimationKeyInfo(BinaryReader reader, int size)
#endif
{
var frameInfos = ReadAnimationKeyInfo(reader, size);
var scaleKeyFrames = new CvdAnimationScaleKeyFrame[frameInfos.Length];
for (var i = 0; i < frameInfos.Length; i++)
{
(CvdAnimationKeyType type, var data) = frameInfos[i];
switch (type)
{
case CvdAnimationKeyType.Tcb:
{
var scaleKey = Utility.ReadStruct<CvdTcbScaleKey>(data);
scaleKeyFrames[i] = new CvdAnimationScaleKeyFrame()
{
KeyType = type,
Time = scaleKey.TcbKey.AnimationKey.Time,
Scale = GameBoxInterpreter.CvdScaleToUnityScale(scaleKey.Value),
Rotation = GameBoxInterpreter.CvdQuaternionToUnityQuaternion(scaleKey.Rotation)
};
break;
}
case CvdAnimationKeyType.Bezier:
{
var scaleKey = Utility.ReadStruct<CvdBezierScaleKey>(data);
scaleKeyFrames[i] = new CvdAnimationScaleKeyFrame()
{
KeyType = type,
Time = scaleKey.AnimationKey.Time,
Scale = GameBoxInterpreter.CvdScaleToUnityScale(scaleKey.Value),
Rotation = GameBoxInterpreter.CvdQuaternionToUnityQuaternion(scaleKey.Rotation)
};
break;
}
case CvdAnimationKeyType.Linear:
{
var scaleKey = Utility.ReadStruct<CvdLinearScaleKey>(data);
scaleKeyFrames[i] = new CvdAnimationScaleKeyFrame()
{
KeyType = type,
Time = scaleKey.AnimationKey.Time,
Scale = GameBoxInterpreter.CvdScaleToUnityScale(scaleKey.Value),
Rotation = GameBoxInterpreter.CvdQuaternionToUnityQuaternion(scaleKey.Rotation)
};
break;
}
}
}
return scaleKeyFrames;
}
#if USE_UNSAFE_BINARY_READER
private static CvdMesh ReadMesh(UnsafeBinaryReader reader, float version, int codepage)
#else
private static CvdMesh ReadMesh(BinaryReader reader, float version, int codepage)
#endif
{
var numberOfFrames = reader.ReadInt32();
var numberOfVertices = reader.ReadInt32();
var frameVertices = new CvdVertex[numberOfFrames][];
for (var i = 0; i < numberOfFrames; i++)
{
var vertices = new CvdVertex[numberOfVertices];
for (var j = 0; j < numberOfVertices; j++)
{
Vector2 uv = reader.ReadVector2();
Vector3 normal = GameBoxInterpreter.ToUnityNormal(reader.ReadVector3());
Vector3 position = GameBoxInterpreter.CvdPositionToUnityPosition(reader.ReadVector3());
// Quick fix for the missing/wrong normals
if (normal == Vector3.zero) normal = Vector3.up;
vertices[j] = new CvdVertex()
{
Normal = normal,
Position = position,
Uv = uv
};
}
frameVertices[i] = vertices;
}
var animationTimeKeys = reader.ReadSingleArray(numberOfFrames);
for (var i = 0; i < numberOfFrames; i++)
{
animationTimeKeys[i] -= animationTimeKeys[0];
}
var numberOfMeshes = reader.ReadInt32();
var meshSections = new CvdMeshSection[numberOfMeshes];
for (var i = 0; i < numberOfMeshes; i++)
{
meshSections[i] = ReadMeshSection(reader, version, frameVertices, codepage);
}
return new CvdMesh()
{
AnimationTimeKeys = animationTimeKeys,
MeshSections = meshSections
};
}
#if USE_UNSAFE_BINARY_READER
private static CvdMeshSection ReadMeshSection(UnsafeBinaryReader reader,
float version,
CvdVertex[][] allFrameVertices,
int codepage)
#else
private static CvdMeshSection ReadMeshSection(BinaryReader reader,
float version,
CvdVertex[][] allFrameVertices,
int codepage)
#endif
{
var blendFlag = (GameBoxBlendFlag)reader.ReadByte();
var material = new GameBoxMaterial()
{
Diffuse = Utility.ToColor32(reader.ReadBytes(4)),
Ambient = Utility.ToColor32(reader.ReadBytes(4)),
Specular = Utility.ToColor32(reader.ReadBytes(4)),
Emissive = Utility.ToColor32(reader.ReadBytes(4)),
Power = reader.ReadSingle()
};
var textureName = reader.ReadString(64, codepage);
var numberOfIndices = reader.ReadInt32();
var indices = new (ushort x, ushort y, ushort z)[numberOfIndices];
for (var i = 0; i < numberOfIndices; i++)
{
var x = reader.ReadUInt16();
var y = reader.ReadUInt16();
var z = reader.ReadUInt16();
indices[i] = (x, y, z);
}
var animationTimeKeys = new float[] {};
var animationMaterials = Array.Empty<GameBoxMaterial>();
if (version >= 0.5)
{
var numberOfFrames = reader.ReadInt32();
animationTimeKeys = reader.ReadSingleArray(numberOfFrames);
for (var i = 0; i < numberOfFrames; i++)
{
animationTimeKeys[i] -= animationTimeKeys[0];
}
animationMaterials = new GameBoxMaterial[numberOfFrames];
for (var i = 0; i < numberOfFrames; i++)
{
animationMaterials[i] = new GameBoxMaterial()
{
Diffuse = Utility.ToColor(reader.ReadSingleArray(4)),
Ambient = Utility.ToColor(reader.ReadSingleArray(4)),
Specular = Utility.ToColor(reader.ReadSingleArray(4)),
Emissive = Utility.ToColor(reader.ReadSingleArray(4)),
Power = reader.ReadSingle()
};
}
}
var frameVertices = new CvdVertex[allFrameVertices.Length][];
(List<int> triangles, List<int> indexBuffer) = CalculateTriangles(indices);
GameBoxInterpreter.ToUnityTriangles(triangles);
for (var i = 0; i < allFrameVertices.Length; i++)
{
var verts = new CvdVertex[indexBuffer.Count];
var allVertices = allFrameVertices[i];
for (var j = 0; j < indexBuffer.Count; j++)
{
verts[j] = allVertices[indexBuffer[j]];
}
frameVertices[i] = verts;
}
return new CvdMeshSection()
{
BlendFlag = blendFlag,
Material = material,
TextureName = textureName,
FrameVertices = frameVertices,
Triangles = triangles.ToArray(),
AnimationTimeKeys = animationTimeKeys,
AnimationMaterials = animationMaterials
};
}
private static (List<int> triangles, List<int> indexBuffer) CalculateTriangles(
(ushort x, ushort y, ushort z)[] allIndices)
{
var indexBuffer = new List<int>();
var triangles = new List<int>();
var index = 0;
for (var j = 0; j < allIndices.Length; j++)
{
var indices = new[]
{
allIndices[j].x,
allIndices[j].y,
allIndices[j].z
};
for (var k = 0; k < 3; k++)
{
indexBuffer.Add(indices[k]);
triangles.Add(index++);
}
}
return (triangles, indexBuffer);
}
}
}
@@ -1,154 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataReader.Gdb
{
using System.Collections.Generic;
public enum WuLingType
{
Water, // 水
Fire, // 火
Wind, // 风
Thunder, // 雷
Earth, // 土
}
public enum ItemType
{
None = 0,
Healing, // 治疗
Throwable, // 投掷
Treasure, // 仙宝
Antique, // 古董
Ore, // 矿石
Plot, // 剧情
Cloth, // 衣服
Hat, // 帽子
Shoes, // 鞋子
Wearable, // 饰品
Weapon, // 武器
Corpse, // 尸块
Blueprint, // 蓝图(梦溪杂录,美食方)
}
public enum WeaponType
{
None = 0,
Spear, // 长矛
Sword, // 剑
Staff, // 杖
Machete, // 刀
Bow, // 弓
Spine, // 刺
Sickle, // 镰刀
}
public enum SpecialType
{
None = 0,
Poison, // 随机中毒
Flee, // 100%逃跑
Navigation, // 引路蜂类
LevelUp, // 升级类(等级提高1)
}
public enum TargetRangeType
{
None = 0,
FirstParty, // 我方单体
FirstPartyAll, // 我方全体
EnemyParty, // 敌方单体
EnemyPartyAll, // 敌方全体
}
public enum PlaceOfUseType
{
None = 0,
Combat, // 战斗中
OutOfCombat, // 非战斗中
Anywhere, // 任何地方
}
public enum ActorAttributeType
{
Hp, // 精
Qi, // 气
Mp, // 神
Attack, // 攻击
Defense, // 防御
Speed, // 速度
Luck, // 幸运
Water, // 水
Fire, // 火
Wind, // 风
Thunder, // 雷
Earth, // 土
}
public struct GameItem
{
public uint Id; // 物品ID
public string Name; // 物品名称
public string ModelName; // 物品模型名称
public string IconName; // 物品图标名称
public string Description; // 物品描述
public int Price; // 物品价格
public ItemType Type; // 物品类型
public WeaponType WeaponType; // 武器类型(只有物品为武器的时候有意义)
public byte[] MainActorCanUse; // 主角可使用信息
public byte[] WuLing; // 五灵属性
public int AncientValue; // 古董价值
public SpecialType SpecialType; // 特殊类型
public TargetRangeType TargetRangeType; // 目标范围类型
public PlaceOfUseType PlaceOfUseType; // 使用地点类型
public byte[] AttributeImpactType; // 角色属性影响类型 (0绝对值,1百分比值,2恢复到上限,3增加上限值)
// Empty byte between the memory addresses to align the data in memory.
// SpecialType, TargetRangeType and PlaceOfUseType take 3 bytes in memory, thus we need to add 1 byte here
// to align the data in memory (4 bytes).
// Note: The padding byte is added after AttributeImpactType instead of before based on observation.
internal byte PaddingByte;
public short[] AttributeImpactValue; // 角色属性影响值
public byte[] FightStateImpactType; // 战斗状态影响类型(0不影响,1增加,2解除)
public short[] FightStateImpactValue; // 战斗状态值
public int ComboCount; // 连击次数
// 装备属性
public short QiSavingPercentage; // 气消耗减少百分比
public short MpSavingPercentage; // 神消耗减少百分比
public short CriticalAttackAmplifyPercentage; // 暴击伤害增加百分比
public short SpecialSkillSuccessRate; // 特技成功率增加百分比
// 尸块属性
public uint OreId; // 矿石ID
public uint ProductId; // 炼制出的物品ID
public int ProductPrice; // 炼制出的物品价格
// 合成属性
public uint[] SynthesisMaterialIds; // 两种合成材料的ID
public uint SynthesisProductId; // 合成出的物品ID
}
// Pal3 Game Database file
public sealed class GdbFile
{
public Dictionary<int, GameItem> GameItems { get; } // Game item Id -> Game item
public GdbFile(Dictionary<int, GameItem> gameItems)
{
GameItems = gameItems;
}
}
}
@@ -1,87 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataReader.Gdb
{
using System.Collections.Generic;
using System.IO;
using Extensions;
public sealed class GdbFileReader : IFileReader<GdbFile>
{
private readonly int _codepage;
public GdbFileReader(int codepage)
{
_codepage = codepage;
}
public GdbFile Read(byte[] data)
{
using var stream = new MemoryStream(data);
using var reader = new BinaryReader(stream);
_ = reader.ReadString(128, _codepage); // header string
uint actorDataOffset = reader.ReadUInt32();
int numOfActors = reader.ReadInt32();
uint skillDataOffset = reader.ReadUInt32();
int numOfSkills = reader.ReadInt32();
uint itemDataOffset = reader.ReadUInt32();
int numOfItems = reader.ReadInt32();
uint comboSkillDataOffset = reader.ReadUInt32();
int numOfComboSkills = reader.ReadInt32();
reader.BaseStream.Seek(itemDataOffset, SeekOrigin.Begin);
var gameItems = new Dictionary<int, GameItem>();
for (var i = 0; i < numOfItems; i++)
{
GameItem item = ReadGameItem(reader, _codepage);
gameItems[(int) item.Id] = item;
}
return new GdbFile(gameItems);
}
private static GameItem ReadGameItem(BinaryReader reader, int codepage)
{
return new GameItem
{
Id = reader.ReadUInt32(),
Name = reader.ReadString(32, codepage),
ModelName = reader.ReadString(30, codepage),
IconName = reader.ReadString(30, codepage),
Description = reader.ReadString(512, codepage),
Price = reader.ReadInt32(),
Type = (ItemType) reader.ReadByte(),
WeaponType = (WeaponType) reader.ReadByte(),
MainActorCanUse = reader.ReadBytes(5),
WuLing = reader.ReadBytes(5),
AncientValue = reader.ReadInt32(),
SpecialType = (SpecialType) reader.ReadByte(), // ----------------| 1
TargetRangeType = (TargetRangeType) reader.ReadByte(), // --------| 2
PlaceOfUseType = (PlaceOfUseType) reader.ReadByte(), // ----------| 3
AttributeImpactType = reader.ReadBytes(12),
PaddingByte = reader.ReadByte(), // ------------------------------| ^ to complete 4-byte alignment
AttributeImpactValue = reader.ReadInt16Array(12),
FightStateImpactType = reader.ReadBytes(32),
FightStateImpactValue = reader.ReadInt16Array(32),
ComboCount = reader.ReadInt32(),
QiSavingPercentage = reader.ReadInt16(),
MpSavingPercentage = reader.ReadInt16(),
CriticalAttackAmplifyPercentage = reader.ReadInt16(),
SpecialSkillSuccessRate = reader.ReadInt16(),
OreId = reader.ReadUInt32(),
ProductId = reader.ReadUInt32(),
ProductPrice = reader.ReadInt32(),
SynthesisMaterialIds = reader.ReadUInt32Array(2),
SynthesisProductId = reader.ReadUInt32()
};
}
}
}
@@ -1,29 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataReader
{
using System.IO;
/// <summary>
/// File reader interface.
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IFileReader<out T>
{
T Read(byte[] data)
{
using var stream = new MemoryStream(data);
return Read(stream);
}
T Read(Stream stream)
{
using var memoryStream = new MemoryStream();
stream.CopyTo(memoryStream);
return Read(memoryStream.ToArray());
}
}
}
@@ -1,140 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
#define USE_UNSAFE_BINARY_READER
namespace Core.DataReader.Mov
{
using System.IO;
using Extensions;
using GameBox;
using Utils;
public sealed class MovFileReader : IFileReader<MovFile>
{
private readonly int _codepage;
public MovFileReader(int codepage)
{
_codepage = codepage;
}
public MovFile Read(byte[] data)
{
#if USE_UNSAFE_BINARY_READER
using var reader = new UnsafeBinaryReader(data);
#else
using var stream = new MemoryStream(data);
using var reader = new BinaryReader(stream);
#endif
var header = reader.ReadChars(4);
var headerStr = new string(header[..^1]);
if (headerStr != "anm")
{
throw new InvalidDataException("Invalid MOV(.mov) file: header != anm");
}
var version = reader.ReadInt32();
if (version != 100)
{
throw new InvalidDataException("Invalid MOV(.mov) file: version != 100");
}
var duration = reader.ReadSingle();
var numberOfBoneAnimationTracks = reader.ReadInt32();
var numberOfVertices = reader.ReadInt32();
var numberOfAnimationEvents = reader.ReadInt32();
var animationEvents = new MovAnimationEvent[numberOfAnimationEvents];
for (var i = 0; i < numberOfAnimationEvents; i++)
{
animationEvents[i] = ReadAnimationEvent(reader, _codepage);
}
var boneAnimationTracks = new MovBoneAnimationTrack[numberOfBoneAnimationTracks];
for (var i = 0; i < numberOfBoneAnimationTracks; i++)
{
boneAnimationTracks[i] = ReadBoneAnimationTrack(reader, _codepage);
}
uint totalDuration = 0;
for (var i = 0; i < boneAnimationTracks.Length; i++)
{
int numOfKeyFrames = boneAnimationTracks[i].KeyFrames.Length;
if (numOfKeyFrames > 0)
{
uint tick = boneAnimationTracks[i].KeyFrames[numOfKeyFrames - 1].Tick;
if (tick > totalDuration)
{
totalDuration = tick;
}
}
}
return new MovFile(totalDuration, boneAnimationTracks, animationEvents);
}
#if USE_UNSAFE_BINARY_READER
private static MovAnimationEvent ReadAnimationEvent(UnsafeBinaryReader reader, int codepage)
#else
private static MovAnimationEvent ReadAnimationEvent(BinaryReader reader, int codepage)
#endif
{
return new MovAnimationEvent()
{
Tick = GameBoxInterpreter.GameBoxSecondsToTick(reader.ReadSingle()),
Name = reader.ReadString(16, codepage)
};
}
#if USE_UNSAFE_BINARY_READER
private static MovBoneAnimationTrack ReadBoneAnimationTrack(UnsafeBinaryReader reader, int codepage)
#else
private static MovBoneAnimationTrack ReadBoneAnimationTrack(BinaryReader reader, int codepage)
#endif
{
var boneId = reader.ReadInt32();
var lengthOfBoneName = reader.ReadInt32();
var boneName = reader.ReadString(lengthOfBoneName, codepage);
var numberOfKeyFrames = reader.ReadInt32();
var animationFlags = reader.ReadInt32();
var animationKeyFrames = new MovAnimationKeyFrame[numberOfKeyFrames];
for (var i = 0; i < animationKeyFrames.Length; i++)
{
animationKeyFrames[i] = new MovAnimationKeyFrame()
{
Tick = GameBoxInterpreter.GameBoxSecondsToTick(reader.ReadSingle()),
Translation = GameBoxInterpreter.ToUnityPosition(reader.ReadVector3()),
Rotation = GameBoxInterpreter.MovQuaternionToUnityQuaternion(new GameBoxQuaternion()
{
X = reader.ReadSingle(),
Y = reader.ReadSingle(),
Z = reader.ReadSingle(),
W = reader.ReadSingle(),
}),
Scale = new []
{
new [] {reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()},
new [] {reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()},
new [] {reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()},
}
};
}
return new MovBoneAnimationTrack()
{
BoneId = boneId,
BoneName = boneName,
AnimationFlags = animationFlags,
KeyFrames = animationKeyFrames
};
}
}
}
@@ -1,353 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
#define USE_UNSAFE_BINARY_READER
namespace Core.DataReader.Mv3
{
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Extensions;
using GameBox;
using UnityEngine;
using Utils;
public sealed class Mv3FileReader : IFileReader<Mv3File>
{
private readonly int _codepage;
public Mv3FileReader(int codepage)
{
_codepage = codepage;
}
public Mv3File Read(byte[] data)
{
#if USE_UNSAFE_BINARY_READER
using var reader = new UnsafeBinaryReader(data);
#else
using var stream = new MemoryStream(data);
using var reader = new BinaryReader(stream);
#endif
var header = reader.ReadChars(4);
var headerStr = new string(header[..^1]);
if (headerStr != "MV3")
{
throw new InvalidDataException("Invalid MV3(.mv3) file: header != MV3");
}
var version = reader.ReadInt32();
if (version != 100)
{
throw new InvalidDataException("Invalid MV3(.mv3) file: version != 100");
}
var duration = reader.ReadUInt32();
var numberOfMaterials = reader.ReadInt32();
var numberOfTagNodes = reader.ReadInt32();
var numberOfMeshes = reader.ReadInt32();
var numberOfAnimationEvents = reader.ReadInt32();
if (numberOfMeshes == 0 || numberOfMaterials == 0)
{
throw new InvalidDataException("Invalid MV3(.mv3) file: missing mesh or material info");
}
var animationEvents = new Mv3AnimationEvent[numberOfAnimationEvents];
for (var i = 0; i < numberOfAnimationEvents; i++)
{
animationEvents[i] = ReadAnimationEvent(reader, _codepage);
}
var tagNodes = new Mv3TagNode[numberOfTagNodes];
for (var i = 0; i < numberOfTagNodes; i++)
{
tagNodes[i] = ReadTagNode(reader, _codepage);
}
var materials = new Mv3Material[numberOfMaterials];
for (var i = 0; i < numberOfMaterials; i++)
{
materials[i] = ReadMaterial(reader, _codepage);
}
var meshes = new Mv3Mesh[numberOfMeshes];
for (var i = 0; i < numberOfMeshes; i++)
{
meshes[i] = ReadMesh(reader, _codepage);
}
return new Mv3File(duration,
animationEvents,
tagNodes,
materials,
meshes);
}
#if USE_UNSAFE_BINARY_READER
private static Mv3Mesh ReadMesh(UnsafeBinaryReader reader, int codepage)
#else
private static Mv3Mesh ReadMesh(BinaryReader reader, int codepage)
#endif
{
var name = reader.ReadString(64, codepage);
var numberOfVertices = reader.ReadInt32();
var bounds = new Bounds();
bounds.SetMinMax(
GameBoxInterpreter.ToUnityPosition(reader.ReadVector3()),
GameBoxInterpreter.ToUnityPosition(reader.ReadVector3()));
var numberOfFrames = reader.ReadInt32();
var frames = new Mv3VertFrame[numberOfFrames];
for (var i = 0; i < numberOfFrames; i++)
{
var tick = reader.ReadUInt32();
var vertices = new Mv3Vert[numberOfVertices];
for (var j = 0; j < numberOfVertices; j++)
{
vertices[j] = new Mv3Vert()
{
X = reader.ReadInt16(),
Y = reader.ReadInt16(),
Z = reader.ReadInt16(),
N = reader.ReadUInt16()
};
}
frames[i] = new Mv3VertFrame()
{
Tick = tick,
Vertices = vertices
};
}
var numberOfTexCoords = reader.ReadInt32();
Vector2[] texCoords;
if (numberOfTexCoords == 0)
{
texCoords = new Vector2[] { new (0f, 0f) };
Debug.LogWarning("numberOfTexCoords == 0");
}
else
{
texCoords = new Vector2[numberOfTexCoords];
for (var i = 0; i < numberOfTexCoords; i++)
{
texCoords[i] = reader.ReadVector2();
}
}
var numberOfAttributes = reader.ReadInt32();
var attributes = new Mv3Attribute[numberOfAttributes];
for (var i = 0; i < numberOfAttributes; i++)
{
var materialId = reader.ReadInt32();
var numberOfTriangles = reader.ReadInt32();
var triangles = new Mv3IndexBuffer[numberOfTriangles];
for (var j = 0; j < numberOfTriangles; j++)
{
triangles[j] = new Mv3IndexBuffer()
{
TriangleIndex = new []{ reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16()},
TexCoordIndex = new []{ reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16()}
};
}
var numberOfCommands = reader.ReadInt32();
var commands = new int[numberOfCommands];
for (var j = 0; j < numberOfCommands; j++)
{
commands[j] = reader.ReadInt32();
}
attributes[i] = new Mv3Attribute()
{
MaterialId = materialId,
IndexBuffers = triangles,
Commands = commands,
};
}
return GetMv3Mesh(name, bounds, attributes, frames, texCoords);
}
private static Mv3Mesh GetMv3Mesh(string name,
Bounds bounds,
Mv3Attribute[] attributes,
Mv3VertFrame[] vertFrames,
Vector2[] texCoords)
{
var triangles = new int[attributes[0].IndexBuffers.Length * 3];
var keyFrameVertices = new List<Vector3>[vertFrames.Length]
.Select(item=>new List<Vector3>()).ToArray();
var uvs = new Vector2[attributes[0].IndexBuffers.Length * 3];
var triangleIndex = 0;
for (var i = 0; i < attributes[0].IndexBuffers.Length; i++)
{
Mv3IndexBuffer indexBuffer = attributes[0].IndexBuffers[i];
for (var j = 0; j < 3; j++)
{
for (var k = 0; k < vertFrames.Length; k++)
{
Mv3VertFrame frame = vertFrames[k];
Mv3Vert vertex = frame.Vertices[indexBuffer.TriangleIndex[j]];
keyFrameVertices[k].Add((GameBoxInterpreter
.ToUnityVertex(new Vector3(vertex.X, vertex.Y, vertex.Z),
GameBoxInterpreter.GameBoxMv3UnitToUnityUnit)));
}
uvs[triangleIndex] = texCoords[indexBuffer.TexCoordIndex[j]];
triangles[triangleIndex] = triangleIndex;
triangleIndex++;
}
}
GameBoxInterpreter.ToUnityTriangles(triangles);
var animationKeyFrames = new Mv3AnimationKeyFrame[vertFrames.Length];
for (var i = 0; i < animationKeyFrames.Length; i++)
{
animationKeyFrames[i] = new Mv3AnimationKeyFrame()
{
Tick = vertFrames[i].Tick,
Vertices = keyFrameVertices[i].ToArray(),
};
}
return new Mv3Mesh
{
Name = name,
Bounds = bounds,
Attributes = attributes,
Triangles = triangles,
Uvs = uvs,
Normals = Utility.CalculateNormals(animationKeyFrames[0].Vertices, triangles),
KeyFrames = animationKeyFrames,
};
}
#if USE_UNSAFE_BINARY_READER
private static Mv3TagNode ReadTagNode(UnsafeBinaryReader reader, int codepage)
#else
private static Mv3TagNode ReadTagNode(BinaryReader reader, int codepage)
#endif
{
var nodeName = reader.ReadString(64, codepage);
var flipScale = reader.ReadSingle();
var numberOfFrames = reader.ReadInt32();
var tagFrames = new Mv3TagFrame[numberOfFrames];
for (var i = 0; i < numberOfFrames; i++)
{
tagFrames[i] = ReadTagFrame(reader);
}
return new Mv3TagNode()
{
Name = nodeName,
TagFrames = tagFrames,
FlipScale = flipScale
};
}
#if USE_UNSAFE_BINARY_READER
private static Mv3TagFrame ReadTagFrame(UnsafeBinaryReader reader)
#else
private static Mv3TagFrame ReadTagFrame(BinaryReader reader)
#endif
{
var tick = reader.ReadUInt32();
Vector3 position = GameBoxInterpreter.ToUnityPosition(reader.ReadVector3());
var rotation = GameBoxInterpreter.Mv3QuaternionToUnityQuaternion(new GameBoxQuaternion()
{
X = reader.ReadSingle(),
Y = reader.ReadSingle(),
Z = reader.ReadSingle(),
W = reader.ReadSingle(),
});
var scale = new []
{
new [] {reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()},
new [] {reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()},
new [] {reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()},
};
return new Mv3TagFrame()
{
Tick = tick,
Position = position,
Rotation = rotation,
Scale = scale,
};
}
#if USE_UNSAFE_BINARY_READER
private static Mv3AnimationEvent ReadAnimationEvent(UnsafeBinaryReader reader, int codepage)
#else
private static Mv3AnimationEvent ReadAnimationEvent(BinaryReader reader, int codepage)
#endif
{
return new Mv3AnimationEvent()
{
Tick = reader.ReadUInt32(),
Name = reader.ReadString(16, codepage),
};
}
#if USE_UNSAFE_BINARY_READER
private static Mv3Material ReadMaterial(UnsafeBinaryReader reader, int codepage)
#else
private static Mv3Material ReadMaterial(BinaryReader reader, int codepage)
#endif
{
var material = new GameBoxMaterial()
{
Diffuse = Utility.ToColor(reader.ReadSingleArray(4)),
Ambient = Utility.ToColor(reader.ReadSingleArray(4)),
Specular = Utility.ToColor(reader.ReadSingleArray(4)),
Emissive = Utility.ToColor(reader.ReadSingleArray(4)),
Power = reader.ReadSingle()
};
var textureNames = new List<string>();
for (var i = 0; i < 4; i++)
{
string textureName;
var length = reader.ReadInt32();
if (length is < 0 or > 255)
{
throw new InvalidDataException($"Invalid length of material name: {length}");
}
if (length == 0)
{
if (i > 0) continue;
textureName = string.Empty; // Use default white texture?
}
else
{
textureName = reader.ReadString(length, codepage);
}
textureNames.Add(textureName);
}
return new Mv3Material()
{
Material = material,
TextureNames = textureNames.ToArray(),
};
}
}
}
@@ -1,102 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataReader.Nav
{
using GameBox;
using UnityEngine;
// NAV (.nav) file header
internal struct NavHeader
{
public string Label; // 4 char
public byte Version;
public byte NumberOfLayers;
public uint TileOffset;
public uint FaceOffset;
}
public enum NavFloorKind
{
Default = 0, // 不可跳
Jumpable, // 可跳过
Soil, // 土
Mud, // 泥
River, // 水道(船状态)
Snow, // 雪
Wet, // 水浸
Grass, // 草
Wood, // 竹木
Plant, // 植物
Wetland, // 沼泽
Sand, // 沙
Metal, // 金属
Rock1, // 熔岩
Rock2, // 岩石基底地面
Rock3, // 人工石地面
Brick, // 砖
DevilWorld1, // 异空间A
DevilWorld2, // 异空间B
DevilWorld3, // 异空间C
Other, // 其它
FloorIce, // 冰
FloorBlood, // 血池
FloorWater, // 水域
}
public struct NavTile
{
public float GameBoxYPosition; // 格子地板高度(原GameBox引擎下的Y坐标单位)
public byte DistanceToNearestObstacle; // 格子距离周边障碍物的距离 (0最小-7最大)
public NavFloorKind FloorKind; // 格子地板类型:0~128索引普通地面属性(土草雪等),128~255索引机关序号
public bool IsObstacle; // 是否为障碍物
public bool IsWalkable()
{
return !IsObstacle && DistanceToNearestObstacle > 0 && FloorKind != NavFloorKind.Jumpable;
}
}
// public struct NavLayerNode
// {
// public GameBoxAABBox BoundBox;
// public Vector3[] Triangles;
// public int Level; // 0: root, child level = parent level + 1
// public NavLayerNode[] Children; // 4
// }
public struct NavTileLayer
{
public GameBoxRect[] Portals; // Max of 8
public Vector3 Max;
public Vector3 Min;
public int Width;
public int Height;
public NavTile[] Tiles;
}
public struct NavFaceLayer
{
public Vector3[] Vertices;
public int[] Triangles;
//public NavLayerNode[] Nodes;
}
/// <summary>
/// NAV (.nav) file model
/// </summary>
public sealed class NavFile
{
public NavTileLayer[] TileLayers { get; }
public NavFaceLayer[] FaceLayers { get; }
public NavFile(NavTileLayer[] tileLayers, NavFaceLayer[] faceLayers)
{
TileLayers = tileLayers;
FaceLayers = faceLayers;
}
}
}
@@ -1,152 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataReader.Nav
{
using System;
using System.IO;
using Extensions;
using GameBox;
using UnityEngine;
using Utils;
public sealed class NavFileReader : IFileReader<NavFile>
{
public NavFile Read(Stream stream)
{
using var reader = new BinaryReader(stream);
var header = reader.ReadChars(4);
var headerStr = new string(header[..^1]);
if (headerStr != "NAV")
{
throw new InvalidDataException("Invalid NAV(.nav) file: header != NAV");
}
var version = reader.ReadByte();
var numberOfLayers = reader.ReadByte();
var tileOffset = reader.ReadUInt32();
var faceOffset = reader.ReadUInt32();
reader.BaseStream.Seek(tileOffset, SeekOrigin.Begin);
var tileLayers = new NavTileLayer[numberOfLayers];
for (var i = 0; i < numberOfLayers; i++)
{
tileLayers[i] = ReadTileLayer(reader, version);
}
reader.BaseStream.Seek(faceOffset, SeekOrigin.Begin);
var faceLayers = new NavFaceLayer[numberOfLayers];
for (var i = 0; i < numberOfLayers; i++)
{
faceLayers[i] = ReadFaceLayer(reader);
}
return new NavFile(tileLayers, faceLayers);
}
private static NavTileLayer ReadTileLayer(BinaryReader reader, byte version)
{
var portals = Array.Empty<GameBoxRect>();
if (version == 2)
{
portals = new GameBoxRect[8];
for (var i = 0; i < 8; i++)
{
portals[i] = new GameBoxRect()
{
Left = reader.ReadInt32(),
Top = reader.ReadInt32(),
Right = reader.ReadInt32(),
Bottom = reader.ReadInt32(),
};
}
}
Vector3 max = reader.ReadVector3();
Vector3 min = reader.ReadVector3();
var width = reader.ReadInt32();
var height = reader.ReadInt32();
var navMapSize = width * height;
if (navMapSize <= 0)
{
throw new Exception($"Invalid NAV(.nav) file: Map size is in valid: {navMapSize}");
}
var tiles = new NavTile[navMapSize];
for (var i = 0; i < navMapSize; i++)
{
tiles[i] = new NavTile
{
GameBoxYPosition = reader.ReadSingle(),
DistanceToNearestObstacle = reader.ReadByte(), //---| 1
FloorKind = (NavFloorKind) reader.ReadByte() //----| 2
};
_ = reader.ReadBytes(2); //-----------------------------| ^ to complete 4-byte alignment
}
return new NavTileLayer()
{
Portals = portals,
Max = max,
Min = min,
Width = width,
Height = height,
Tiles = tiles
};
}
private static NavFaceLayer ReadFaceLayer(BinaryReader reader)
{
var numberOfVertices = reader.ReadUInt16();
var numberOfFaces = reader.ReadUInt16();
var vertices = new Vector3[numberOfVertices];
for (var i = 0; i < numberOfVertices; i++)
{
vertices[i] = GameBoxInterpreter.ToUnityPosition(reader.ReadVector3());
}
var triangles = new int[numberOfFaces * 3];
for (var i = 0; i < numberOfFaces; i++)
{
var index = i * 3;
triangles[index] = reader.ReadUInt16();
triangles[index + 1] = reader.ReadUInt16();
triangles[index + 2] = reader.ReadUInt16();
}
// Some of the nav meshes in the original game are upside down (don't know why),
// so we need to flip them if that's the case. You might argue that we can just
// make the mesh double sided, but that would cause some other issues (trust me).
{
Vector3[] normals = Utility.CalculateNormals(vertices, triangles);
for (var i = 0; i < numberOfFaces; i++)
{
var index = i * 3;
// Determine if the face is pointing downwards.
if (normals[triangles[index]].y +
normals[triangles[index + 1]].y +
normals[triangles[index + 2]].y < 0)
{
// Change the winding order of the face to make it point upwards.
(triangles[index], triangles[index + 1]) = (triangles[index + 1], triangles[index]);
}
}
}
return new NavFaceLayer()
{
Vertices = vertices,
Triangles = triangles,
};
}
}
}
@@ -1,295 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
#define USE_UNSAFE_BINARY_READER
namespace Core.DataReader.Pol
{
using System;
using System.IO;
using Extensions;
using GameBox;
using UnityEngine;
using Utils;
public sealed class PolFileReader : IFileReader<PolFile>
{
private readonly int _codepage;
public PolFileReader(int codepage)
{
_codepage = codepage;
}
public PolFile Read(byte[] data)
{
#if USE_UNSAFE_BINARY_READER
using var reader = new UnsafeBinaryReader(data);
#else
using var stream = new MemoryStream(data);
using var reader = new BinaryReader(stream);
#endif
var header = reader.ReadChars(4);
var headerStr = new string(header);
if (headerStr != "POLY")
{
throw new InvalidDataException($"Invalid POLY(.pol) file: header != POLY");
}
var version = reader.ReadInt32();
var numberOfNodes = reader.ReadInt32();
var nodeInfos = new PolGeometryNode[numberOfNodes];
for (var i = 0; i < numberOfNodes; i++)
{
nodeInfos[i] = new PolGeometryNode
{
Name = reader.ReadString(32, _codepage),
Position = GameBoxInterpreter.ToUnityPosition(reader.ReadVector3()),
Radius = reader.ReadSingle(),
Offset = reader.ReadInt32()
};
}
var tagNodes = Array.Empty<TagNode>();
if (version > 100)
{
var numberOfTagNodes = reader.ReadInt32();
if (numberOfTagNodes > 0)
{
tagNodes = new TagNode[numberOfTagNodes];
for (var i = 0; i < numberOfTagNodes; i++)
{
tagNodes[i] = ReadTagNodeInfo(reader, _codepage);
}
}
}
var meshInfos = new PolMesh[numberOfNodes];
for (var i = 0; i < numberOfNodes; i++)
{
meshInfos[i] = ReadMeshData(reader, version, _codepage);
}
return new PolFile(version, nodeInfos, meshInfos, tagNodes);
}
#if USE_UNSAFE_BINARY_READER
private static TagNode ReadTagNodeInfo(UnsafeBinaryReader reader, int codepage)
#else
private static TagNode ReadTagNodeInfo(BinaryReader reader, int codepage)
#endif
{
var name = reader.ReadString(32, codepage);
Matrix4x4 transformMatrix = GameBoxInterpreter.ToUnityMatrix4x4(new GameBoxMatrix4X4()
{
Xx = reader.ReadSingle(), Xy = reader.ReadSingle(), Xz = reader.ReadSingle(), Xw = reader.ReadSingle(),
Yx = reader.ReadSingle(), Yy = reader.ReadSingle(), Yz = reader.ReadSingle(), Yw = reader.ReadSingle(),
Zx = reader.ReadSingle(), Zy = reader.ReadSingle(), Zz = reader.ReadSingle(), Zw = reader.ReadSingle(),
Tx = reader.ReadSingle(), Ty = reader.ReadSingle(), Tz = reader.ReadSingle(), Tw = reader.ReadSingle()
});
Vector3 origin = GameBoxInterpreter.ToUnityPosition(transformMatrix.MultiplyPoint(Vector3.zero));
var type = reader.ReadInt32();
var customColorStringLength = reader.ReadInt32();
uint tintColor = 0xffffffff;
if (customColorStringLength > 0)
{
var parts = new string(reader.ReadChars(customColorStringLength)).Split(' ');
if (parts.Length == 3)
{
tintColor = 0xff000000 |
(uint.Parse(parts[0]) << 16) |
(uint.Parse(parts[1]) << 8) |
(uint.Parse(parts[2]));
}
else
{
throw new Exception("Invalid TagNode color string.");
}
}
return new TagNode()
{
Name = name,
Origin = origin,
TintColor = tintColor
};
}
#if USE_UNSAFE_BINARY_READER
private static PolMesh ReadMeshData(UnsafeBinaryReader reader, int version, int codepage)
#else
private static PolMesh ReadMeshData(BinaryReader reader, int version, int codepage)
#endif
{
var bounds = new Bounds();
bounds.SetMinMax(
GameBoxInterpreter.ToUnityPosition(reader.ReadVector3()),
GameBoxInterpreter.ToUnityPosition(reader.ReadVector3()));
var vertexTypeFlag = reader.ReadUInt32();
var numberOfVertices = reader.ReadInt32();
if (numberOfVertices <= 0)
{
throw new InvalidDataException($"Invalid POLY(.pol) file: vertices == 0");
}
var positions = new Vector3[numberOfVertices];
var normals = new Vector3[numberOfVertices];
var diffuseColors = new Color32[numberOfVertices];
var specularColors = new Color32[numberOfVertices];
var uvs = new Vector2[4][];
uvs[0] = new Vector2[numberOfVertices];
uvs[1] = new Vector2[numberOfVertices];
uvs[2] = new Vector2[numberOfVertices];
uvs[3] = new Vector2[numberOfVertices];
for (var i = 0; i < numberOfVertices; i++)
{
if ((vertexTypeFlag & GameBoxVertexType.XYZ) != 0)
{
positions[i] = GameBoxInterpreter
.ToUnityVertex(reader.ReadVector3(),
GameBoxInterpreter.GameBoxUnitToUnityUnit);
}
if ((vertexTypeFlag & GameBoxVertexType.XYZRHW) != 0)
{
positions[i] = GameBoxInterpreter
.ToUnityVertex(reader.ReadVector3(),
GameBoxInterpreter.GameBoxUnitToUnityUnit);
_ = reader.ReadSingle();
}
if ((vertexTypeFlag & GameBoxVertexType.Normal) != 0)
{
normals[i] = GameBoxInterpreter.ToUnityNormal(reader.ReadVector3());
}
if ((vertexTypeFlag & GameBoxVertexType.Diffuse) != 0)
{
diffuseColors[i] = Utility.ToColor32(reader.ReadBytes(4));
}
if ((vertexTypeFlag & GameBoxVertexType.Specular) != 0)
{
specularColors[i] = Utility.ToColor32(reader.ReadBytes(4));
}
if ((vertexTypeFlag & GameBoxVertexType.UV0) != 0)
{
var x = reader.ReadSingle();
var y = reader.ReadSingle();
uvs[0][i] = new Vector2(x, y);
}
if ((vertexTypeFlag & GameBoxVertexType.UV1) != 0)
{
var x = reader.ReadSingle();
var y = reader.ReadSingle();
uvs[1][i] = new Vector2(x, y);
}
if ((vertexTypeFlag & GameBoxVertexType.UV2) != 0)
{
var x = reader.ReadSingle();
var y = reader.ReadSingle();
uvs[2][i] = new Vector2(x, y);
}
if ((vertexTypeFlag & GameBoxVertexType.UV3) != 0)
{
var x = reader.ReadSingle();
var y = reader.ReadSingle();
uvs[3][i] = new Vector2(x, y);
}
// Quick fix for the missing/wrong normals
if (normals[i] == Vector3.zero) normals[i] = Vector3.up;
}
var vertexInfo = new PolVertexInfo()
{
Positions = positions,
Normals = normals,
DiffuseColors = diffuseColors,
SpecularColors = specularColors,
Uvs = uvs,
};
var numberOfTextures = reader.ReadInt32();
var textureInfos = new PolTexture[numberOfTextures];
for (var i = 0; i < numberOfTextures; i++)
{
textureInfos[i] = ReadTextureInfo(reader, version, codepage);
}
return new PolMesh
{
Bounds = bounds,
VertexFvfFlag = vertexTypeFlag,
VertexInfo = vertexInfo,
Textures = textureInfos
};
}
#if USE_UNSAFE_BINARY_READER
private static PolTexture ReadTextureInfo(UnsafeBinaryReader reader, int version, int codepage)
#else
private static PolTexture ReadTextureInfo(BinaryReader reader, int version, int codepage)
#endif
{
var blendFlag = (GameBoxBlendFlag)reader.ReadUInt32();
var material = new GameBoxMaterial()
{
Diffuse = Utility.ToColor(reader.ReadSingleArray(4)),
Ambient = Utility.ToColor(reader.ReadSingleArray(4)),
Specular = Utility.ToColor(reader.ReadSingleArray(4)),
Emissive = Utility.ToColor(reader.ReadSingleArray(4)),
Power = reader.ReadSingle()
};
// Hack fix
if (material.Power < 0) material.Power = 0;
else if (material.Power > 128) material.Power = 128;
var numberOfTextures = reader.ReadInt32();
var textureNames = new string[numberOfTextures];
for (var i = 0; i < numberOfTextures; i++)
{
var textureName = reader.ReadString(64, codepage);
textureNames[i] = textureName;
}
_ = reader.ReadInt32();
var vertStart = reader.ReadUInt32();
var vertEnd = reader.ReadUInt32();
var numberOfFaces = reader.ReadInt32();
var triangles = new int[numberOfFaces * 3];
for (var i = 0; i < numberOfFaces; i++)
{
var index = i * 3;
triangles[index] = reader.ReadUInt16();
triangles[index + 1] = reader.ReadUInt16();
triangles[index + 2] = reader.ReadUInt16();
}
GameBoxInterpreter.ToUnityTriangles(triangles);
return new PolTexture()
{
BlendFlag = blendFlag,
Material = material,
TextureNames = textureNames,
VertStart = vertStart,
VertEnd = vertEnd,
Triangles = triangles
};
}
}
}
@@ -1,106 +0,0 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.DataReader.Sce
{
using System.IO;
using Extensions;
public sealed class SceFileReader : IFileReader<SceFile>
{
private readonly int _codepage;
public SceFileReader(int codepage)
{
_codepage = codepage;
}
public SceFile Read(Stream stream)
{
using var reader = new BinaryReader(stream);
var header = reader.ReadChars(4);
var headerStr = new string(header[..^1]);
if (headerStr != "SCE")
{
throw new InvalidDataException("Invalid SCE(.sce) file: header != SCE");
}
var version = reader.ReadByte();
if (version != 1)
{
throw new InvalidDataException($"Invalid SCE(.sce) file: version ({version}) != 1");
}
var numberOfBlocks = reader.ReadUInt16();
var indexes = new SceIndex[numberOfBlocks];
for (var i = 0; i < numberOfBlocks; i++)
{
indexes[i] = ReadSceIndex(reader, _codepage);
}
var scriptBlocks = new SceScriptBlock[numberOfBlocks];
for (var i = 0; i < numberOfBlocks; i++)
{
scriptBlocks[i] = ReadScriptBlock(reader, indexes[i], _codepage);
}
return new SceFile(indexes, scriptBlocks, _codepage);
}
private static SceScriptBlock ReadScriptBlock(BinaryReader reader, SceIndex sceIndex, int codepage)
{
reader.BaseStream.Seek(sceIndex.Offset, SeekOrigin.Begin);
var id = reader.ReadUInt32();
var descriptionLength = reader.ReadUInt16();
var description = reader.ReadString(descriptionLength, codepage);
var numberOfUserVars = reader.ReadUInt16();
var userVarInfos = new SceUserVarInfo[numberOfUserVars];
for (var i = 0; i < numberOfUserVars; i++)
{
userVarInfos[i] = ReadUserVarInfo(reader);
}
var scriptSize = reader.ReadUInt32();
var scriptData = reader.ReadBytes((int)scriptSize);
return new SceScriptBlock()
{
Id = id,
Description = description,
ScriptData = scriptData,
UserVariables = userVarInfos
};
}
private static SceUserVarInfo ReadUserVarInfo(BinaryReader reader)
{
var type = reader.ReadByte();
var length = reader.ReadUInt16();
var data = reader.ReadBytes(length);
return new SceUserVarInfo()
{
Type = type,
InitData = data
};
}
private static SceIndex ReadSceIndex(BinaryReader reader, int codepage)
{
return new SceIndex()
{
Id = reader.ReadUInt32(),
Offset = reader.ReadUInt32(),
Description = reader.ReadString(64, codepage)
};
}
}
}
Loaded 100 of 1455 files, more files were not shown because too many files have changed in this diff. Show more