Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 7.0.0 #75

Draft
wants to merge 234 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
996b08a
added for interpreting trail color as linear
orels1 Dec 24, 2023
3a8716f
added basic support for lightmapping toon shaders
orels1 Dec 24, 2023
bc3ddcb
added simple LTCGI brightness clamp+normalize
orels1 Dec 24, 2023
30d56da
added an option to ignore stencils in toon outlines
orels1 Dec 24, 2023
ae6b812
added Samples folder to gitignore
orels1 Dec 30, 2023
ccf7bd1
removed vrc project bootstrapper from packages
orels1 Dec 30, 2023
944f220
updated audiolink to v1.2.0
orels1 Dec 30, 2023
793ea3c
added missing docs link to dissolve module
orels1 Dec 30, 2023
bd3428b
added support for emissive GI boost in meta pass
orels1 Dec 30, 2023
41c6ebe
fixed UI shader when used with masking (oops)
orels1 Dec 30, 2023
d3ace8a
audiolink cginc 1.2.0 update
orels1 Dec 30, 2023
c5e8a9b
added support for bicubic sampling of realtime lightmap
orels1 Dec 30, 2023
d801e4d
VertexAnimation new features
orels1 Dec 30, 2023
08d8d33
added masked-tweaks module
orels1 Dec 30, 2023
a3c2af7
added tonemapping and color corr utils
orels1 Jan 7, 2024
93524d2
added support for in-shader tonemapping
orels1 Jan 7, 2024
686de4b
updated scripts to support bumping version + deps
orels1 Jan 7, 2024
ee7876f
6.4.0-dev.1 release
orels1 Jan 7, 2024
a622e4b
added poi to gitignore
orels1 Jan 7, 2024
3b43401
fixed an issue with version bump script
orels1 Jan 7, 2024
90714a7
added support for vertex color modifier for Outline width
orels1 Jan 7, 2024
a4ffd7b
6.4.0-dev.1 bump
orels1 Jan 7, 2024
93b7438
fixed stripping sampling macros
orels1 Jan 30, 2024
0ff253c
added branch config
orels1 Mar 3, 2024
4b678f3
updated branch config
orels1 Mar 3, 2024
a42c660
switched UVs to always use half4 instead of half2
orels1 Mar 3, 2024
dbe7f80
added color grading utils and spritesheet UV helper
orels1 Mar 3, 2024
bb1b8c7
added support for Tessellation
orels1 Mar 3, 2024
f925024
6.4.0-dev.3 release
orels1 Mar 3, 2024
d9dd832
tessellation was missing.. the tessellation module :sweat:
orels1 Mar 3, 2024
4cd26b6
Dev project moved to unity 2022
orels1 Mar 30, 2024
f3907b9
release exporter is usable again
orels1 Mar 31, 2024
2e5546a
Merge pull request #64 from orels1/2022-update
orels1 Mar 31, 2024
ccc7c49
added a unity shader parser import script
orels1 Mar 3, 2024
8ef8502
unity shader parser dependency
orels1 Mar 3, 2024
6d6bd57
moved assembly definitions around
orels1 Mar 3, 2024
3754a53
added odin and some basic shader anlysis tools
orels1 Mar 3, 2024
c7bfee1
test gitbutler diff clean
orels1 Mar 25, 2024
dbd2aa7
migrated texture/sampler/feature countint o pema's parser
orels1 Mar 30, 2024
94c3a46
drastically simplified function block handling
orels1 Mar 30, 2024
70bba27
moved prop deduplication to use a parser
orels1 Mar 30, 2024
6246b0e
moved Texture/Sampler detection to macro expansion
orels1 Mar 31, 2024
6de09b4
bumped to new dev
orels1 Mar 31, 2024
4af2c52
Merge pull request #65 from orels1/feature/shader-analysis
orels1 Mar 31, 2024
0346d2d
ignoring user settings stuff
orels1 May 5, 2024
6b6f866
added hotspotting shader
orels1 May 5, 2024
922074a
fixed a syntax issue
orels1 May 5, 2024
4f44925
ORL-68 finalized the current hotspotting shader
orels1 May 5, 2024
1fc2364
ORL-67 fixed the albedo channel picker
orels1 May 5, 2024
983e09d
improved naming for the mobile tonemapping
orels1 May 5, 2024
2605551
ORL-65 fixed a typo in Rim Light's "Sharpness"
orels1 May 5, 2024
0b0fb1e
ORL-69 changed the default channel layout for texture packer
orels1 May 5, 2024
31f7982
added more things to gitignore
orels1 Jul 3, 2024
39b0d81
ignored TMP and bakery assets for dev project
orels1 Jul 3, 2024
63d10bd
added mockhmd to the dev project and updated packages
orels1 Jul 3, 2024
b49fb82
added support for deduplicating shader tags, closes #72
orels1 Jul 3, 2024
e510770
added vertex light utils to the LightingHelpers
orels1 Jul 3, 2024
a6ea3a5
fixed Patterns shader not showing options correctly
orels1 Jul 3, 2024
c83ee0c
added support for legacy detail albedo mixing, closes #73
orels1 Jul 3, 2024
0a56a40
cleaned up details mixing stuff
orels1 Jul 3, 2024
63f0241
improved the normal tangent sign calculations (per pixel instead of p…
orels1 Jul 3, 2024
3fcd21f
fixed vertex animation showing every option at all times
orels1 Jul 3, 2024
664ac54
added support for adjusting stencils, closes #74
orels1 Jul 3, 2024
fa41b4f
added support for vertex lights, closes [ORL-70] Add Vertex Light Sup…
orels1 Jul 3, 2024
ffd1621
expanded mobile tonemapping options, part of [ORL-66] In-Shader Tonem…
orels1 Jul 3, 2024
55d7a75
fixed up issues with specular occlusion, added a non-physically corre…
orels1 Jul 3, 2024
2c37483
improved the UI
orels1 Jul 3, 2024
d55e35d
no applying emission in FORWARDADD
orels1 Jul 3, 2024
bbca0d3
cleanup
orels1 Jul 3, 2024
5a77290
ensured all standard shaders have stencil support
orels1 Jul 3, 2024
6890e2b
bumped to dev.5
orels1 Jul 3, 2024
518b19c
addressed Untiy 2019 compatibility issues
orels1 Jul 4, 2024
ec6cf49
reworked the release exporter to ignore files new to git
orels1 Jul 4, 2024
4e6882c
bumped version to dev.6
orels1 Jul 4, 2024
1f977cb
added zip exporting to the release exporter
orels1 Jul 4, 2024
7744a91
improved specular occlusion handling, closes #76
orels1 Jul 11, 2024
d4a495c
added support for easy extra pass creation
orels1 Jul 11, 2024
28197bb
bumped to dev.7
orels1 Jul 11, 2024
e513d0b
added support for force discarding in the sheen shader, to avoid whit…
orels1 Jul 29, 2024
ffc1fa0
fixed a parsing bug for shader compilation errors
orels1 Jul 29, 2024
283e6c7
Specular occlusion changes and fixes
orels1 Jul 29, 2024
02a8334
Details mode now defaults to separated
orels1 Jul 29, 2024
149b887
added support for PostVertex functions in all templates
orels1 Jul 29, 2024
e8fafae
cloud shader update
orels1 Jul 29, 2024
e3d847e
added more things to gitignore
orels1 Jul 29, 2024
cf05da4
6.4.0-dev.8 bump
orels1 Jul 29, 2024
11684b8
changed ordering of properties in the Clouds shader
orels1 Jul 29, 2024
19cb115
preserve gradient mode during copy
lackofbindings Jul 29, 2024
fdfe03e
Merge pull request #79 from lackofbindings/gradient-drawer-fixed
orels1 Jul 31, 2024
8c8ded9
drastically improved clouds vertex normal recalculation by using manu…
orels1 Aug 1, 2024
a989058
added configurable cutoff and changed defaults in Dissolve
orels1 Aug 1, 2024
9719dc9
dev.9 bump
orels1 Aug 1, 2024
697e438
correctly passing all the UV channels
orels1 Aug 3, 2024
1494ccb
changed the default normal precision value
orels1 Aug 3, 2024
9c20c6d
Merge branch 'feature/extra-passes' into dev
orels1 Aug 3, 2024
ecabe08
extra passes now supported by all templates
orels1 Aug 3, 2024
34a4329
dev.10 bump
orels1 Aug 3, 2024
ac9884c
apparently non-windows systems don't like backslashes in zips
orels1 Aug 3, 2024
b5fe6a5
added support for height based gradient to the shaded version of clou…
orels1 Aug 4, 2024
62cb9e3
added tessellated clouds shader
orels1 Aug 4, 2024
3ca2437
major improvements of the hotspotting shader based on feedback
orels1 Aug 8, 2024
3ee6a78
dev.11 bump
orels1 Aug 8, 2024
b7867d8
added a workaround for broken BC7 alpha channel artifacts
orels1 Aug 13, 2024
e3b8f37
added better error messaging for failed block function lookup
orels1 Aug 13, 2024
aab4365
Merge branch 'dev' of github.com:orels1/orels-Unity-Shaders into dev
orels1 Aug 13, 2024
ef7c371
fixed a missing MeshData reference
orels1 Aug 13, 2024
bf6ed14
added BIRP to URP shims
orels1 Aug 26, 2024
4522598
added more utilities to help transitioning to URP-style functions
orels1 Aug 26, 2024
e06df12
Added BirpToURp to the list of default includes
orels1 Aug 26, 2024
448a872
transitioned most things to URP compatible functions
orels1 Aug 26, 2024
1d373e8
added CoreRP + URP packages to the dev project for easier referencing
orels1 Aug 26, 2024
c8abf90
added decalery to gitignore
orels1 Aug 26, 2024
6656588
cleaned up DitherFade leftover code
orels1 Aug 26, 2024
bde3091
Merge pull request #82 from orels1/feature/urp-includes
orels1 Aug 26, 2024
de4d3a3
added configurable shaders divergence checks
orels1 Sep 1, 2024
b312d5b
more configurable shader updates, closes #83
orels1 Sep 1, 2024
7adb163
improved hotspotting features and moved things around
orels1 Sep 1, 2024
bef4842
added Bakery Volume support, closes #48
orels1 Sep 1, 2024
9d725aa
improved visual layout of CombineWith drawer
orels1 Sep 1, 2024
a0fd148
Improved visual layout of Remap Slider
orels1 Sep 1, 2024
75b3071
added a Vector2 Drawer
orels1 Sep 1, 2024
8e4a980
added a reference to the bakery assembly in the inspector (neede for …
orels1 Sep 1, 2024
5d9cef5
bump to dev.12
orels1 Sep 1, 2024
c18a605
fixed color space issues with texture packer when working with mixed …
orels1 Sep 2, 2024
7c2b2d4
ignored arealit
orels1 Oct 9, 2024
5036588
fixed remaining UV prevision issues
orels1 Oct 9, 2024
c336f8c
now specify the included block type on ShaderBlocks
orels1 Oct 9, 2024
602fc70
removed unnecessary usings from the configured shader definition editor
orels1 Oct 9, 2024
c4c1e63
using block types for resolving deps
orels1 Oct 9, 2024
f92a958
improved styles generation and offsets
orels1 Oct 9, 2024
4279640
fixed scrolling in the compiled source inspector
orels1 Oct 9, 2024
8a4c862
added support for checked includes and in-function hook points
orels1 Oct 9, 2024
56b435b
limited keywords only to shader stages they're used in
orels1 Oct 9, 2024
f745669
implemented dynamic Render Types
orels1 Oct 10, 2024
3ee940d
added map baker
orels1 Oct 10, 2024
6059e56
updated PBR shaders inspector and added GSAA normal maps toggle
orels1 Oct 10, 2024
0c53d3e
added toon advanced settings
orels1 Oct 10, 2024
8d03b17
fixed triplanar mapping issues
orels1 Oct 10, 2024
16abb74
fixed parallax uv floating precision issues
orels1 Oct 10, 2024
ff37a15
updated mesh data to point bitangents correctly
orels1 Oct 10, 2024
abf1c87
updated toon min light note style
orels1 Oct 10, 2024
2f6f4f1
added an `isStereoView` util
orels1 Oct 10, 2024
1aa5795
added alpha control to Glitch Screen
orels1 Oct 10, 2024
fad01c1
updated LTCGI to use CheckedInclude and added support for mobile plat…
orels1 Oct 10, 2024
ed655b5
added arealit support
orels1 Oct 10, 2024
83fd3fe
added a simple decals shader
orels1 Oct 10, 2024
12fd0ed
updated dither fade shader
orels1 Oct 10, 2024
84cc538
fixed transparent shader ordering
orels1 Oct 12, 2024
2361ece
bumped all packages to 7.0.0-dev.1
orels1 Oct 12, 2024
1caccb1
added support for VRSL GI
orels1 Oct 13, 2024
026762a
fixed incompatibility issues with Unity 2019
orels1 Oct 14, 2024
a4f3a35
added proper alpha blending and depth blend toggle to Clouds
orels1 Oct 14, 2024
c1e7292
fixed up the GetScreenPosition function
orels1 Oct 14, 2024
05da284
bumpted to dev.3
orels1 Oct 14, 2024
4cd566f
updated to unity .22
orels1 Jan 3, 2025
e38a2bd
bumped package versions
orels1 Jan 3, 2025
a5977cf
added changelog links
orels1 Jan 3, 2025
65c0cc2
fixed precision issues in the lighting calculations on mobile
orels1 Jan 3, 2025
d73398d
fixed wrong variable name in arealit
orels1 Jan 3, 2025
f540113
added bicubic normal map support
orels1 Jan 3, 2025
f633fcf
updated metafiles and bakery volume rotations
orels1 Jan 3, 2025
773470b
added monochrome lighting support
orels1 Jan 3, 2025
d97cbad
added support for extra pre and post passes separately. fixed some is…
orels1 Jan 3, 2025
8858ced
shaders editor assembly now has an optional reference to the inspector
orels1 Feb 8, 2025
52d5b63
fixed emission values being incorrect
orels1 Feb 10, 2025
b02a388
added a basic material upgrader
orels1 Feb 10, 2025
5c0c017
fixed cutout materials not tiling their main texture correctly in the…
orels1 Feb 10, 2025
628708d
unity cruft
orels1 Feb 10, 2025
f74e677
added lighting model markers
orels1 Feb 10, 2025
d7f30b6
added internal support for bakery meta pass
orels1 Feb 10, 2025
dd541bb
added missing post vertex hooks to relevant extra pass templates
orels1 Feb 10, 2025
60e36f7
added pass function hook to all templates
orels1 Feb 10, 2025
a986f6c
added a depth fade module
orels1 Feb 10, 2025
06b9be7
updated arealit to work for VFX-base shaders
orels1 Feb 10, 2025
fe56a13
refactored some bakery functionality to make it more maintanable
orels1 Feb 10, 2025
6a1a68d
fixed base color module not passing alpha correctly
orels1 Feb 10, 2025
1e6ea22
unity cruft
orels1 Feb 10, 2025
525f568
migrated LTCGI module to LTCGI v2 API
orels1 Feb 10, 2025
9b22468
fixed some vertex animation behaviour
orels1 Feb 10, 2025
f892f3d
added VertexColors module
orels1 Feb 10, 2025
2925ee5
VRSLGI can now work in VFX shaders
orels1 Feb 10, 2025
07cbff4
upgraded project dependencies
orels1 Feb 10, 2025
68dd4de
added support for Hook Points in the parser and generator. This enabl…
orels1 Feb 10, 2025
ad05468
added more lighting helpers
orels1 Feb 10, 2025
b5dc33d
adjusted PBR defines and added the lighting model marker
orels1 Feb 10, 2025
67d80aa
added a place for a version marker
orels1 Feb 10, 2025
ea0e398
refactored main lighting function
orels1 Feb 10, 2025
539ce7a
ignored more unwanted directories
orels1 Feb 10, 2025
9cc78c4
removed odin serializer, using pure unity serialization instead
orels1 Feb 10, 2025
d5da327
fixed up filament occlusion calculations
orels1 Feb 11, 2025
6460f1f
adjusted vertex base to use pipeline-compatible functions
orels1 Feb 12, 2025
31b3d8b
added SampleSceneDepthRGDecoded to compatibility layer
orels1 Feb 12, 2025
7189f3a
added SSR module
orels1 Feb 12, 2025
9e24300
added a force render type drawer
orels1 Feb 12, 2025
897a3aa
added EnablePass drawer function
orels1 Feb 12, 2025
c393751
vertex colors module docs link
orels1 Feb 12, 2025
ba2f945
added depth fade module docs link
orels1 Feb 12, 2025
08607d4
hid MapBaker LM from configurable shaders
orels1 Feb 12, 2025
f10dea7
moved dither fade docs
orels1 Feb 12, 2025
d8deac7
added modules list to the shader importer inspector
orels1 Feb 13, 2025
a3318d2
more main importer cleanup
orels1 Feb 13, 2025
108968d
moved to using asset database for shader upgrades
orels1 Feb 24, 2025
552f18a
added Project settings for the shader generator
orels1 Feb 24, 2025
d41600f
added an option to remove bicubic sampling for RTGI lightmaps (this i…
orels1 Feb 24, 2025
69f9ccb
Toon Shader: reflection mode is now a blended prop
orels1 Feb 24, 2025
9059ad3
PBR: refactored realtime lightmap sampling function
orels1 Feb 24, 2025
1bbdd49
Toon: Reflection blend mode is now lerpable
orels1 Feb 24, 2025
db63431
Fix the package name in the readme
orels1 Feb 24, 2025
5e06919
dev.4 bump
orels1 Feb 24, 2025
785bcac
fixed build listing action
orels1 Feb 24, 2025
cd6fbd9
fixed scripted importer issue
orels1 Feb 25, 2025
c8fd689
create directory for the generator settings
orels1 Feb 25, 2025
afb1589
bumped to dev.6
orels1 Feb 25, 2025
fcb74c9
fixed module remaps foldout not expanding correctly
orels1 Feb 25, 2025
a10255d
bumped to dev.7
orels1 Feb 25, 2025
412982d
added Toon shader v2
orels1 Mar 18, 2025
1827057
fixed UV derivative issues in GlitchScreen shader
orels1 Mar 18, 2025
0683f1e
removed unused envData
orels1 Mar 18, 2025
38e5c23
simplified parallax module
orels1 Mar 18, 2025
e6e6015
added support for SV_DEPTH_LEQUAL in PBR shaders
orels1 Mar 18, 2025
269902e
added support for H3 headers
orels1 Mar 18, 2025
1c5b1e1
added separator drawer
orels1 Mar 18, 2025
72bde4c
fixed issues in the render type and gradient drawers
orels1 Mar 18, 2025
fe39828
cleaned up standard shader, added triplanar support
orels1 Mar 18, 2025
9502414
generator and parser fixes and cleanups
orels1 Mar 18, 2025
07cf0a6
dev.8 bump
orels1 Mar 18, 2025
2881bea
re-added vertex light support
orels1 Mar 19, 2025
e972657
dev.9 bump
orels1 Mar 19, 2025
9417895
fixed layered material masking
orels1 Mar 21, 2025
f025992
half2 uv -> float2 uv
orels1 Mar 21, 2025
96bc5a5
dev.10
orels1 Mar 21, 2025
974ccd2
fixed an issue with map baker losing `_MainTex_ST` values
orels1 Mar 23, 2025
f795c58
fixed an issue where configurable shaders would not reorder "custom m…
orels1 Mar 23, 2025
eaa62e5
dev.11 bump
orels1 Mar 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
95 changes: 95 additions & 0 deletions .git-branches.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Git Town configuration file
#
# Run "git town config setup" to add additional entries
# to this file after updating Git Town.
#
# The "push-hook" setting determines whether Git Town
# permits or prevents Git hooks while pushing branches.
# Hooks are enabled by default. If your Git hooks are slow,
# you can disable them to speed up branch syncing.
#
# When disabled, Git Town pushes using the "--no-verify" switch.
# More info at https://www.git-town.com/preferences/push-hook.
push-hook = true

# Should Git Town push the new branches it creates
# immediately to origin even if they are empty?
#
# When enabled, you can run "git push" right away
# but creating new branches is slower and
# it triggers an unnecessary CI run on the empty branch.
#
# When disabled, many Git Town commands execute faster
# and Git Town will create the missing tracking branch
# on the first run of "git sync".
push-new-branches = false

# Should "git ship" delete the tracking branch?
# You want to disable this if your code hosting platform
# (GitHub, GitLab, etc) deletes head branches when
# merging pull requests through its UI.
ship-delete-tracking-branch = true

# Should "git ship" sync branches before shipping them?
#
# Guidance: enable when shipping branches locally on your machine
# and disable when shipping feature branches via the code hosting
# API or web UI.
#
# When enabled, branches are always fully up to date when shipped
# and you get a chance to resolve merge conflicts
# between the feature branch to ship and the main development branch
# on the feature branch. This helps keep the main branch green.
# But this also triggers another CI run and delays shipping.
sync-before-ship = true

# Should "git sync" also fetch updates from the upstream remote?
#
# If an "upstream" remote exists, and this setting is enabled,
# "git sync" will also update the local main branch
# with commits from the main branch at the upstream remote.
#
# This is useful if the repository you work on is a fork,
# and you want to keep it in sync with the repo it was forked from.
sync-upstream = false

[branches]

# The main branch is the branch from which you cut new feature branches,
# and into which you ship feature branches when they are done.
# This branch is often called "main", "master", or "development".
main = "dev"

# Perennial branches are long-lived branches.
# They are never shipped and have no ancestors.
# Typically, perennial branches have names like
# "development", "staging", "qa", "production", etc.
perennials = ["main"]

[hosting]

# Knowing the type of code hosting platform allows Git Town
# to open browser URLs and talk to the code hosting API.
# Most people can leave this on "auto-detect".
# Only change this if your code hosting server uses as custom URL.
platform = "github"

# When using SSH identities, define the hostname
# of your source code repository. Only change this
# if the auto-detection does not work for you.
# origin-hostname = ""

[sync-strategy]

# How should Git Town synchronize feature branches?
# Feature branches are short-lived branches cut from
# the main branch and shipped back into the main branch.
# Typically you develop features and bug fixes on them,
# hence their name.
feature-branches = "rebase"

# How should Git Town synchronize perennial branches?
# Perennial branches have no parent branch.
# The only updates they receive are additional commits
# made to their tracking branch somewhere else.
perennial-branches = "merge"
12 changes: 6 additions & 6 deletions .github/workflows/build-listing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3 # check out this repo
- uses: actions/checkout@v3 # check out automation repo
- uses: actions/checkout@v4 # check out this repo
- uses: actions/checkout@v4 # check out automation repo
with:
repository: vrchat-community/package-list-action
path: ${{env.pathToCi}}
clean: false # otherwise the local repo will no longer be checked out

- name: Restore Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{env.pathToCi}}/.nuke/temp
Expand All @@ -49,13 +49,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ${{env.listPublishDirectory}}

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
39 changes: 38 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Assets/Develop
Assets/Develop.meta
Assets/Bakery
Assets/Bakery.meta
Assets/Decalery
Assets/Decalery.meta
Assets/BakeryLightmaps
Assets/BakeryLightmaps.meta
Assets/Editor.meta
Expand Down Expand Up @@ -97,4 +99,39 @@ Packages/sh.orels.shaders.inspector/Editor/MaterialLibraries/Resources/**/*.json
/Assets/Gizmos
/Assets/Gizmos.meta
/Assets/LTCGI-Generated
/Assets/LTCGI-Generated.meta
/Assets/LTCGI-Generated.meta
/Assets/csc.rsp
/Assets/csc.rsp.meta
/Assets/_PoiyomiShaders
/Assets/_PoiyomiShaders.meta
/Thry
/Exports

/Assets/Samples
/Assets/Samples.meta

/UserSettings/**/*
UserSettings/Layouts/default-2022.dwlt
UserSettings/EditorUserSettings.asset
UserSettings/Search.settings
Assets/TextMesh Pro
Assets/TextMesh Pro.meta
Assets/XR
Assets/XR.meta
Assets/AmplifyShaderEditor
Assets/AmplifyShaderEditor.meta
/bakery-*
Assets/XSToon3
Assets/XSToon3.meta
Assets/AreaLit
Assets/AreaLit.meta
Assets/VRSL Addons
Assets/VRSL Addons.meta
Assets/Umodeler-Hub
Assets/Umodeler-Hub.meta
Assets/UniversalRenderPipelineGlobalSettings.asset
Assets/UniversalRenderPipelineGlobalSettings.asset.meta
ProjectSettings/UModeler-Hub.json

Assets/Mochie
Assets/Mochie.meta
137 changes: 105 additions & 32 deletions Assets/Tools/Editor/ReleaseExporter.cs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
using System.IO;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using UnityEditor;
using UnityEngine;
using VRC.PackageManagement.Core.Types.Packages;
using Debug = UnityEngine.Debug;

namespace ORL.Tools
{
Expand All @@ -14,46 +19,114 @@ public static class ReleaseExporter
"Packages/sh.orels.shaders.generator",
};

[Serializable]
public class PackageInfo
{
public string name;
public string displayName;
public string version;
}

[MenuItem("Tools/orels1/Export Release")]
private static void ExportAsUnityPackage ()
private static void ExportAsUnityPackage()
{
var manifestPath = Path.Combine(_exportFolders[0], VRCPackageManifest.Filename);
var manifest = VRCPackageManifest.GetManifestAtPath(manifestPath);
var manifestPath = Path.Combine(_exportFolders[0], "package.json");
var manifest = JsonUtility.FromJson<PackageInfo>(File.ReadAllText(manifestPath));
if (manifest == null)
{
Debug.LogError("Failed to load main package manifest to extract version, aborting");
return;
}

// Get a list of new files from git
var processInfo = new ProcessStartInfo("git", "status -s")
{
WorkingDirectory = new FileInfo(".").FullName,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true
};
var gitProc = Process.Start(processInfo);
gitProc.WaitForExit();
if (gitProc.ExitCode != 0)
{
Debug.LogError("Failed to get git status, aborting");
return;
}
var ignored = new List<string>();
while (!gitProc.StandardOutput.EndOfStream)
{
var line = gitProc.StandardOutput.ReadLine();
if (line.StartsWith("??"))
{
ignored.Add(line.Substring(2).Trim().Replace('/', '\\'));
}
}

Debug.Log($"Exporting version {manifest.version}");

var exportDir = Path.Combine(Directory.GetCurrentDirectory(), "Exports");
Directory.CreateDirectory(exportDir);
AssetDatabase.ExportPackage
(
_exportFolders,
Path.Combine(exportDir, $"orl-shaders-combined-{manifest.Version}.unitypackage"),
ExportPackageOptions.Recurse | ExportPackageOptions.Interactive
);

AssetDatabase.ExportPackage
(
_exportFolders[0],
Path.Combine(exportDir, $"sh.orels.shaders-standalone-{manifest.Version}.unitypackage"),
ExportPackageOptions.Recurse | ExportPackageOptions.Interactive
);

AssetDatabase.ExportPackage
(
_exportFolders[1],
Path.Combine(exportDir, $"sh.orels.shaders.inspector-standalone-{manifest.Version}.unitypackage"),
ExportPackageOptions.Recurse | ExportPackageOptions.Interactive
);

AssetDatabase.ExportPackage
(
_exportFolders[2],
Path.Combine(exportDir, $"sh.orels.shaders.generator-standalone-{manifest.Version}.unitypackage"),
ExportPackageOptions.Recurse | ExportPackageOptions.Interactive
);

// Export .unitypackage files
ExportAsUnityPackage(_exportFolders, ignored, Path.Combine(exportDir, $"sh.orels.shaders-combined-{manifest.version}.unitypackage"));
ExportAsUnityPackage(_exportFolders[0], ignored, Path.Combine(exportDir, $"sh.orels.shaders-standalone-{manifest.version}.unitypackage"));
ExportAsUnityPackage(_exportFolders[1], ignored, Path.Combine(exportDir, $"sh.orels.shaders.inspector-standalone-{manifest.version}.unitypackage"));
ExportAsUnityPackage(_exportFolders[2], ignored, Path.Combine(exportDir, $"sh.orels.shaders.generator-standalone-{manifest.version}.unitypackage"));

// Export .zip files
ExportAsZip(_exportFolders[0], ignored, Path.Combine(exportDir, $"sh.orels.shaders-{manifest.version}.zip"));
ExportAsZip(_exportFolders[1], ignored, Path.Combine(exportDir, $"sh.orels.shaders.inspector-{manifest.version}.zip"));
ExportAsZip(_exportFolders[2], ignored, Path.Combine(exportDir, $"sh.orels.shaders.generator-{manifest.version}.zip"));

// Open the export folder
var exportedPath = new FileInfo("Exports").FullName;
Process.Start(exportedPath);
}

private static void ExportAsUnityPackage(string[] baseFolders, List<string> ingored, string exportPath)
{
var list = baseFolders.SelectMany(f => Directory.GetFiles(f, "*", SearchOption.AllDirectories))
.Select(f => f.Replace('/', '\\'))
.Where(f => !ingored.Any(i => f.Contains(i, StringComparison.InvariantCultureIgnoreCase)))
.ToArray();

Debug.Log("Packages\\sh.orels.shaders\\Editor\\Dependencies\\ORLLayoutToolkit.cs".Contains("Packages\\sh.orels.shaders\\Editor\\Dependencies\\"));
AssetDatabase.ExportPackage(list, exportPath, ExportPackageOptions.Recurse);
}

private static void ExportAsUnityPackage(string baseFolder, List<string> ingored, string exportPath)
{
var list = Directory.GetFiles(baseFolder, "*", SearchOption.AllDirectories)
.Select(f => f.Replace('/', '\\'))
.Where(f => !ingored.Any(i => f.Contains(i, StringComparison.InvariantCultureIgnoreCase)))
.ToArray();
AssetDatabase.ExportPackage(list, exportPath, ExportPackageOptions.Recurse);
}

private static void ExportAsZip(string baseFolder, List<string> ingored, string exportPath)
{
var list = Directory.GetFiles(baseFolder, "*", SearchOption.AllDirectories)
.Select(f => f.Replace('/', '\\'))
.Where(f => !ingored.Any(i => f.Contains(i, StringComparison.InvariantCultureIgnoreCase)))
.ToArray();

if (File.Exists(exportPath)) File.Delete(exportPath);
var basePath = baseFolder.Replace('/', '\\') + '\\';
using (var zip = new ZipArchive(File.OpenWrite(exportPath), ZipArchiveMode.Create))
{
foreach (var file in list)
{
var entry = zip.CreateEntry(file.Replace(basePath, "").Replace('\\', '/'));
using (var stream = File.OpenRead(file))
{
using (var entryStream = entry.Open())
{
stream.CopyTo(entryStream);
}
}
}
}
}
}
}
5 changes: 3 additions & 2 deletions Packages/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*/
!com.vrchat.core.*

!com.vrchat.core.vpm-resolver
!sh.orels.shaders.generator
!sh.orels.shaders.inspector
!sh.orels.shaders
!sh.orels.shaders
!com.vrchat.core.*/
Loading