feat: Add Poiyomi Shaders, including various textures, scripts, and editor files, along with Quiz assets and Udon programs.
This commit is contained in:
32
Assets/_PoiyomiShaders/CONTRIBUTING.md
Normal file
32
Assets/_PoiyomiShaders/CONTRIBUTING.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Contributing to Poiyomi Shaders
|
||||
|
||||
## Git Configuration for Line Endings
|
||||
|
||||
To prevent line ending issues when contributing to this project, please configure your git settings properly:
|
||||
|
||||
### For Windows Users
|
||||
Run this command to ensure proper line ending handling:
|
||||
```bash
|
||||
git config core.autocrlf true
|
||||
```
|
||||
|
||||
This ensures that:
|
||||
- Files are checked out with Windows line endings (CRLF) for local editing
|
||||
- Files are committed with Unix line endings (LF) to maintain repository consistency
|
||||
|
||||
### For Mac/Linux Users
|
||||
Run this command:
|
||||
```bash
|
||||
git config core.autocrlf input
|
||||
```
|
||||
|
||||
This ensures that:
|
||||
- Files keep Unix line endings (LF) locally
|
||||
- Any accidental CRLF line endings are converted to LF on commit
|
||||
|
||||
### Why This Matters
|
||||
- Prevents unnecessary diffs caused by line ending changes
|
||||
- Ensures consistency across different operating systems
|
||||
- Keeps the repository clean and merge conflicts minimal
|
||||
|
||||
The `.gitattributes` file in this repository enforces LF line endings for all text files in the repository, regardless of your local system.
|
||||
7
Assets/_PoiyomiShaders/CONTRIBUTING.md.meta
Normal file
7
Assets/_PoiyomiShaders/CONTRIBUTING.md.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d92a7c21afdd33a48bdf3000359b1786
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
33
Assets/_PoiyomiShaders/LICENSE
Normal file
33
Assets/_PoiyomiShaders/LICENSE
Normal file
@@ -0,0 +1,33 @@
|
||||
# Poiyomi Pro End-User License Agreement (EULA)
|
||||
|
||||
**Version 1.0**
|
||||
**Effective Date: June 01, 2025**
|
||||
|
||||
This End-User License Agreement ("EULA") is a legal agreement between you (the "Licensee") and Poiyomi Labs (the "Licensor"), the copyright holder of Poiyomi Pro software (the "Software"). By downloading, installing, or using the Software, you agree to be bound by the terms of this EULA. If you do not agree to these terms, do not download, install, or use the Software.
|
||||
|
||||
## Grant of License
|
||||
Subject to your compliance with the terms of this EULA, the Licensor grants you a non-exclusive, non-transferable, perpetual license to use the Software for personal or commercial purposes, including the creation and publication of virtual worlds, avatars, or other content that incorporates the Software.
|
||||
|
||||
## Attribution
|
||||
Attribution to the Licensor or the Software is optional. You may choose to include credit (e.g., "Uses Poiyomi Pro by Poiyomi Labs") in your projects or documentation, but it is not required.
|
||||
|
||||
## Restrictions
|
||||
- **Redistribution Prohibited**: You may not redistribute, sell, lease, rent, sublicense, or otherwise distribute the Software, whether in its original form or as modified, to any third party. This includes sharing the Software files, even if altered, combined with other materials, or embedded in derivative works except as explicitly permitted under Grant of License.
|
||||
- **Modifications**: While you may modify the Software for your own use in accordance with Grant of License, any such modifications do not grant you the right to redistribute the modified Software.
|
||||
- **Reverse Engineering**: You may not reverse engineer, decompile, disassemble, or attempt to derive the source code of the Software, except to the extent permitted by applicable law.
|
||||
|
||||
## Permitted Uses
|
||||
You are expressly permitted to publish, upload, or distribute virtual worlds, avatars, or other content that incorporates or utilizes the Software, provided that the Software itself is not redistributed in a manner that allows others to extract or use it independently.
|
||||
|
||||
## Disclaimer of Warranty
|
||||
The Software is provided "AS IS" without any warranties of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, non-infringement, or that the Software will be error-free or uninterrupted. The Licensor does not warrant that the Software will meet your requirements or that its use will be secure or reliable.
|
||||
|
||||
## Limitation of Liability
|
||||
To the fullest extent permitted by applicable law, the Licensor shall not be liable for any direct, indirect, incidental, special, consequential, or punitive damages arising out of or related to the use or inability to use the Software, even if advised of the possibility of such damages. This includes, but is not limited to, any problems, losses, or liabilities resulting from the handling, modification, or integration of the Software into your projects.
|
||||
|
||||
## Entire Agreement
|
||||
This EULA constitutes the entire agreement between you and the Licensor regarding the Software and supersedes any prior agreements. If any provision of this EULA is held invalid, the remainder shall continue in full force and effect.
|
||||
|
||||
**Copyright © 2025 Poiyomi Labs. All rights reserved.**
|
||||
|
||||
By using the Software, you acknowledge that you have read, understood, and agree to this EULA. For questions, join the Poiyomi Discord at discord.gg/poiyomi.
|
||||
7
Assets/_PoiyomiShaders/LICENSE.meta
Normal file
7
Assets/_PoiyomiShaders/LICENSE.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f7197d3d2a03754c9f60b78fb49d0bc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/_PoiyomiShaders/ModularShader.meta
Normal file
8
Assets/_PoiyomiShaders/ModularShader.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 724a9cd6d562cf645b84be676a878cf7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/_PoiyomiShaders/ModularShader/Editor.meta
Normal file
8
Assets/_PoiyomiShaders/ModularShader/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09d07bc95aa5c5e4f88d3b1d6e4529b5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 03c172d6a1e743b59108df4a85a6766d, type: 3}
|
||||
m_Name: ModuleCollectionFree
|
||||
m_EditorClassIdentifier:
|
||||
Id: ModuleCollectionFree
|
||||
Name: ModuleCollection Free
|
||||
Version:
|
||||
Author:
|
||||
Description:
|
||||
AllowDuplicates: 0
|
||||
ForceDuplicateLogic: 0
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates: []
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
Modules:
|
||||
- {fileID: 11400000, guid: 53fd1e815b3256844adbf6f294bcc534, type: 2}
|
||||
- {fileID: 11400000, guid: a500e18ef22aa3f438fb7f1a4b34ac5f, type: 2}
|
||||
- {fileID: 11400000, guid: b31e45db8cd95d14da3f7883f0c503bf, type: 2}
|
||||
- {fileID: 11400000, guid: 5b74769abf3a4f840970029f5136c298, type: 2}
|
||||
- {fileID: 11400000, guid: eca31a3b9b86b4b4d8ff5cff9f135f36, type: 2}
|
||||
- {fileID: 11400000, guid: 9517bd1cad1457744acd511156823aff, type: 2}
|
||||
- {fileID: 11400000, guid: 043008fa06fb38b4992021bf79cbf726, type: 2}
|
||||
- {fileID: 11400000, guid: 87ca4a92adfc6d24f8f9bef432acf14a, type: 2}
|
||||
- {fileID: 11400000, guid: 2bc9a6f3110c97941a79c0f76a712bae, type: 2}
|
||||
- {fileID: 11400000, guid: 883f6564ee1d11544ab7c82b2438e3d5, type: 2}
|
||||
- {fileID: 11400000, guid: 026aae78de33b444185dc631aad07608, type: 2}
|
||||
- {fileID: 11400000, guid: 24577e7ddd2003a4dad2c8994d4d66a2, type: 2}
|
||||
- {fileID: 11400000, guid: 3ee97f22176dc0b468053938196a9b0e, type: 2}
|
||||
- {fileID: 11400000, guid: 4ee7e9ca2445a9943818297c16031dc3, type: 2}
|
||||
- {fileID: 11400000, guid: 2b39ca163cdc5544793d775714022874, type: 2}
|
||||
- {fileID: 11400000, guid: 4a4ba4e31a5f2294289339f643c597ec, type: 2}
|
||||
- {fileID: 11400000, guid: 1e5f5acfca7186c42ad0956d45397b4f, type: 2}
|
||||
- {fileID: 11400000, guid: 5d4c7f67c175e0f4ea39ab2469736a5f, type: 2}
|
||||
- {fileID: 11400000, guid: bc1e9f74ebdbaaf439f73301d59c16aa, type: 2}
|
||||
- {fileID: 11400000, guid: a8fd22f54e96edd478df063aebadd55f, type: 2}
|
||||
- {fileID: 11400000, guid: 15d0dbfc16740a6458f40abedce1e247, type: 2}
|
||||
- {fileID: 11400000, guid: 7c64362992ed75347a83d003eed92e0f, type: 2}
|
||||
- {fileID: 11400000, guid: 7a72b1acd760c1848b31ff719e6d6e6d, type: 2}
|
||||
- {fileID: 11400000, guid: 3f43a4e8f8b031949b76535ca295e1c2, type: 2}
|
||||
- {fileID: 11400000, guid: b7107bd37b2093f499c145a305820813, type: 2}
|
||||
- {fileID: 11400000, guid: 383407afc98e84c41ab2156f362de87c, type: 2}
|
||||
- {fileID: 11400000, guid: ba8ca7621544dc74f813f9664afd8b7e, type: 2}
|
||||
- {fileID: 11400000, guid: fa6a8182af062384f8a7269b3b977701, type: 2}
|
||||
- {fileID: 11400000, guid: 13aeab2df0d8ca648a80161f45bd33e7, type: 2}
|
||||
- {fileID: 11400000, guid: 13aeab2df0d8ca648a80161f45bd33e7, type: 2}
|
||||
- {fileID: 11400000, guid: 13aeab2df0d8ca648a80161f45bd33e7, type: 2}
|
||||
- {fileID: 11400000, guid: 13aeab2df0d8ca648a80161f45bd33e7, type: 2}
|
||||
- {fileID: 11400000, guid: cc0df58e896264c4ba4596bdcbe5bc4f, type: 2}
|
||||
- {fileID: 11400000, guid: f89d06203af8e16489bd8bc5a48643f4, type: 2}
|
||||
- {fileID: 11400000, guid: 4064ea730840a5d478e92b13b02cc0aa, type: 2}
|
||||
- {fileID: 11400000, guid: c4fdd443c7b16f54e8a16680c09d467c, type: 2}
|
||||
- {fileID: 11400000, guid: c023dffc58a8dce41948529003e1d1e6, type: 2}
|
||||
- {fileID: 11400000, guid: 323595f0f7b6edf4cb15bb2efb502b1e, type: 2}
|
||||
- {fileID: 11400000, guid: 5f9bd413584522542a784451a29f24e8, type: 2}
|
||||
- {fileID: 11400000, guid: 72833ee6f6673a74591288f51c29a1a5, type: 2}
|
||||
- {fileID: 11400000, guid: c32b683e3283a8b4f988b0e9a73227d4, type: 2}
|
||||
- {fileID: 11400000, guid: c5fe86ecf8c4b374fa356e6fa5b843f7, type: 2}
|
||||
- {fileID: 11400000, guid: fb4c0730864e62847b82733d27c68e77, type: 2}
|
||||
- {fileID: 11400000, guid: 30935ff7d770ce64089fad5d256845d2, type: 2}
|
||||
- {fileID: 11400000, guid: 22a2f2c5201a35a4b8de4655a6b2a49e, type: 2}
|
||||
- {fileID: 11400000, guid: 9474e8294d5143c41943a89f4bda71fd, type: 2}
|
||||
- {fileID: 11400000, guid: 38117acd601e0a04f8526bda9342b594, type: 2}
|
||||
- {fileID: 11400000, guid: 0d6b81a017d50284b9874a8d5da6e81f, type: 2}
|
||||
- {fileID: 11400000, guid: 39a772a68824e5842955ec40afcb7e79, type: 2}
|
||||
- {fileID: 11400000, guid: eef7be30d866ea6488f9d1a3ea96ab7d, type: 2}
|
||||
- {fileID: 11400000, guid: a91ad61d74db3d4469cade1646abcad6, type: 2}
|
||||
- {fileID: 11400000, guid: 2ca66876a62414e43b9b15693a23537e, type: 2}
|
||||
- {fileID: 11400000, guid: c4fd319e47cec1c45a221ca15c8291fe, type: 2}
|
||||
- {fileID: 11400000, guid: 9f5d5c06a71a8854087b064c54928fb6, type: 2}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 496d9ada176c1a64c8d6e75b0ae824c1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,75 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 03c172d6a1e743b59108df4a85a6766d, type: 3}
|
||||
m_Name: ModuleCollectionFreeCustomEdited
|
||||
m_EditorClassIdentifier:
|
||||
Id: ModuleCollectionFreeCustomEdited
|
||||
Name:
|
||||
Version:
|
||||
Author:
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates: []
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
Modules:
|
||||
- {fileID: 11400000, guid: a500e18ef22aa3f438fb7f1a4b34ac5f, type: 2}
|
||||
- {fileID: 11400000, guid: 53fd1e815b3256844adbf6f294bcc534, type: 2}
|
||||
- {fileID: 11400000, guid: b31e45db8cd95d14da3f7883f0c503bf, type: 2}
|
||||
- {fileID: 11400000, guid: 5b74769abf3a4f840970029f5136c298, type: 2}
|
||||
- {fileID: 11400000, guid: 9517bd1cad1457744acd511156823aff, type: 2}
|
||||
- {fileID: 11400000, guid: eca31a3b9b86b4b4d8ff5cff9f135f36, type: 2}
|
||||
- {fileID: 11400000, guid: 043008fa06fb38b4992021bf79cbf726, type: 2}
|
||||
- {fileID: 11400000, guid: 87ca4a92adfc6d24f8f9bef432acf14a, type: 2}
|
||||
- {fileID: 11400000, guid: 2bc9a6f3110c97941a79c0f76a712bae, type: 2}
|
||||
- {fileID: 11400000, guid: 883f6564ee1d11544ab7c82b2438e3d5, type: 2}
|
||||
- {fileID: 11400000, guid: 026aae78de33b444185dc631aad07608, type: 2}
|
||||
- {fileID: 11400000, guid: 24577e7ddd2003a4dad2c8994d4d66a2, type: 2}
|
||||
- {fileID: 11400000, guid: 4ee7e9ca2445a9943818297c16031dc3, type: 2}
|
||||
- {fileID: 11400000, guid: 2b39ca163cdc5544793d775714022874, type: 2}
|
||||
- {fileID: 11400000, guid: 4a4ba4e31a5f2294289339f643c597ec, type: 2}
|
||||
- {fileID: 11400000, guid: 1e5f5acfca7186c42ad0956d45397b4f, type: 2}
|
||||
- {fileID: 11400000, guid: 5d4c7f67c175e0f4ea39ab2469736a5f, type: 2}
|
||||
- {fileID: 11400000, guid: bc1e9f74ebdbaaf439f73301d59c16aa, type: 2}
|
||||
- {fileID: 11400000, guid: a8fd22f54e96edd478df063aebadd55f, type: 2}
|
||||
- {fileID: 11400000, guid: 15d0dbfc16740a6458f40abedce1e247, type: 2}
|
||||
- {fileID: 11400000, guid: 7c64362992ed75347a83d003eed92e0f, type: 2}
|
||||
- {fileID: 11400000, guid: 7a72b1acd760c1848b31ff719e6d6e6d, type: 2}
|
||||
- {fileID: 11400000, guid: 3f43a4e8f8b031949b76535ca295e1c2, type: 2}
|
||||
- {fileID: 11400000, guid: b7107bd37b2093f499c145a305820813, type: 2}
|
||||
- {fileID: 11400000, guid: 383407afc98e84c41ab2156f362de87c, type: 2}
|
||||
- {fileID: 11400000, guid: ba8ca7621544dc74f813f9664afd8b7e, type: 2}
|
||||
- {fileID: 11400000, guid: fa6a8182af062384f8a7269b3b977701, type: 2}
|
||||
- {fileID: 11400000, guid: 13aeab2df0d8ca648a80161f45bd33e7, type: 2}
|
||||
- {fileID: 11400000, guid: cc0df58e896264c4ba4596bdcbe5bc4f, type: 2}
|
||||
- {fileID: 11400000, guid: f89d06203af8e16489bd8bc5a48643f4, type: 2}
|
||||
- {fileID: 11400000, guid: 4064ea730840a5d478e92b13b02cc0aa, type: 2}
|
||||
- {fileID: 11400000, guid: c4fdd443c7b16f54e8a16680c09d467c, type: 2}
|
||||
- {fileID: 11400000, guid: c023dffc58a8dce41948529003e1d1e6, type: 2}
|
||||
- {fileID: 11400000, guid: 323595f0f7b6edf4cb15bb2efb502b1e, type: 2}
|
||||
- {fileID: 11400000, guid: 5f9bd413584522542a784451a29f24e8, type: 2}
|
||||
- {fileID: 11400000, guid: 72833ee6f6673a74591288f51c29a1a5, type: 2}
|
||||
- {fileID: 11400000, guid: c32b683e3283a8b4f988b0e9a73227d4, type: 2}
|
||||
- {fileID: 11400000, guid: c5fe86ecf8c4b374fa356e6fa5b843f7, type: 2}
|
||||
- {fileID: 11400000, guid: fb4c0730864e62847b82733d27c68e77, type: 2}
|
||||
- {fileID: 11400000, guid: 30935ff7d770ce64089fad5d256845d2, type: 2}
|
||||
- {fileID: 11400000, guid: 22a2f2c5201a35a4b8de4655a6b2a49e, type: 2}
|
||||
- {fileID: 11400000, guid: 9474e8294d5143c41943a89f4bda71fd, type: 2}
|
||||
- {fileID: 11400000, guid: 38117acd601e0a04f8526bda9342b594, type: 2}
|
||||
- {fileID: 11400000, guid: 0d6b81a017d50284b9874a8d5da6e81f, type: 2}
|
||||
- {fileID: 11400000, guid: 39a772a68824e5842955ec40afcb7e79, type: 2}
|
||||
- {fileID: 11400000, guid: eef7be30d866ea6488f9d1a3ea96ab7d, type: 2}
|
||||
- {fileID: 11400000, guid: a91ad61d74db3d4469cade1646abcad6, type: 2}
|
||||
- {fileID: 11400000, guid: 2ca66876a62414e43b9b15693a23537e, type: 2}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fe7a387cca1ca14f9d06353367a3ca8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,32 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 03c172d6a1e743b59108df4a85a6766d, type: 3}
|
||||
m_Name: ModuleCollectionPro
|
||||
m_EditorClassIdentifier:
|
||||
Id: ModuleCollectionPro
|
||||
Name: ModuleCollection Pro
|
||||
Version:
|
||||
Author:
|
||||
Description:
|
||||
AllowDuplicates: 0
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates: []
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
Modules:
|
||||
- {fileID: 11400000, guid: 496d9ada176c1a64c8d6e75b0ae824c1, type: 2}
|
||||
- {fileID: 11400000, guid: a8152447af40b054295374dccceefe72, type: 2}
|
||||
- {fileID: 11400000, guid: e5ae0185c825d94429015d9bd4b67352, type: 2}
|
||||
- {fileID: 11400000, guid: 0862acd689c6edb4f998fed9e8007969, type: 2}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad791073d336f844e99f50c99b1c8641
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,33 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 03c172d6a1e743b59108df4a85a6766d, type: 3}
|
||||
m_Name: ModuleCollectionProCustomEdited
|
||||
m_EditorClassIdentifier:
|
||||
Id: ModuleCollectionProCustomEdited
|
||||
Name:
|
||||
Version:
|
||||
Author:
|
||||
Description:
|
||||
AllowDuplicates: 0
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates: []
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
Modules:
|
||||
- {fileID: 11400000, guid: 5fe7a387cca1ca14f9d06353367a3ca8, type: 2}
|
||||
- {fileID: 11400000, guid: a8152447af40b054295374dccceefe72, type: 2}
|
||||
- {fileID: 11400000, guid: e5ae0185c825d94429015d9bd4b67352, type: 2}
|
||||
- {fileID: 11400000, guid: c4fd319e47cec1c45a221ca15c8291fe, type: 2}
|
||||
- {fileID: 11400000, guid: 0862acd689c6edb4f998fed9e8007969, type: 2}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15db1386f7be27048897f020be4796df
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 725562e23e5f1ad45b625de09fd8a5bd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 386150abf0c2cc14ab663c90ebf85c95
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8b923a20e7942c48b6c8f65145c6c02
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,80 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiALDecals
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiALDecal
|
||||
Name: PoiALDecal
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
Enabled:
|
||||
Name:
|
||||
DisplayName:
|
||||
Type:
|
||||
DefaultValue:
|
||||
DefaultTextureAsset: {fileID: 0}
|
||||
Attributes: []
|
||||
EnableValue: 0
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: -1600654798350694673, guid: 70efb560537f5b545813faaf4d6f8428,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- AUDIOLINK_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -4820396145866010957, guid: 70efb560537f5b545813faaf4d6f8428,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- DEPTHNORMAL_PASS_KEYWORDS
|
||||
- OUTLINE_PASS_KEYWORDS
|
||||
- EARLYZ_PASS_KEYWORDS
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
- SHADOW_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 522983997937746048, guid: 70efb560537f5b545813faaf4d6f8428,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- SHADOW_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
- OUTLINE_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 1333774844789713128, guid: 70efb560537f5b545813faaf4d6f8428,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
- FRAGMENT_SHADOW_FUNCTIONS
|
||||
- FRAGMENT_OUTLINE_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 7476105749771648410, guid: 70efb560537f5b545813faaf4d6f8428,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_COLOR
|
||||
- FRAGMENT_ADD_COLOR
|
||||
- FRAGMENT_SHADOW_COLOR
|
||||
- FRAGMENT_OUTLINE_COLOR
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 383407afc98e84c41ab2156f362de87c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,241 @@
|
||||
#T#PoiALDecalsProperties
|
||||
//ifex _EnableALDecal==0
|
||||
[HideInInspector] m_start_ALDecalSpectrum (" AL ♫ Spectrum--{ reference_property:_EnableALDecal, button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/audio-link/spectrum},hover:Documentation}}", Float) = 0
|
||||
[HideInInspector][ThryToggle(POI_AL_DECAL)]_EnableALDecal ("Enable AL Decal", Float) = 0
|
||||
[HideInInspector][ThryWideEnum(lil Spectrum, 0)] _ALDecalType ("AL Type--{ condition_showS:_EnableAudioLink==1}", Int) = 0
|
||||
|
||||
[Enum(Normal, 0, Circle, 1)] _ALDecalUVMode ("UV Mode", Float) = 0
|
||||
[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos, 5, Local Pos, 8, Polar UV, 6, Distorted UV, 7, Matcap, 9)] _ALDecalUV ("UV", Int) = 0
|
||||
[Vector2]_ALUVPosition ("Position", Vector) = (.5, .5, 1)
|
||||
_ALUVScale ("Scale", Vector) = (1, 1, 1, 1)
|
||||
_ALUVRotation ("Rotation", Range(0, 360)) = 0
|
||||
_ALUVRotationSpeed ("Rotation Speed", Float) = 0
|
||||
_ALDecalLineWidth ("Line Width", Range(0, 1)) = 1.0
|
||||
_ALDecaldCircleDimensions ("Cirlce Dimensions--{ condition_showS:_ALDecalUVMode==1}", Vector) = (0, 1, 0, 1)
|
||||
|
||||
[HideInInspector] s_start_ALDecalVolumeOptions ("Volume--{persistent_expand:true,default_expand:true}", Float) = 1
|
||||
_ALDecalVolumeStep ("Volume Step Num (0 = Off)", Float) = 0.0
|
||||
_ALDecalVolumeClipMin ("Volume Clip Min", Range(0, 1)) = 0.0
|
||||
_ALDecalVolumeClipMax ("Volume Clip Max", Range(0, 1)) = 1.0
|
||||
[HideInInspector] s_end_ALDecalVolumeOptions ("Volume", Float) = 0
|
||||
|
||||
[HideInInspector] s_start_ALDecalBandOptions ("Band--{persistent_expand:true,default_expand:true}", Float) = 1
|
||||
_ALDecalBandStep ("Band Step Num (0 = Off)", Float) = 0.0
|
||||
_ALDecalBandClipMin ("Band Clip Min", Range(0, 1)) = 0.0
|
||||
_ALDecalBandClipMax ("Band Clip Max", Range(0, 1)) = 1.0
|
||||
[HideInInspector] s_end_ALDecalBand ("Band", Float) = 0
|
||||
|
||||
[HideInInspector] s_start_ALDecalShapeClipOptions ("Shape Clip--{reference_property:_ALDecalShapeClip,persistent_expand:true,default_expand:true}", Float) = 1
|
||||
[HideInInspector][ThryToggleUI(true)]_ALDecalShapeClip ("<size=13><b> Shape Clip</b></size>", Float) = 0
|
||||
_ALDecalShapeClipVolumeWidth ("Volume Width", Range(0, 1)) = 0.5
|
||||
_ALDecalShapeClipBandWidth ("Band Width", Range(0, 1)) = 0.5
|
||||
[HideInInspector] s_end_ALDecalShapeClipOptions ("Shape Clip", Float) = 0
|
||||
|
||||
[HideInInspector] s_start_ALDecalAudioModsOptions ("Audio Mods--{persistent_expand:true,default_expand:true}", Float) = 1
|
||||
_ALDecalVolume ("Volume", Int) = 0.5
|
||||
_ALDecalBaseBoost ("Bass Boost", Float) = 5.0
|
||||
_ALDecalTrebleBoost ("Treble Boost", Float) = 1.0
|
||||
[HideInInspector] s_end_ALDecalAudioModsOptions ("Audio Mods", Float) = 0
|
||||
|
||||
[HideInInspector] s_start_ALDecalColorsBlendingOptions ("Colors and Blending--{persistent_expand:true,default_expand:true}", Float) = 1
|
||||
[sRGBWarning(true)][ThryRGBAPacker(RGB Color, A Mask, sRGB, false)]_ALDecalColorMask ("Color & Mask--{reference_properties:[_ALDecalColorMaskPan, _ALDecalColorMaskUV]}", 2D) = "white" { }
|
||||
[HideInInspector][Vector2]_ALDecalColorMaskPan ("Panning", Vector) = (0, 0, 0, 0)
|
||||
[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos, 5, Local Pos, 8, Polar UV, 6, Distorted UV, 7, Matcap, 9)] _ALDecalColorMaskUV ("UV", Int) = 0
|
||||
[Enum(UVX, 0, UVY, 1, Volume, 2)] _ALDecalVolumeColorSource ("Source", Int) = 1
|
||||
_ALDecalVolumeColorLow ("Volume Color Low--{reference_property:_ALDecalVolumeColorLowThemeIndex}", Color) = (0, 0, 1)
|
||||
[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ALDecalVolumeColorLowThemeIndex ("", Int) = 0
|
||||
_ALDecalLowEmission ("Low Emission", Range(0, 20)) = 0
|
||||
_ALDecalVolumeColorMid ("Volume Color Mid--{reference_property:_ALDecalVolumeColorMidThemeIndex}", Color) = (0, 1, 0)
|
||||
[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ALDecalVolumeColorMidThemeIndex ("", Int) = 0
|
||||
_ALDecalMidEmission ("Mid Emission", Range(0, 20)) = 0
|
||||
_ALDecalVolumeColorHigh ("Volume Color High--{reference_property:_ALDecalVolumeColorHighThemeIndex}", Color) = (1, 0, 0)
|
||||
[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ALDecalVolumeColorHighThemeIndex ("", Int) = 0
|
||||
_ALDecalHighEmission ("High Emission", Range(0, 20)) = 0
|
||||
[ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Lighten, 5, Screen, 6, Subtract, 7, Add, 8, Overlay, 9, Mixed, 20)]_ALDecalBlendType ("Blend Type", Range(0, 1)) = 0
|
||||
_ALDecalBlendAlpha ("Alpha", Range(0, 1)) = 1
|
||||
_ALDecalControlsAlpha ("Override Alpha", Range(0, 1)) = 0
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _ALDecalGlobalMask ("Global Mask--{reference_property:_ALDecalGlobalMaskBlendType}", Int) = 0
|
||||
[HideInInspector][ThryWideEnum(Add, 7, Subtract, 1, Multiply, 2, Divide, 3, Min, 4, Max, 5, Average, 6, Replace, 0)] _ALDecalGlobalMaskBlendType ("Blending", Int) = 2
|
||||
[HideInInspector] m_end_ALDecalSpectrum ("AL ♫ Spectrum", Float) = 0
|
||||
[HideInInspector] s_end_ALDecalColorsBlendingOptions ("Colors and Blending", Float) = 0
|
||||
//endex
|
||||
|
||||
#T#PoiALDecalsKeywords
|
||||
//ifex _EnableALDecal==0
|
||||
#pragma shader_feature_local POI_AL_DECAL
|
||||
//endex
|
||||
#T#PoiALDecalsVariables
|
||||
//ifex _EnableALDecal==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
#ifdef POI_AL_DECAL
|
||||
float _ALDecalUV;
|
||||
float4 _ALUVScale;
|
||||
float2 _ALUVPosition;
|
||||
float _ALUVRotation;
|
||||
float _ALUVRotationSpeed;
|
||||
float4 _ALDecaldCircleDimensions;
|
||||
|
||||
float _ALDecalUVMode;
|
||||
|
||||
float _ALDecalVolumeStep;
|
||||
float _ALDecalVolumeClipMin;
|
||||
float _ALDecalVolumeClipMax;
|
||||
|
||||
float _ALDecalBandStep;
|
||||
float _ALDecalBandClipMin;
|
||||
float _ALDecalBandClipMax;
|
||||
|
||||
float _ALDecalShapeClip;
|
||||
float _ALDecalShapeClipVolumeWidth;
|
||||
float _ALDecalShapeClipBandWidth;
|
||||
|
||||
#if defined(PROP_ALDECALCOLORMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
Texture2D _ALDecalColorMask;
|
||||
float4 _ALDecalColorMask_ST;
|
||||
float2 _ALDecalColorMaskPan;
|
||||
float _ALDecalColorMaskUV;
|
||||
#endif
|
||||
|
||||
float _ALDecalVolume;
|
||||
float _ALDecalBaseBoost;
|
||||
float _ALDecalTrebleBoost;
|
||||
float _ALDecalLineWidth;
|
||||
float _ALDecalVolumeColorSource;
|
||||
float3 _ALDecalVolumeColorLow;
|
||||
float _ALDecalVolumeColorLowThemeIndex;
|
||||
float3 _ALDecalVolumeColorMid;
|
||||
float _ALDecalVolumeColorMidThemeIndex;
|
||||
float3 _ALDecalVolumeColorHigh;
|
||||
float _ALDecalVolumeColorHighThemeIndex;
|
||||
float _ALDecalLowEmission;
|
||||
float _ALDecalMidEmission;
|
||||
float _ALDecalHighEmission;
|
||||
float _ALDecalBlendType;
|
||||
float _ALDecalBlendAlpha;
|
||||
float _ALDecalControlsAlpha;
|
||||
float _ALDecalGlobalMask;
|
||||
float _ALDecalGlobalMaskBlendType;
|
||||
#endif
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiALDecalsFunctions
|
||||
//ifex _EnableALDecal==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
#ifdef POI_AL_DECAL
|
||||
void ApplyAudioLinkDecal(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods)
|
||||
{
|
||||
float4 colorAndMask = float4(1, 1, 1, 1);
|
||||
#if defined(PROP_ALDECALCOLORMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
colorAndMask = POI2D_SAMPLER_PAN(_ALDecalColorMask, _MainTex, poiUV(poiMesh.uv[_ALDecalColorMaskUV], _ALDecalColorMask_ST), _ALDecalColorMaskPan);
|
||||
#endif
|
||||
if (_ALDecalGlobalMask > 0)
|
||||
{
|
||||
colorAndMask.a = customBlend(colorAndMask.a, poiMods.globalMask[_ALDecalGlobalMask-1], _ALDecalGlobalMaskBlendType);
|
||||
}
|
||||
|
||||
float2 uv = poiMesh.uv[_ALDecalUV];
|
||||
float2 decalCenter = _ALUVPosition;
|
||||
float theta = radians(_ALUVRotation + _Time.z * _ALUVRotationSpeed);
|
||||
float cs = cos(theta);
|
||||
float sn = sin(theta);
|
||||
uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y);
|
||||
uv = remap(uv, float2(0, 0) - _ALUVScale.xz / 2 + _ALUVPosition, _ALUVScale.yw / 2 + _ALUVPosition, float2(0, 0), float2(1, 1));
|
||||
|
||||
// Mask
|
||||
float4 audioLinkMask = 1.0;
|
||||
|
||||
// UV
|
||||
float2 aluv = uv;
|
||||
if (_ALDecalUVMode == 1)
|
||||
{
|
||||
float2 uvdir = uv * 2 - 1;
|
||||
aluv.x = frac(atan2(uvdir.y, uvdir.x) * UNITY_INV_TWO_PI);
|
||||
aluv.y = length(uvdir);
|
||||
}
|
||||
|
||||
// Scale / Offset / Step
|
||||
float maskY = aluv.y;
|
||||
if (_ALDecalUVMode == 1)
|
||||
{
|
||||
maskY = remap(maskY, _ALDecaldCircleDimensions.x, _ALDecaldCircleDimensions.y, 0, 1);
|
||||
}
|
||||
float maskX = aluv.x;
|
||||
if (_ALDecalUVMode == 1)
|
||||
{
|
||||
maskX = remap(maskX, _ALDecaldCircleDimensions.z, _ALDecaldCircleDimensions.w, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
float maskVolume = _ALDecalVolumeStep != 0.0 ? floor(maskY * _ALDecalVolumeStep) / _ALDecalVolumeStep : maskY;
|
||||
float maskBand = _ALDecalBandStep != 0.0 ? floor(maskX * _ALDecalBandStep) / _ALDecalBandStep : maskX;
|
||||
|
||||
// Copy
|
||||
audioLinkMask.r = maskVolume;
|
||||
audioLinkMask.g = maskBand;
|
||||
|
||||
// Clip
|
||||
audioLinkMask.b = maskVolume < _ALDecalVolumeClipMin || maskVolume > _ALDecalVolumeClipMax ? 0.0 : audioLinkMask.b;
|
||||
audioLinkMask.b = maskBand < _ALDecalBandClipMin || maskBand > _ALDecalBandClipMax ? 0.0 : audioLinkMask.b;
|
||||
|
||||
// Shape Clip
|
||||
if (_ALDecalShapeClip)
|
||||
{
|
||||
float volumeth = _ALDecalShapeClipVolumeWidth;
|
||||
if (_ALDecalVolumeStep != 0.0) audioLinkMask.b = frac(maskY * _ALDecalVolumeStep) > volumeth ? 0.0 : audioLinkMask.b;
|
||||
|
||||
float bandwidth = _ALDecalUVMode == 1 ? _ALDecalShapeClipBandWidth / aluv.y : _ALDecalShapeClipBandWidth;
|
||||
float bandth = 1.0 - bandwidth;
|
||||
if (_ALDecalBandStep != 0.0) audioLinkMask.b = frac(maskX * _ALDecalBandStep + bandth * 0.5) < bandth ? 0.0 : audioLinkMask.b;
|
||||
}
|
||||
|
||||
// AudioLink
|
||||
float2 audioLinkUV = float2(frac(audioLinkMask.g * 2.0), 4.5 / 4.0 + floor(audioLinkMask.g * 2.0) / 4.0);
|
||||
audioLinkUV.y *= 0.0625;
|
||||
float4 audioTexture = _AudioTexture.Sample(sampler_linear_clamp, audioLinkUV);
|
||||
float audioVal = audioTexture.b * _ALDecalVolume * lerp(_ALDecalBaseBoost, _ALDecalTrebleBoost, audioLinkMask.g);
|
||||
float audioLinkValue = _ALDecalLineWidth < 1.0 ? abs(audioVal - audioLinkMask.r) < _ALDecalLineWidth : audioVal > audioLinkMask.r * 2.0;
|
||||
audioLinkValue = saturate(audioLinkValue) * audioLinkMask.b;
|
||||
//clip(audioLinkValue - .5);
|
||||
audioLinkValue *= colorAndMask.a;
|
||||
|
||||
if (!poiMods.audioLinkAvailable)
|
||||
{
|
||||
audioLinkValue = 0;
|
||||
}
|
||||
|
||||
|
||||
float3 alColorChord = _AudioTexture.Sample(sampler_linear_clamp, float2(maskX, 24.5 / 64.0)).rgb;
|
||||
float volumeColorSrc = audioLinkMask.g;
|
||||
if (_ALDecalVolumeColorSource == 1) volumeColorSrc = audioLinkMask.r;
|
||||
if (_ALDecalVolumeColorSource == 2) volumeColorSrc = audioVal;
|
||||
|
||||
float3 lowColor = _ALDecalVolumeColorLow.rgb * poiThemeColor(poiMods, _ALDecalVolumeColorLow.rgb, _ALDecalVolumeColorLowThemeIndex);
|
||||
float3 midColor = _ALDecalVolumeColorMid.rgb * poiThemeColor(poiMods, _ALDecalVolumeColorMid.rgb, _ALDecalVolumeColorMidThemeIndex);
|
||||
float3 highColor = _ALDecalVolumeColorHigh.rgb * poiThemeColor(poiMods, _ALDecalVolumeColorHigh.rgb, _ALDecalVolumeColorHighThemeIndex);
|
||||
|
||||
float3 volumeColor = lerp(lowColor, midColor, saturate(volumeColorSrc * 2));
|
||||
volumeColor = lerp(volumeColor, highColor, saturate(volumeColorSrc * 2 - 1));
|
||||
|
||||
float3 emissionColor = lerp(lowColor * _ALDecalLowEmission, midColor * _ALDecalMidEmission, saturate(volumeColorSrc * 2));
|
||||
emissionColor = lerp(emissionColor, highColor * _ALDecalHighEmission, saturate(volumeColorSrc * 2 - 1));
|
||||
|
||||
|
||||
//poiFragData.baseColor = lerp(poiFragData.baseColor, volumeColor, audioLinkValue);
|
||||
#if defined(POI_PASS_BASE) || defined(POI_PASS_ADD)
|
||||
poiFragData.emission += emissionColor * audioLinkValue;
|
||||
poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor * colorAndMask.rgb, _ALDecalBlendType), saturate(_ALDecalBlendAlpha * audioLinkValue));
|
||||
#endif
|
||||
poiFragData.alpha = lerp(poiFragData.alpha, poiFragData.alpha * audioLinkValue, _ALDecalControlsAlpha);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
//endex
|
||||
#T#PoiALDecalsFunctionCalls
|
||||
//ifex _EnableALDecal==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
#ifdef POI_AL_DECAL
|
||||
ApplyAudioLinkDecal(poiMesh, poiFragData, poiMods);
|
||||
#endif
|
||||
#endif
|
||||
//endex
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70efb560537f5b545813faaf4d6f8428
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 363dfe216107eaf4f86b81f07b2380f4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,62 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiALVolumeColor
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiALVolumeColor
|
||||
Name: PoiALVolumeColor
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: -4432645273540307082, guid: 64dc3c69662940d4b9ed9100e21beea8,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- AUDIOLINK_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 6346029674210517224, guid: 64dc3c69662940d4b9ed9100e21beea8,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 1049968090164659832, guid: 64dc3c69662940d4b9ed9100e21beea8,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 8219168899949994472, guid: 64dc3c69662940d4b9ed9100e21beea8,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -6389303596870294039, guid: 64dc3c69662940d4b9ed9100e21beea8,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_COLOR
|
||||
- FRAGMENT_ADD_COLOR
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba8ca7621544dc74f813f9664afd8b7e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
#T#PoiVolumeColorProperties
|
||||
//ifex _EnableVolumeColor==0
|
||||
[HideInInspector] m_start_ALVolumeColor (" AL ♫ Volume Color--{ reference_property:_EnableVolumeColor, button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/audio-link/volume-color},hover:Documentation}}", Float) = 0
|
||||
[HideInInspector][ThryToggle(POI_AL_VOLUMECOLOR)]_EnableVolumeColor ("Enable AL Volume Color", Float) = 0
|
||||
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _ALVolumeColorUV ("UV", Int) = 0
|
||||
[Enum(X, 0, Y, 1)] _ALVolumeColorDirection ("UV Direction", Int) = 0
|
||||
[ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Lighten, 5, Screen, 6, Subtract, 7, Add, 8, Overlay, 9, Mixed, 20)]_ALVolumeColorBlendType ("Blend Type", Range(0, 1)) = 0
|
||||
|
||||
_ALVolumeColorBlendAlpha ("Alpha", Range(0,1)) = 1
|
||||
_ALVolumeColorLow ("Volume Color Low--{reference_property:_ALVolumeColorLowThemeIndex}", Color) = (0, 0, 1)
|
||||
[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ALVolumeColorLowThemeIndex ("", Int) = 0
|
||||
_ALLowEmission ("Low Emission", Range(0, 20)) = 0
|
||||
_ALVolumeColorMid ("Volume Color Mid--{reference_property:_ALVolumeColorMidThemeIndex}", Color) = (0, 1, 0)
|
||||
[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ALVolumeColorMidThemeIndex ("", Int) = 0
|
||||
_ALMidEmission ("Mid Emission", Range(0, 20)) = 0
|
||||
_ALVolumeColorHigh ("Volume Color High--{reference_property:_ALVolumeColorHighThemeIndex}", Color) = (1, 0, 0)
|
||||
[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _ALVolumeColorHighThemeIndex ("", Int) = 0
|
||||
_ALHighEmission ("High Emission", Range(0, 20)) = 0
|
||||
|
||||
[HideInInspector] m_end_ALVolumeColor ("AL ♫ Volume Color", Float) = 0
|
||||
//endex
|
||||
|
||||
#T#PoiVolumeColorKeywords
|
||||
//ifex _EnableVolumeColor==0
|
||||
#pragma shader_feature_local POI_AL_VOLUMECOLOR
|
||||
//endex
|
||||
#T#PoiVolumeColorVariables
|
||||
//ifex _EnableVolumeColor==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
#ifdef POI_AL_VOLUMECOLOR
|
||||
float _ALVolumeColorUV;
|
||||
float _ALVolumeColorDirection;
|
||||
float _ALVolumeColorBlendType;
|
||||
float _ALVolumeColorBlendAlpha;
|
||||
float3 _ALVolumeColorLow;
|
||||
float _ALVolumeColorLowThemeIndex;
|
||||
float3 _ALVolumeColorMid;
|
||||
float _ALVolumeColorMidThemeIndex;
|
||||
float3 _ALVolumeColorHigh;
|
||||
float _ALVolumeColorHighThemeIndex;
|
||||
float _ALLowEmission;
|
||||
float _ALMidEmission;
|
||||
float _ALHighEmission;
|
||||
#endif
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiVolumeColorFunctions
|
||||
//ifex _EnableVolumeColor==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
#ifdef POI_AL_VOLUMECOLOR
|
||||
void ApplyAudioLinkVolumeColor(in PoiMesh poiMesh, inout PoiFragData poiFragData, in PoiMods poiMods)
|
||||
{
|
||||
float volume = AudioLinkLerpMultiline(ALPASS_DFT + float2(poiMesh.uv[_ALVolumeColorUV][_ALVolumeColorDirection] * AUDIOLINK_ETOTALBINS, 0.0)).b;
|
||||
|
||||
float3 lowColor = _ALVolumeColorLow.rgb * poiThemeColor(poiMods, _ALVolumeColorLow.rgb, _ALVolumeColorLowThemeIndex);
|
||||
float3 midColor = _ALVolumeColorMid.rgb * poiThemeColor(poiMods, _ALVolumeColorMid.rgb, _ALVolumeColorMidThemeIndex);
|
||||
float3 highColor = _ALVolumeColorHigh.rgb * poiThemeColor(poiMods, _ALVolumeColorHigh.rgb, _ALVolumeColorHighThemeIndex);
|
||||
|
||||
float3 volumeColor = lerp(lowColor, midColor, saturate(volume * 2));
|
||||
volumeColor = lerp(volumeColor, highColor, saturate(volume * 2 - 1));
|
||||
|
||||
float3 emissionColor = lerp(lowColor * _ALLowEmission, midColor * _ALMidEmission, saturate(volume * 2));
|
||||
emissionColor = lerp(emissionColor, highColor * _ALHighEmission, saturate(volume * 2 - 1));
|
||||
|
||||
#if defined(POI_PASS_BASE) || defined(POI_PASS_ADD)
|
||||
poiFragData.emission += emissionColor * poiMods.audioLinkAvailable;
|
||||
poiFragData.baseColor.rgb = lerp(poiFragData.baseColor, customBlend(poiFragData.baseColor, volumeColor, _ALVolumeColorBlendType), saturate(_ALVolumeColorBlendAlpha * poiMods.audioLinkAvailable));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
//endex
|
||||
#T#PoiVolumeColorFunctionCalls
|
||||
//ifex _EnableVolumeColor==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
#ifdef POI_AL_VOLUMECOLOR
|
||||
ApplyAudioLinkVolumeColor(poiMesh, poiFragData, poiMods);
|
||||
#endif
|
||||
#endif
|
||||
//endex
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64dc3c69662940d4b9ed9100e21beea8
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f35a7f2dea17745479e98526b21a9360
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,81 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiFeatureBS
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiFeatureBS
|
||||
Name: Poi Beatsaber Support
|
||||
Version: 1.0
|
||||
Author: AlexxSeven
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: -3657888825884289717, guid: 823374490a688b341abb700356c28a3a,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- THIRDPARTY_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 102
|
||||
- Template: {fileID: 7580494150627181241, guid: 823374490a688b341abb700356c28a3a,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- DEPTHNORMAL_PASS_KEYWORDS
|
||||
- OUTLINE_PASS_KEYWORDS
|
||||
- EARLYZ_PASS_KEYWORDS
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
- SHADOW_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 6748318367325282331, guid: 823374490a688b341abb700356c28a3a,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- EARLYZ_PROPERTY_VARIABLES
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- SHADOW_PROPERTY_VARIABLES
|
||||
- OUTLINE_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 6842275873331601401, guid: 823374490a688b341abb700356c28a3a,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- VERTEX_BASE_FUNCTIONS_EARLY
|
||||
- VERTEX_ADD_FUNCTIONS_EARLY
|
||||
- VERTEX_OUTLINE_FUNCTIONS_EARLY
|
||||
- VERTEX_SHADOW_FUNCTIONS_EARLY
|
||||
- VERTEX_META_FUNCTIONS_EARLY
|
||||
- VERTEX_EARLYZ_FUNCTIONS_EARLY
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 1392161330846173143, guid: 823374490a688b341abb700356c28a3a,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- VERTEX_MODS_PENETRATION
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 8098179717040799014, guid: 823374490a688b341abb700356c28a3a,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_ALPHA_LATE
|
||||
- FRAGMENT_ADD_ALPHA_LATE
|
||||
- FRAGMENT_OUTLINE_ALPHA_LATE
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a91ad61d74db3d4469cade1646abcad6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,139 @@
|
||||
#T#PoiBSProperties
|
||||
//ifex _BSSEnabled!=1
|
||||
[HideInInspector] m_start_BeatsaberOptions (" Beatsaber support--{reference_property:_BSSEnabled}", int) = 0
|
||||
[ThryToggle(POIBS_ENABLE)][HideInInspector] _BSSEnabled ("Enable BeatSaber Module--{on_value_actions:[{value:1,actions:[{type:SET_PROPERTY,data:_BlendOpAlpha=0},{type:SET_PROPERTY,data:_SrcBlendAlpha=1},{type:SET_PROPERTY,data:_DstBlendAlpha=0}]}]}", int) = 0
|
||||
[ThryRichLabel] _BSSSpacer1 ("<color=#ff0000ff>―――――――[IMPORTANT]―――――――</color>", int) = 0
|
||||
[Helpbox] _BSSHelpBox1("Toggling on BeatSaber support will set (Rendering > Blending > Advanced Alpha) to ''Add, One, Zero,'' as alpha blending operations cause visual issues.", int) = 0
|
||||
[Helpbox] _BSSHelpBox2 ("Glow is handled through the various emission options found in the shader!", int) = 0
|
||||
[ThryRichLabel] _BSSSpacer2 ("<color=#ff0000ff>―――――――[IMPORTANT]―――――――</color>", int) = 0
|
||||
[ThryRichLabel] _BSSSpacer3 ("", int) = 0
|
||||
|
||||
[HideInInspector]s_start_CCopt("Custom Colors:--{reference_property:_CustomColors}", int) = 1
|
||||
[HideInInspector][MaterialToggle] _CustomColors ("", Float) = 0
|
||||
[Helpbox] _BSSHelpBox3 ("To properly support custom colors on assets like sabers when material locking. you MUST right click the ''Color & Alpha'' property at the top and set it to ''Animated.''", int) = 0
|
||||
[HideInInspector]s_end_CCopt("Custom Color Toggle:", int) = 1
|
||||
|
||||
//ifex _BSSBloomfog!=1
|
||||
[HideInInspector] m_start_BeatsaberBloomFog ("Bloom & Height fog--{reference_property:_BSSBloomfog}", int) = 0
|
||||
[ThryToggle(POIBS_BLOOMFOG)][HideInInspector] _BSSBloomfog ("Enable Bloomfog", int) = 0
|
||||
[HideInInspector]s_start_fogOpt("Bloom fog settings:", int) = 1
|
||||
_FogStartOffset ("Fog Start Offset:", Float) = 0
|
||||
_FogScale ("Fog Scale:", Float) = 1
|
||||
[HideInInspector]s_end_fogOpt("", int) = 1
|
||||
[ThryToggle(BSSBLOOMFOGTYPE_HEIGHT)][HideInInspector] _BSSBloomfogType ("", int) = 1
|
||||
[HideInInspector]s_start_heightFogOpt("Height fog settings:--{reference_property:_BSSBloomfogType}", int) = 1
|
||||
_FogHeightOffset ("Height start offset:--{condition_enable:_BSSBloomfogType==1}", Float) = 0
|
||||
_FogHeightScale ("Height Scale:--{condition_enable:_BSSBloomfogType==1}", Float) = 1
|
||||
[HideInInspector]s_end_heightFogOpt("", int) = 1
|
||||
[HideInInspector] m_end_BeatsaberBloomFog ("", int) = 0
|
||||
//endex
|
||||
|
||||
[HideInInspector] m_end_BeatsaberOptions ("", Float) = 0
|
||||
//endex
|
||||
|
||||
#T#PoiBSKeywords
|
||||
//ifex _BSSEnabled!=1
|
||||
#pragma shader_feature_local POIBS_ENABLE
|
||||
//ifex _BSSBloomfog!=1
|
||||
#pragma shader_feature_local POIBS_BLOOMFOG
|
||||
#pragma shader_feature_local BSSBLOOMFOGTYPE_HEIGHT
|
||||
//endex
|
||||
//endex
|
||||
|
||||
#T#PoiBSVariables
|
||||
//ifex _BSSEnabled!=1
|
||||
#ifdef POIBS_ENABLE
|
||||
float _CustomColors;
|
||||
//ifex _BSSBloomfog!=1
|
||||
#ifdef POIBS_BLOOMFOG
|
||||
float _FogStartOffset;
|
||||
float _FogScale;
|
||||
float _FogHeightOffset;
|
||||
float _FogHeightScale;
|
||||
|
||||
uniform float2 _CustomFogTextureToScreenRatio;
|
||||
uniform float _StereoCameraEyeOffset;
|
||||
|
||||
uniform float _CustomFogOffset;
|
||||
uniform float _CustomFogAttenuation;
|
||||
uniform float _CustomFogHeightFogStartY;
|
||||
uniform float _CustomFogHeightFogHeight;
|
||||
uniform Texture2D _BloomPrePassTexture;
|
||||
#endif
|
||||
//endex
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiBSVertexReturn
|
||||
//ifex _BSSEnabled!=1
|
||||
#ifdef POIBS_ENABLE
|
||||
//ifex _BSSBloomfog!=1
|
||||
#ifdef POIBS_BLOOMFOG
|
||||
o.fogData = GetFogCoord(UnityObjectToClipPos(v.vertex));
|
||||
o.worldPos = mul(unity_ObjectToWorld, v.vertex);
|
||||
#endif
|
||||
//endex
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiBSVertexFunctions
|
||||
//ifex _BSSEnabled!=1
|
||||
#ifdef POIBS_ENABLE
|
||||
//ifex _BSSBloomfog!=1
|
||||
#ifdef POIBS_BLOOMFOG
|
||||
inline float4 GetFogCoord(float4 clipPos)
|
||||
{
|
||||
float4 screenPos = ComputeNonStereoScreenPos(clipPos);
|
||||
float2 screenPosNormalized = screenPos.xy / screenPos.w;
|
||||
float eyeOffset = (unity_StereoEyeIndex * (_StereoCameraEyeOffset * 2)) + - _StereoCameraEyeOffset;
|
||||
return float4(
|
||||
((eyeOffset +screenPosNormalized.x) + - 0.5) * _CustomFogTextureToScreenRatio.x + 0.5,
|
||||
(screenPosNormalized.y + - 0.5) * _CustomFogTextureToScreenRatio.y + 0.5
|
||||
,clipPos.z,clipPos.w);
|
||||
}
|
||||
|
||||
inline float GetHeightFogIntensity(float3 worldPos, float fogHeightOffset, float fogHeightScale)
|
||||
{
|
||||
float heightFogIntensity = _CustomFogHeightFogHeight + _CustomFogHeightFogStartY;
|
||||
heightFogIntensity = ((worldPos.y * fogHeightScale) + fogHeightOffset) + - heightFogIntensity;
|
||||
heightFogIntensity = heightFogIntensity / _CustomFogHeightFogHeight;
|
||||
heightFogIntensity = clamp(heightFogIntensity, 0, 1);
|
||||
return ((-heightFogIntensity * 2) + 3) * (heightFogIntensity * heightFogIntensity);
|
||||
}
|
||||
|
||||
inline float GetFogIntensity(float3 distance, float fogStartOffset, float fogScale)
|
||||
{
|
||||
float fogIntensity = max(dot(distance, distance) + - fogStartOffset, 0);
|
||||
fogIntensity = max((fogIntensity * fogScale) + - _CustomFogOffset, 0);
|
||||
fogIntensity = 1 / ((fogIntensity * _CustomFogAttenuation) + 1);
|
||||
return -fogIntensity;
|
||||
}
|
||||
#endif
|
||||
//endex
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiBSAlphaRewrite
|
||||
//ifex _BSSEnabled!=1
|
||||
#ifdef POIBS_ENABLE
|
||||
poiFragData.finalColor += poiFragData.emission * poiMods.globalEmission;
|
||||
poiFragData.alpha = poiFragData.alpha * poiFragData.emission.z;
|
||||
poiFragData.emission = 0;
|
||||
|
||||
//ifex _BSSBloomfog!=1
|
||||
#ifdef POIBS_BLOOMFOG
|
||||
float3 fogDistance = i.worldPos + - _WorldSpaceCameraPos;
|
||||
float4 fogCol = -float4(poiFragData.finalColor, 1) + POI2D_SAMPLER(_BloomPrePassTexture, _MainTex, i.fogData.xy);
|
||||
fogCol.a = -poiFragData.alpha;
|
||||
|
||||
#ifdef BSSBLOOMFOGTYPE_HEIGHT
|
||||
poiFragData.finalColor = poiFragData.finalColor + (((GetHeightFogIntensity(i.worldPos, _FogHeightOffset, _FogHeightScale) * GetFogIntensity(fogDistance, _FogStartOffset, _FogScale)) + 1) * fogCol.rgb);
|
||||
poiFragData.alpha = poiFragData.alpha + (((GetHeightFogIntensity(i.worldPos, _FogHeightOffset, _FogHeightScale) * GetFogIntensity(fogDistance, _FogStartOffset, _FogScale)) + 1) * fogCol.a);
|
||||
#else
|
||||
poiFragData.finalColor = poiFragData.finalColor + ((GetFogIntensity(fogDistance, _FogStartOffset, _FogScale) + 1) * fogCol.rgb);
|
||||
poiFragData.alpha = poiFragData.alpha + ((GetFogIntensity(fogDistance, _FogStartOffset, _FogScale) + 1) * fogCol.a);
|
||||
#endif
|
||||
#endif
|
||||
//endex
|
||||
#endif
|
||||
//endex
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 823374490a688b341abb700356c28a3a
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b945b76295c0acf47ae03905a37bc00a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2aa50240ba2e4643810af2d587a966b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,65 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiTruchet
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiTruchet
|
||||
Name:
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 5324126284433022680, guid: e80027487f186264198feb58a73f8e1d,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- SPECIALFX_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 1693693689188269537, guid: e80027487f186264198feb58a73f8e1d,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 1193241295435783745, guid: e80027487f186264198feb58a73f8e1d,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -8618466880914143172, guid: e80027487f186264198feb58a73f8e1d,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
- FRAGMENT_META_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 6458864411352228851, guid: e80027487f186264198feb58a73f8e1d,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_COLOR
|
||||
- FRAGMENT_ADD_COLOR
|
||||
- FRAGMENT_META_COLOR
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4fd319e47cec1c45a221ca15c8291fe
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,214 @@
|
||||
#T#PoiTruchetProperties
|
||||
//ifex _EnableTruchet!=1
|
||||
[HideInInspector] m_start_truchet (" Truchet--{reference_property:_EnableTruchet,button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/special-fx/truchet},hover:Documentation}}", Float) = 0
|
||||
[HideInInspector][ThryToggle(POI_TRUCHET)] _EnableTruchet ("Enable Truchet", Float) = 0
|
||||
[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos, 5, Local Pos, 8, Polar UV, 6, Distorted UV, 7, Matcap, 9)] _TruchetUV ("UV", Int) = 0
|
||||
[ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Lighten, 5, Screen, 6, Subtract, 7, Add, 8, Overlay, 9, Mixed, 20)]_TruchetBlendType ("Blending", Range(0, 1)) = 0
|
||||
[VectorLabel(PanX, PanY, OffX, OffY)]_TruchetPanOffset ("Pan & Offset", Vector) = (0, 0, 0, 0)
|
||||
_TruchetDensity ("Density", Float) = 10
|
||||
_TruchetColor ("Color--{reference_property:_TruchetColorThemeIndex}", Color) = (1, 1, 1, 1)
|
||||
[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _TruchetColorThemeIndex ("", Int) = 0
|
||||
[sRGBWarning(true)]_TruchetTex ("TruchetTex--{reference_properties:[_TruchetTexPan]}", 2D) = "white" { }
|
||||
[HideInInspector][Vector2]_TruchetTexPan ("Panning", Vector) = (0, 0, 0, 0)
|
||||
|
||||
[sRGBWarning]_TruchetMask ("Truchet Mask--{reference_properties:[_TruchetMaskPan, _TruchetMaskUV, _TruchetMaskChannel, _TruchetMaskInvert, _TruchetMaskIntensity, _TruchetMaskGlobalMask, _TruchetMaskGlobalMaskBlendType]}", 2D) = "white" { }
|
||||
[HideInInspector][Vector2]_TruchetMaskPan ("Panning", Vector) = (0, 0, 0, 0)
|
||||
[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos, 5, Local Pos, 8, Polar UV, 6, Distorted UV, 7, Matcap, 9)] _TruchetMaskUV ("UV", Int) = 0
|
||||
[HideInInspector][Enum(R, 0, G, 1, B, 2, A, 3)]_TruchetMaskChannel ("Channel", Float) = 0
|
||||
[HideInInspector][ToggleUI]_TruchetMaskInvert ("Invert", Float) = 0
|
||||
[HideInInspector][ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _TruchetMaskGlobalMask ("Global Mask--{reference_property:_TruchetMaskGlobalMaskBlendType}", Int) = 0
|
||||
[HideInInspector][ThryWideEnum(Add, 7, Subtract, 1, Multiply, 2, Divide, 3, Min, 4, Max, 5, Average, 6, Replace, 0)]_TruchetMaskGlobalMaskBlendType ("Blending", Range(0, 1)) = 2
|
||||
[HideInInspector]_TruchetMaskIntensity ("Intensity", Range(0, 1)) = 1
|
||||
_TruchetEmissionStrength ("Emission Strength", Range(0, 20)) = 0
|
||||
_TruchetThiccness ("Thiccness", Range(0, .5)) = .1
|
||||
_TruchetEdgeSharpness ("Edge Sharpness", Range(0, 1)) = 1
|
||||
_TruchetAlpha ("Alpha", Range(0, 1)) = 1
|
||||
[ToggleUI]_TruchetOverrideAlpha ("Override Alpha", Float) = 0
|
||||
|
||||
[HideInInspector] m_start_TruchetAudioLink ("Audio Link ♫--{ condition_showS:_EnableAudioLink==1}", Float) = 0
|
||||
[ToggleUI]_TruchetHideWhenNoAL ("Hide When No AL", Float) = 0
|
||||
// AL Emission
|
||||
[ThryToggleUI(true)]_TruchetALEmissionToggle ("AL Emission", Float) = 0
|
||||
[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3, Volume, 4)] _TruchetALEmissionBand ("Emission Band--{condition_showS:(_TruchetALEmissionToggle==1)}", Int) = 0
|
||||
[VectorLabel(Min, Max)]_TruchetALEmission ("Emission Add--{condition_showS:(_TruchetALEmissionToggle==1)}", Vector) = (0, 0, 0, 0)
|
||||
// AL Alpha
|
||||
[ThryToggleUI(true)]_TruchetALAlphaToggle ("AL Alpha", Float) = 0
|
||||
[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3, Volume, 4)] _TruchetALAlphaBand ("Alpha Band--{condition_showS:(_TruchetALAlphaToggle==1)}", Int) = 0
|
||||
[VectorLabel(Min, Max)]_TruchetALAlpha ("Alpha Multiply--{condition_showS:(_TruchetALAlphaToggle==1)}", Vector) = (0, 0, 0, 0)
|
||||
// Chrono Pan
|
||||
[ThryToggleUI(true)]_TruchetChronoPanToggle ("Chrono Pan", Float) = 0
|
||||
[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3, Volume, 4)] _TruchetChronoPanBand ("Band--{condition_showS:(_TruchetChronoPanToggle==1)}", Int) = 0
|
||||
[ThryWideEnum(Motion increases as intensity of band increases, 0, Above but Smooth, 1, Motion moves back and forth as a function of intensity, 2, Above but Smoooth, 3, Fixed speed increase when the band is dark Stationary when light, 4, Above but Smooooth, 5, Fixed speed increase when the band is dark Fixed speed decrease when light, 6, Above but Smoooooth, 7)]_TruchetChronoPanType ("Chrono Motion Type--{condition_showS:(_TruchetChronoPanToggle==1)}", Int) = 0
|
||||
[Vector2]_TruchetChronoPanSpeed ("Pan Speed--{condition_showS:(_TruchetChronoPanToggle==1)}", Vector) = (0, 0, 0, 0)
|
||||
|
||||
[HideInInspector] m_end_TruchetAudioLink ("Audio Link", Float) = 0
|
||||
[HideInInspector] m_end_truchet ("", Float) = 0
|
||||
|
||||
//endex
|
||||
#T#PoiTruchetKeywords
|
||||
//ifex _EnableTruchet!=1
|
||||
#pragma shader_feature_local POI_TRUCHET
|
||||
//endex
|
||||
#T#PoiTruchetVariables
|
||||
//ifex _EnableTruchet!=1
|
||||
#ifdef POI_TRUCHET
|
||||
|
||||
float _TruchetUV;
|
||||
float _TruchetBlendType;
|
||||
float _TruchetDensity;
|
||||
float _TruchetThiccness;
|
||||
float4 _TruchetColor;
|
||||
float _TruchetColorThemeIndex;
|
||||
#if defined(PROP_TRUCHETTEX) || !defined(OPTIMIZER_ENABLED)
|
||||
Texture2D _TruchetTex;
|
||||
#endif
|
||||
float4 _TruchetTex_ST;
|
||||
float4 _TruchetTexPan;
|
||||
float4 _TruchetPanOffset;
|
||||
float _TruchetAlpha;
|
||||
float _TruchetEdgeSharpness;
|
||||
float _TruchetEmissionStrength;
|
||||
float _TruchetHideWhenNoAL;
|
||||
|
||||
#if defined(PROP_TRUCHETMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
Texture2D _TruchetMask;
|
||||
#endif
|
||||
float4 _TruchetMask_ST;
|
||||
float4 _TruchetMaskPan;
|
||||
float _TruchetMaskUV;
|
||||
float _TruchetMaskChannel;
|
||||
float _TruchetMaskInvert;
|
||||
float _TruchetMaskGlobalMask;
|
||||
float _TruchetMaskGlobalMaskBlendType;
|
||||
float _TruchetMaskIntensity;
|
||||
float _TruchetOverrideAlpha;
|
||||
|
||||
//ifex _EnableAudioLink==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
float _TruchetALEmissionToggle;
|
||||
float _TruchetALEmissionBand;
|
||||
float4 _TruchetALEmission;
|
||||
float _TruchetALAlphaToggle;
|
||||
float _TruchetALAlphaBand;
|
||||
float4 _TruchetALAlpha;
|
||||
float _TruchetChronoPanToggle;
|
||||
float _TruchetChronoPanType;
|
||||
float4 _TruchetChronoPanSpeed;
|
||||
float _TruchetChronoPanBand;
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#endif
|
||||
//endex
|
||||
#T#PoiTruchetFunctions
|
||||
//ifex _EnableTruchet!=1
|
||||
#ifdef POI_TRUCHET
|
||||
float Hash21(float2 value)
|
||||
{
|
||||
value = frac(value * float2(923.34, 567.345));
|
||||
value += dot(value, value + 34.23);
|
||||
return frac(value.x * value.y);
|
||||
}
|
||||
|
||||
void applyTruchet(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods)
|
||||
{
|
||||
float2 uv = poiMesh.uv[_TruchetUV] * _TruchetDensity + _TruchetPanOffset.xy * _Time.x + _TruchetPanOffset.zw;
|
||||
float2 gridUV = frac(uv) - .5;
|
||||
float2 id = floor(uv);
|
||||
float2 dx = ddx(uv);
|
||||
float2 dy = ddy(uv);
|
||||
|
||||
// Random # 0-1
|
||||
float randomID = Hash21(id);
|
||||
|
||||
if (randomID < .5)
|
||||
{
|
||||
gridUV.x *= -1;
|
||||
}
|
||||
float mask = 0;
|
||||
float distance = 0;
|
||||
float side = sign(gridUV.x + gridUV.y + .001);
|
||||
float checker = glsl_mod(id.x + id.y, 2.0) * 2 - 1;
|
||||
float2 pathUV = float2(0, 0);
|
||||
|
||||
pathUV = gridUV - side * 0.5;
|
||||
distance = length(pathUV);
|
||||
|
||||
float fwidthDistance = fwidth(abs(distance - 0.5)) + 0.0001; // Add epsilon to prevent division by zero
|
||||
mask = saturate((_TruchetThiccness - abs(distance - 0.5)) / fwidthDistance);
|
||||
mask *= smoothstep(0, 1 - _TruchetEdgeSharpness, (_TruchetThiccness - abs(distance - 0.5)));
|
||||
|
||||
#if defined(PROP_TRUCHETMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
float maskTex = UNITY_SAMPLE_TEX2D_SAMPLER(_TruchetMask, _MainTex, poiUV(poiMesh.uv[_TruchetMaskUV], _TruchetMask_ST) + _Time.x * _TruchetMaskPan)[_TruchetMaskChannel];
|
||||
#else
|
||||
float maskTex = 1;
|
||||
#endif
|
||||
|
||||
maskTex = saturate(maskTex * _TruchetMaskIntensity);
|
||||
|
||||
if (_TruchetMaskInvert)
|
||||
{
|
||||
maskTex = 1 - maskTex;
|
||||
}
|
||||
|
||||
if (_TruchetMaskGlobalMask > 0)
|
||||
{
|
||||
maskTex = maskBlend(maskTex, poiMods.globalMask[_TruchetMaskGlobalMask - 1], _TruchetMaskGlobalMaskBlendType);
|
||||
}
|
||||
mask *= maskTex;
|
||||
|
||||
// -pi to pi
|
||||
float angle = atan2(pathUV.x, pathUV.y);
|
||||
|
||||
pathUV.x = checker * angle / 1.57;
|
||||
pathUV.y = (distance - (.5 - _TruchetThiccness)) / (2 * _TruchetThiccness);
|
||||
if (randomID < .5 ^ checker > 0)
|
||||
{
|
||||
pathUV.y = 1 - pathUV.y;
|
||||
}
|
||||
float emission = _TruchetEmissionStrength;
|
||||
float2 uvOffset = float2(0, 0);
|
||||
|
||||
//ifex _EnableAudioLink==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
if (poiMods.audioLinkAvailable)
|
||||
{
|
||||
if (_TruchetChronoPanToggle)
|
||||
{
|
||||
uvOffset = AudioLinkGetChronoTime(_TruchetChronoPanType, _TruchetChronoPanBand) * _TruchetChronoPanSpeed.xy;
|
||||
}
|
||||
if (_TruchetALEmissionToggle)
|
||||
{
|
||||
emission += lerp(_TruchetALEmission.x, _TruchetALEmission.y, poiMods.audioLink[_TruchetALEmissionBand]);
|
||||
}
|
||||
if (_TruchetALAlphaToggle)
|
||||
{
|
||||
mask = saturate(mask * lerp(_TruchetALAlpha.x, _TruchetALAlpha.y, poiMods.audioLink[_TruchetALAlphaBand]));
|
||||
}
|
||||
}
|
||||
|
||||
if (!poiMods.audioLinkAvailable && _TruchetHideWhenNoAL)
|
||||
{
|
||||
mask = 0;
|
||||
}
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#if defined(PROP_TRUCHETTEX) || !defined(OPTIMIZER_ENABLED)
|
||||
float4 TruchetTex = POI2D_SAMPLER_PANGRAD(_TruchetTex, _MainTex, poiUV(pathUV, _TruchetTex_ST) + uvOffset, _TruchetTexPan.xy, dx, dy);
|
||||
#else
|
||||
float4 TruchetTex = 1;
|
||||
#endif
|
||||
float3 truchetColor = poiThemeColor(poiMods, _TruchetColor.rgb, _TruchetColorThemeIndex);
|
||||
poiFragData.emission += lerp(0, TruchetTex.rgb * truchetColor, min(mask, TruchetTex.a) * emission);
|
||||
poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, customBlend(poiFragData.baseColor.rgb, TruchetTex.rgb * truchetColor, _TruchetBlendType), min(mask, TruchetTex.a) * _TruchetAlpha);
|
||||
poiFragData.alpha *= lerp(1, min(mask, TruchetTex.a) * _TruchetAlpha, _TruchetOverrideAlpha);
|
||||
}
|
||||
#endif
|
||||
//endex
|
||||
#T#PoiTruchetFunctionCalls
|
||||
//ifex _EnableTruchet!=1
|
||||
#ifdef POI_TRUCHET
|
||||
applyTruchet(poiFragData, poiMesh, poiMods);
|
||||
#endif
|
||||
//endex
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e80027487f186264198feb58a73f8e1d
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,32 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_ExperimentalCategory
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiExperimentalCategory
|
||||
Name: Poi Experimental Category
|
||||
Version:
|
||||
Author: poiyomi
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: -544282384758852595, guid: 300b75a2c33f1ec4994e5d2922149142,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- EXTRAS_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c017bba6471890428411520ae5d90f4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,2 @@
|
||||
[HideInInspector] m_experimentalCategory ("Experimental", Float) = 0
|
||||
#K#PoiExperimentalProperties
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 300b75a2c33f1ec4994e5d2922149142
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 836627ab161102f4caef6d73aab2391d, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1786fc7b81351a7419e51b1e58501ff4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,56 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_LTCGI
|
||||
m_EditorClassIdentifier:
|
||||
Id: LTCGI
|
||||
Name: LTCGI
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 3286027707361779788, guid: 7df5bb510c95d184eb96a45d91613ad0,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- LIGHTING_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 101
|
||||
- Template: {fileID: 8820534607195182900, guid: 7df5bb510c95d184eb96a45d91613ad0,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -7217438872822601035, guid: 7df5bb510c95d184eb96a45d91613ad0,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -6202294694914249951, guid: 7df5bb510c95d184eb96a45d91613ad0,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 7344898688239203700, guid: 7df5bb510c95d184eb96a45d91613ad0,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_LIGHTING
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc1e9f74ebdbaaf439f73301d59c16aa
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7df5bb510c95d184eb96a45d91613ad0
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bab7340c9152ab34683a0d5100887f14
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,114 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_AlphaOptions
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiAlphaOptions
|
||||
Name: Alpha Options
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
AllowDuplicates: 0
|
||||
ForceDuplicateLogic: 0
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 257055857157848321, guid: 6c6bcf2ea34623741a36552a6c678ea3,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- MAIN_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 99
|
||||
- Template: {fileID: 7896923665127700555, guid: 6c6bcf2ea34623741a36552a6c678ea3,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- DEPTHNORMAL_PASS_KEYWORDS
|
||||
- OUTLINE_PASS_KEYWORDS
|
||||
- EARLYZ_PASS_KEYWORDS
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
- SHADOW_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 0
|
||||
- Template: {fileID: -7842061715366162960, guid: 6c6bcf2ea34623741a36552a6c678ea3,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- SHADOW_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
- OUTLINE_PROPERTY_VARIABLES
|
||||
- FUR_BASE_PROPERTY_VARIABLES
|
||||
- DEPTHNORMAL_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 0
|
||||
- Template: {fileID: 6382579130851865620, guid: 6c6bcf2ea34623741a36552a6c678ea3,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
- FRAGMENT_SHADOW_FUNCTIONS
|
||||
- FRAGMENT_META_FUNCTIONS
|
||||
- FRAGMENT_OUTLINE_FUNCTIONS
|
||||
- FRAGMENT_DEPTHNORMAL_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 0
|
||||
- Template: {fileID: 7046177447067330403, guid: 6c6bcf2ea34623741a36552a6c678ea3,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_COLOR
|
||||
- FRAGMENT_ADD_COLOR
|
||||
- FRAGMENT_SHADOW_COLOR
|
||||
- FRAGMENT_META_COLOR
|
||||
- FRAGMENT_OUTLINE_COLOR
|
||||
- FRAGMENT_DEPTHNORMAL_COLOR
|
||||
NeedsVariant: 0
|
||||
Queue: 0
|
||||
- Template: {fileID: -9026782082732213869, guid: 6c6bcf2ea34623741a36552a6c678ea3,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_RETURN
|
||||
- FRAGMENT_ADD_RETURN
|
||||
- FRAGMENT_SHADOW_RETURN
|
||||
- FRAGMENT_META_RETURN
|
||||
- FRAGMENT_OUTLINE_RETURN
|
||||
- FRAGMENT_DEPTHNORMAL_RETURN
|
||||
NeedsVariant: 0
|
||||
Queue: 0
|
||||
- Template: {fileID: 4379745813462220173, guid: 6c6bcf2ea34623741a36552a6c678ea3,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_RETURN
|
||||
- FRAGMENT_ADD_RETURN
|
||||
- FRAGMENT_SHADOW_RETURN
|
||||
- FRAGMENT_META_RETURN
|
||||
- FRAGMENT_OUTLINE_RETURN
|
||||
- FRAGMENT_DEPTHNORMAL_RETURN
|
||||
NeedsVariant: 0
|
||||
Queue: 0
|
||||
- Template: {fileID: 4466012173581799560, guid: 6c6bcf2ea34623741a36552a6c678ea3,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_RETURN
|
||||
- FRAGMENT_ADD_RETURN
|
||||
- FRAGMENT_SHADOW_RETURN
|
||||
- FRAGMENT_META_RETURN
|
||||
- FRAGMENT_OUTLINE_RETURN
|
||||
- FRAGMENT_DEPTHNORMAL_RETURN
|
||||
NeedsVariant: 0
|
||||
Queue: 0
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 691861f6a28e64048b4d465b44e7dae2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,293 @@
|
||||
#T#PoiAlphaOptionsProperties
|
||||
[HideInInspector] m_start_Alpha ("Alpha Options--{button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/color-and-normals/alpha-options},hover:Documentation}}", Float) = 0
|
||||
[ToggleUI]_AlphaForceOpaque ("Force Opaque", Float) = 1
|
||||
_AlphaMod ("Alpha Mod", Range(-1, 1)) = 0.0
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _AlphaGlobalMask ("Global Mask--{reference_property:_AlphaGlobalMaskBlendType}", Int) = 0
|
||||
[HideInInspector][ThryWideEnum(Add, 7, Subtract, 1, Multiply, 2, Divide, 3, Min, 4, Max, 5, Average, 6, Replace, 0)] _AlphaGlobalMaskBlendType ("Blending", Int) = 2
|
||||
|
||||
//ifex _AlphaToCoverage==0 && isNotAnimated(_AlphaToCoverage)
|
||||
[HideInInspector] s_start_AlphaToCoverage ("Alpha To Coverage--{reference_property:_AlphaToCoverage,default_expand:false}", Float) = 0
|
||||
[HideInInspector][ToggleUI] _AlphaToCoverage ("A2CToggle", Float) = 0
|
||||
[ToggleUI]_AlphaSharpenedA2C ("Sharpened A2C", Float) = 0
|
||||
_AlphaMipScale ("Mip Level Alpha Scale", Range(0, 1)) = 0.25
|
||||
[HideInInspector] s_end_AlphaToCoverage ("Alpha To Coverage", Float) = 0
|
||||
//endex
|
||||
|
||||
//ifex _AlphaDithering==0 && isNotAnimated(_AlphaDithering)
|
||||
[HideInInspector] s_start_AlphaDithering ("Dithering--{reference_property:_AlphaDithering,default_expand:false}", Float) = 0
|
||||
[HideInInspector][ToggleUI] _AlphaDithering ("Dithering", Float) = 0
|
||||
_AlphaDitherGradient ("Dither Gradient", Range(0, 1)) = .1
|
||||
_AlphaDitherBias ("Dither Bias", Range(0, 1)) = 0
|
||||
[HideInInspector] s_end_AlphaDithering ("Alpha To Coverage", Float) = 0
|
||||
//endex
|
||||
|
||||
//ifex _AlphaDistanceFade==0 && isNotAnimated(_AlphaDistanceFade)
|
||||
[HideInInspector] s_start_AlphaDistanceFade ("Distance Alpha / Distance Fade--{reference_property:_AlphaDistanceFade,persistent_expand:true,default_expand:false}", Float) = 0
|
||||
[HideInInspector][ToggleUI] _AlphaDistanceFade ("Distance Alpha", Float) = 0
|
||||
[Enum(Object Position, 0, Pixel Position, 1)] _AlphaDistanceFadeType ("Pos To Use", Int) = 1
|
||||
_AlphaDistanceFadeMinAlpha ("Min Distance Alpha", Range(0, 1)) = 0
|
||||
_AlphaDistanceFadeMaxAlpha ("Max Distance Alpha", Range(0, 1)) = 1
|
||||
_AlphaDistanceFadeMin ("Min Distance", Float) = 0
|
||||
_AlphaDistanceFadeMax ("Max Distance", Float) = 0
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _AlphaDistanceFadeGlobalMask ("Global Mask", Int) = 0
|
||||
[HideInInspector] s_end_AlphaDistanceFade ("Distance Alpha / Distance Fade", Float) = 0
|
||||
//endex
|
||||
|
||||
//ifex _AlphaFresnel==0 && isNotAnimated(_AlphaFresnel)
|
||||
[HideInInspector] s_start_AlphaFresnel ("Fresnel Alpha--{reference_property:_AlphaFresnel,persistent_expand:true,default_expand:false}", Float) = 0
|
||||
[HideInInspector][ToggleUI] _AlphaFresnel ("Fresnel Alpha", Float) = 0
|
||||
_AlphaFresnelAlpha ("Intensity", Range(0, 1)) = 0
|
||||
_AlphaFresnelSharpness ("Sharpness", Range(0, 1)) = .5
|
||||
_AlphaFresnelWidth ("Width", Range(0, 1)) = .5
|
||||
[ToggleUI]_AlphaFresnelInvert ("Invert", Float) = 0
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _AlphaFresnelGlobalMask ("Global Mask", Int) = 0
|
||||
[HideInInspector] s_end_AlphaFresnel ("Fresnel Alpha", Float) = 0
|
||||
//endex
|
||||
|
||||
//ifex _AlphaAngular==0 && isNotAnimated(_AlphaAngular)
|
||||
[HideInInspector] s_start_AlphaAngular ("Angular Alpha--{reference_property:_AlphaAngular,persistent_expand:true,default_expand:false}", Float) = 0
|
||||
[HideInInspector][ToggleUI] _AlphaAngular ("Angular Alpha", Float) = 0
|
||||
[Enum(Camera Face Model, 0, Model Face Camera, 1, Face Each Other, 2)] _AngleType ("Angle Type", Int) = 0
|
||||
[Enum(Model, 0, Vertex, 1)] _AngleCompareTo ("Model or Vert Positon", Int) = 0
|
||||
[Vector3]_AngleForwardDirection ("Forward Direction", Vector) = (0, 0, 1)
|
||||
_CameraAngleMin ("Camera Angle Min", Range(0, 180)) = 45
|
||||
_CameraAngleMax ("Camera Angle Max", Range(0, 180)) = 90
|
||||
_ModelAngleMin ("Model Angle Min", Range(0, 180)) = 45
|
||||
_ModelAngleMax ("Model Angle Max", Range(0, 180)) = 90
|
||||
_AngleMinAlpha ("Min Alpha", Range(0, 1)) = 0
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _AlphaAngularGlobalMask ("Global Mask", Int) = 0
|
||||
[HideInInspector] s_end_AlphaAngular ("Name", Float) = 0
|
||||
//endex
|
||||
|
||||
//ifex _AlphaAudioLinkEnabled==0 && isNotAnimated(_AlphaAudioLinkEnabled)
|
||||
[HideInInspector] s_start_ALAlpha ("Alpha Audio Link--{reference_property:_AlphaAudioLinkEnabled,persistent_expand:true,default_expand:false, condition_showS:(_EnableAudioLink==1)}", Float) = 0
|
||||
[HideInInspector][ToggleUI]_AlphaAudioLinkEnabled ("Alpha Audio Link", Float) = 0
|
||||
[Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3, Volume, 4)] _AlphaAudioLinkAddBand ("Add Band", Int) = 0
|
||||
[VectorLabel(Min, Max)]_AlphaAudioLinkAddRange ("Add Range", Vector) = (0, 0, 0)
|
||||
[HideInInspector] s_end_ALAlpha ("Alpha Audio Link", Float) = 0
|
||||
|
||||
[HideInInspector] s_start_AlphaAdvanced ("Advanced--{persistent_expand:true,default_expand:false}", Float) = 0
|
||||
[ToggleUI]_AlphaPremultiply ("Alpha Premultiply", Float) = 0
|
||||
_AlphaBoostFA ("Boost Transparency in ForwardAdd--{condition_showS:(_AddBlendOp==4)}", Range(1, 100)) = 10
|
||||
[HideInInspector] s_end_AlphaAdvanced ("Advanced", Float) = 0
|
||||
//endex
|
||||
[HideInInspector] m_end_Alpha ("Alpha Options", Float) = 0
|
||||
|
||||
|
||||
#T#PoiAlphaOptionsKeywords
|
||||
//#pragma shader_feature KEYWORD
|
||||
|
||||
#T#PoiAlphaOptionsVariables
|
||||
float _AlphaForceOpaque;
|
||||
float _AlphaMod;
|
||||
float _AlphaPremultiply;
|
||||
float _AlphaBoostFA;
|
||||
//ifex _AlphaToCoverage==0 && isNotAnimated(_AlphaToCoverage)
|
||||
float _AlphaToCoverage;
|
||||
float _AlphaSharpenedA2C;
|
||||
float _AlphaMipScale;
|
||||
//endex
|
||||
|
||||
//ifex _AlphaDithering==0 && isNotAnimated(_AlphaDithering)
|
||||
float _AlphaDithering;
|
||||
float _AlphaDitherGradient;
|
||||
float _AlphaDitherBias;
|
||||
//endex
|
||||
|
||||
//ifex _AlphaDistanceFade==0 && isNotAnimated(_AlphaDistanceFade)
|
||||
float _AlphaDistanceFade;
|
||||
float _AlphaDistanceFadeType;
|
||||
float _AlphaDistanceFadeMinAlpha;
|
||||
float _AlphaDistanceFadeMaxAlpha;
|
||||
float _AlphaDistanceFadeMin;
|
||||
float _AlphaDistanceFadeMax;
|
||||
float _AlphaDistanceFadeGlobalMask;
|
||||
float _AlphaDistanceFadeGlobalMaskBlendType;
|
||||
//endex
|
||||
|
||||
//ifex _AlphaFresnel==0 && isNotAnimated(_AlphaFresnel)
|
||||
float _AlphaFresnel;
|
||||
float _AlphaFresnelAlpha;
|
||||
float _AlphaFresnelSharpness;
|
||||
float _AlphaFresnelWidth;
|
||||
float _AlphaFresnelInvert;
|
||||
float _AlphaFresnelGlobalMask;
|
||||
float _AlphaFresnelGlobalMaskBlendType;
|
||||
//endex
|
||||
|
||||
//ifex _AlphaAngular==0 && isNotAnimated(_AlphaAngular)
|
||||
float _AlphaAngular;
|
||||
float _AngleType;
|
||||
float _AngleCompareTo;
|
||||
float3 _AngleForwardDirection;
|
||||
float _CameraAngleMin;
|
||||
float _CameraAngleMax;
|
||||
float _ModelAngleMin;
|
||||
float _ModelAngleMax;
|
||||
float _AngleMinAlpha;
|
||||
float _AlphaAngularGlobalMask;
|
||||
float _AlphaAngularGlobalMaskBlendType;
|
||||
//endex
|
||||
|
||||
//ifex _AlphaAudioLinkEnabled==0 && isNotAnimated(_AlphaAudioLinkEnabled)
|
||||
float _AlphaAudioLinkEnabled;
|
||||
float2 _AlphaAudioLinkAddRange;
|
||||
float _AlphaAudioLinkAddBand;
|
||||
//endex
|
||||
|
||||
float _AlphaGlobalMask;
|
||||
float _AlphaGlobalMaskBlendType;
|
||||
|
||||
#T#PoiAlphaOptionsFunctions
|
||||
void applyAlphaOptions(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiCam poiCam, in PoiMods poiMods)
|
||||
{
|
||||
poiFragData.alpha = saturate(poiFragData.alpha + _AlphaMod);
|
||||
|
||||
if (_AlphaGlobalMask > 0)
|
||||
{
|
||||
poiFragData.alpha = maskBlend(poiFragData.alpha, poiMods.globalMask[_AlphaGlobalMask - 1], _AlphaGlobalMaskBlendType);
|
||||
}
|
||||
|
||||
//ifex _AlphaDistanceFade==0 && isNotAnimated(_AlphaDistanceFade)
|
||||
if (_AlphaDistanceFade)
|
||||
{
|
||||
float3 position = _AlphaDistanceFadeType ? poiMesh.worldPos : poiMesh.objectPosition;
|
||||
float distanceFadeMultiplier = lerp(_AlphaDistanceFadeMinAlpha, _AlphaDistanceFadeMaxAlpha, smoothstep(_AlphaDistanceFadeMin, _AlphaDistanceFadeMax, distance(position, poiCam.worldPos)));
|
||||
if (_AlphaDistanceFadeGlobalMask > 0)
|
||||
{
|
||||
distanceFadeMultiplier = lerp(1, distanceFadeMultiplier, poiMods.globalMask[_AlphaDistanceFadeGlobalMask - 1]);
|
||||
}
|
||||
poiFragData.alpha *= distanceFadeMultiplier;
|
||||
}
|
||||
//endex
|
||||
|
||||
//ifex _AlphaFresnel==0 && isNotAnimated(_AlphaFresnel)
|
||||
if (_AlphaFresnel)
|
||||
{
|
||||
float holoRim = saturate(1 - smoothstep(min(_AlphaFresnelSharpness, _AlphaFresnelWidth), _AlphaFresnelWidth, (poiCam.vDotN)));
|
||||
holoRim = abs(lerp(1, holoRim, _AlphaFresnelAlpha));
|
||||
holoRim = _AlphaFresnelInvert ? 1 - holoRim : holoRim;
|
||||
if (_AlphaFresnelGlobalMask > 0)
|
||||
{
|
||||
holoRim = lerp(1, holoRim, poiMods.globalMask[_AlphaFresnelGlobalMask - 1]);
|
||||
}
|
||||
poiFragData.alpha *= holoRim;
|
||||
}
|
||||
//endex
|
||||
|
||||
//ifex _AlphaAngular==0 && isNotAnimated(_AlphaAngular)
|
||||
if (_AlphaAngular)
|
||||
{
|
||||
half cameraAngleMin = _CameraAngleMin / 180;
|
||||
half cameraAngleMax = _CameraAngleMax / 180;
|
||||
half modelAngleMin = _ModelAngleMin / 180;
|
||||
half modelAngleMax = _ModelAngleMax / 180;
|
||||
float3 pos = _AngleCompareTo == 0 ? poiMesh.objectPosition : poiMesh.worldPos;
|
||||
half3 cameraToModelDirection = normalize(pos - getCameraPosition());
|
||||
half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(_AngleForwardDirection.rgb)));
|
||||
half cameraLookAtModel = remapClamped(cameraAngleMax, cameraAngleMin, .5 * dot(cameraToModelDirection, getCameraForward()) + .5);
|
||||
half modelLookAtCamera = remapClamped(modelAngleMax, modelAngleMin, .5 * dot(-cameraToModelDirection, modelForwardDirection) + .5);
|
||||
float angularAlphaMod = 1;
|
||||
if (_AngleType == 0)
|
||||
{
|
||||
angularAlphaMod = max(cameraLookAtModel, _AngleMinAlpha);
|
||||
}
|
||||
else if (_AngleType == 1)
|
||||
{
|
||||
angularAlphaMod = max(modelLookAtCamera, _AngleMinAlpha);
|
||||
}
|
||||
else if (_AngleType == 2)
|
||||
{
|
||||
angularAlphaMod = max(cameraLookAtModel * modelLookAtCamera, _AngleMinAlpha);
|
||||
}
|
||||
if (_AlphaAngularGlobalMask > 0)
|
||||
{
|
||||
angularAlphaMod = lerp(1, angularAlphaMod, poiMods.globalMask[_AlphaAngularGlobalMask - 1]);
|
||||
}
|
||||
poiFragData.alpha *= angularAlphaMod;
|
||||
}
|
||||
//endex
|
||||
|
||||
//ifex _AlphaAudioLinkEnabled==0 && isNotAnimated(_AlphaAudioLinkEnabled)
|
||||
#ifdef POI_AUDIOLINK
|
||||
if (poiMods.audioLinkAvailable && _AlphaAudioLinkEnabled)
|
||||
{
|
||||
poiFragData.alpha = saturate(poiFragData.alpha + lerp(_AlphaAudioLinkAddRange.x, _AlphaAudioLinkAddRange.y, poiMods.audioLink[_AlphaAudioLinkAddBand]));
|
||||
}
|
||||
#endif
|
||||
//endex
|
||||
|
||||
}
|
||||
|
||||
//ifex _AlphaDithering==0 && isNotAnimated(_AlphaDithering)
|
||||
inline half Dither8x8Bayer(int x, int y)
|
||||
{
|
||||
// Premultiplied by 1/64
|
||||
const half dither[ 64 ] = {
|
||||
0.015625, 0.765625, 0.203125, 0.953125, 0.06250, 0.81250, 0.25000, 1.00000,
|
||||
0.515625, 0.265625, 0.703125, 0.453125, 0.56250, 0.31250, 0.75000, 0.50000,
|
||||
0.140625, 0.890625, 0.078125, 0.828125, 0.18750, 0.93750, 0.12500, 0.87500,
|
||||
0.640625, 0.390625, 0.578125, 0.328125, 0.68750, 0.43750, 0.62500, 0.37500,
|
||||
0.046875, 0.796875, 0.234375, 0.984375, 0.03125, 0.78125, 0.21875, 0.96875,
|
||||
0.546875, 0.296875, 0.734375, 0.484375, 0.53125, 0.28125, 0.71875, 0.46875,
|
||||
0.171875, 0.921875, 0.109375, 0.859375, 0.15625, 0.90625, 0.09375, 0.84375,
|
||||
0.671875, 0.421875, 0.609375, 0.359375, 0.65625, 0.40625, 0.59375, 0.34375
|
||||
};
|
||||
int r = y * 8 + x;
|
||||
return dither[r];
|
||||
}
|
||||
|
||||
half calcDither(half2 grabPos)
|
||||
{
|
||||
return Dither8x8Bayer(glsl_mod(grabPos.x, 8), glsl_mod(grabPos.y, 8));
|
||||
}
|
||||
|
||||
void applyDithering(inout PoiFragData poiFragData, in PoiCam poiCam)
|
||||
{
|
||||
if (_AlphaDithering)
|
||||
{
|
||||
float dither = calcDither(poiCam.posScreenPixels) - _AlphaDitherBias;
|
||||
poiFragData.alpha = saturate(poiFragData.alpha - (dither * (1 - poiFragData.alpha) * _AlphaDitherGradient));
|
||||
}
|
||||
}
|
||||
//endex
|
||||
|
||||
//ifex _AlphaToCoverage==0 && isNotAnimated(_AlphaToCoverage)
|
||||
void ApplyAlphaToCoverage(inout PoiFragData poiFragData, in PoiMesh poiMesh)
|
||||
{
|
||||
// Force Model Opacity to 1 if desired
|
||||
UNITY_BRANCH
|
||||
if (_Mode == 1)
|
||||
{
|
||||
UNITY_BRANCH
|
||||
if (_AlphaSharpenedA2C && _AlphaToCoverage)
|
||||
{
|
||||
// rescale alpha by mip level
|
||||
poiFragData.alpha *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * _MainTex_TexelSize.zw)) * _AlphaMipScale;
|
||||
// rescale alpha by partial derivative
|
||||
poiFragData.alpha = (poiFragData.alpha - _Cutoff) / max(fwidth(poiFragData.alpha), 0.0001) + _Cutoff;
|
||||
poiFragData.alpha = saturate(poiFragData.alpha);
|
||||
}
|
||||
}
|
||||
}
|
||||
//endex
|
||||
|
||||
#T#PoiAlphaOptionsFunctionCall
|
||||
applyAlphaOptions(poiFragData, poiMesh, poiCam, poiMods);
|
||||
|
||||
#T#PoiAlphaOptionsDitherFunctionCall
|
||||
//ifex _AlphaDithering==0 && isNotAnimated(_AlphaDithering)
|
||||
applyDithering(poiFragData, poiCam);
|
||||
//endex
|
||||
|
||||
#T#PoiAlphaOptionsForceOpaque
|
||||
#if !defined(POI_PASS_BASETWO) && !defined(POI_PASS_ADDTWO)
|
||||
poiFragData.alpha = _AlphaForceOpaque ? 1 : poiFragData.alpha;
|
||||
#else
|
||||
poiFragData.alpha = _AlphaForceOpaque2 ? 1 : poiFragData.alpha;
|
||||
#endif
|
||||
|
||||
#T#PoiAlphaToCoverageFunctionCall
|
||||
//ifex _AlphaToCoverage==0 && isNotAnimated(_AlphaToCoverage)
|
||||
ApplyAlphaToCoverage(poiFragData, poiMesh);
|
||||
//endex
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c6bcf2ea34623741a36552a6c678ea3
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f465b1b014823343854e4bf41297fdf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,88 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiAudioLink
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiAudioLink
|
||||
Name: Poi Audio Link
|
||||
Version:
|
||||
Author:
|
||||
Description:
|
||||
AllowDuplicates: 0
|
||||
ForceDuplicateLogic: 0
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: -7419410332106174641, guid: 1be7b43adb0e07543b4687f3e0f50e1f,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- EXTRAS_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 0
|
||||
- Template: {fileID: -4077475223260929287, guid: 1be7b43adb0e07543b4687f3e0f50e1f,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- DEPTHNORMAL_PASS_KEYWORDS
|
||||
- OUTLINE_PASS_KEYWORDS
|
||||
- EARLYZ_PASS_KEYWORDS
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
- SHADOW_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 4910312744796953162, guid: 1be7b43adb0e07543b4687f3e0f50e1f,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- MACROS_AND_DEFINES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 4096923687103298880, guid: 1be7b43adb0e07543b4687f3e0f50e1f,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- SHADOW_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
- OUTLINE_PROPERTY_VARIABLES
|
||||
- EARLYZ_PROPERTY_VARIABLES
|
||||
- DEPTHNORMAL_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 8714289124560104235, guid: 1be7b43adb0e07543b4687f3e0f50e1f,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- VERTEX_BASE_FUNCTIONS_EARLY
|
||||
- VERTEX_ADD_FUNCTIONS_EARLY
|
||||
- VERTEX_SHADOW_FUNCTIONS_EARLY
|
||||
- VERTEX_META_FUNCTIONS_EARLY
|
||||
- VERTEX_OUTLINE_FUNCTIONS_EARLY
|
||||
- VERTEX_EARLYZ_FUNCTIONS_EARLY
|
||||
- VERTEX_DEPTHNORMAL_FUNCTIONS_EARLY
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -2835084315498978105, guid: 1be7b43adb0e07543b4687f3e0f50e1f,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_INIT
|
||||
- FRAGMENT_ADD_INIT
|
||||
- FRAGMENT_SHADOW_INIT
|
||||
- FRAGMENT_META_INIT
|
||||
- FRAGMENT_OUTLINE_INIT
|
||||
- FRAGMENT_DEPTHNORMAL_INIT
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87ca4a92adfc6d24f8f9bef432acf14a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,456 @@
|
||||
#T#PoiAudioLinkProperties
|
||||
//ifex _EnableAudioLink==0
|
||||
[HideInInspector] m_AudioLinkCategory (" Audio Link--{reference_property:_EnableAudioLink, button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/audio-link/},hover:Documentation}}", Float) = 0
|
||||
[HideInInspector] m_start_audioLink ("Audio Link", Float) = 0
|
||||
[HideInInspector][ThryToggle(POI_AUDIOLINK)] _EnableAudioLink ("Enabled", Float) = 0
|
||||
[Helpbox(1)] _AudioLinkHelp ("This section houses the global controls for audio link. Controls for individual features are in their respective sections. (Emission, Dissolve, etc...)", Int) = 0
|
||||
[ToggleUI] _AudioLinkAnimToggle ("Anim Toggle", Float) = 1
|
||||
/*
|
||||
_AudioLinkDelay ("Delay", Range(0, 1)) = 0
|
||||
[ToggleUI]_AudioLinkCCStripY ("CC Strip Y UV", Float) = 0
|
||||
*/
|
||||
[ThryHeaderLabel(Smoothing)]
|
||||
_AudioLinkSmoothingBass ("Bass", Range(0, 1)) = 0
|
||||
_AudioLinkSmoothingLowMid ("Low Mid", Range(0, 1)) = 0
|
||||
_AudioLinkSmoothingHighMid ("High Mid", Range(0, 1)) = 0
|
||||
_AudioLinkSmoothingTreble ("Treble", Range(0, 1)) = 0
|
||||
[HideInInspector] m_end_audioLink ("Audio Link", Float) = 0
|
||||
|
||||
[HideInInspector] m_start_audioLinkOverrides ("Overrides", Float) = 0
|
||||
[HideInInspector] s_start_AudioLinkBandOverrides ("Band Overrides--{reference_property:_AudioLinkBandOverridesEnabled,persistent_expand:true,default_expand:true}", Float) = 1
|
||||
[HideInInspector][ToggleUI] _AudioLinkBandOverridesEnabled ("Band Overrides", Float) = 0
|
||||
[VectorToSliders(Bass, 0, 1, Low Mid, 0, 1, High Mid, 0, 1, Treble, 0, 1)]_AudioLinkBandOverrideSliders ("Band Override Sliders", Vector) = (0, 0, 0, 0)
|
||||
[HideInInspector] s_end_AudioLinkBandOverrides ("Audio Link", Float) = 0
|
||||
[HideInInspector] m_end_audioLinkOverrides ("Overrides", Float) = 0
|
||||
//endex
|
||||
#K#AUDIOLINK_PROPERTIES
|
||||
#T#PoiAudioLinkKeywords
|
||||
//ifex _EnableAudioLink==0
|
||||
#pragma shader_feature_local POI_AUDIOLINK
|
||||
//endex
|
||||
|
||||
#T#PoiAudioLinkMacrosAndDefines
|
||||
//ifex _EnableAudioLink==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
// Map of where features in AudioLink are.
|
||||
#define ALPASS_DFT uint2(0, 4) //Size: 128, 2
|
||||
#define ALPASS_WAVEFORM uint2(0, 6) //Size: 128, 16
|
||||
#define ALPASS_AUDIOLINK uint2(0, 0) //Size: 128, 4
|
||||
#define ALPASS_AUDIOBASS uint2(0, 0) //Size: 128, 1
|
||||
#define ALPASS_AUDIOLOWMIDS uint2(0, 1) //Size: 128, 1
|
||||
#define ALPASS_AUDIOHIGHMIDS uint2(0, 2) //Size: 128, 1
|
||||
#define ALPASS_AUDIOTREBLE uint2(0, 3) //Size: 128, 1
|
||||
#define ALPASS_AUDIOLINKHISTORY uint2(1, 0) //Size: 127, 4
|
||||
#define ALPASS_GENERALVU uint2(0, 22) //Size: 12, 1
|
||||
#define ALPASS_CCINTERNAL uint2(12, 22) //Size: 12, 2
|
||||
#define ALPASS_CCCOLORS uint2(25, 22) //Size: 11, 1
|
||||
#define ALPASS_CCSTRIP uint2(0, 24) //Size: 128, 1
|
||||
#define ALPASS_CCLIGHTS uint2(0, 25) //Size: 128, 2
|
||||
#define ALPASS_AUTOCORRELATOR uint2(0, 27) //Size: 128, 1
|
||||
#define ALPASS_GENERALVU_INSTANCE_TIME uint2(2, 22)
|
||||
#define ALPASS_GENERALVU_LOCAL_TIME uint2(3, 22)
|
||||
#define ALPASS_GENERALVU_NETWORK_TIME uint2(4, 22)
|
||||
#define ALPASS_GENERALVU_PLAYERINFO uint2(6, 22)
|
||||
// Added in version 2.5
|
||||
#define ALPASS_FILTEREDAUDIOLINK uint2(0, 28) //Size: 16, 4
|
||||
// Added in version 2.6
|
||||
#define ALPASS_CHRONOTENSITY uint2(16, 28) //Size: 8, 4
|
||||
#define ALPASS_THEME_COLOR0 uint2(0, 23)
|
||||
#define ALPASS_THEME_COLOR1 uint2(1, 23)
|
||||
#define ALPASS_THEME_COLOR2 uint2(2, 23)
|
||||
#define ALPASS_THEME_COLOR3 uint2(3, 23)
|
||||
#define ALPASS_FILTEREDVU uint2(24, 28) //Size: 4, 4
|
||||
#define ALPASS_FILTEREDVU_INTENSITY uint2(24, 28) //Size: 4, 1
|
||||
#define ALPASS_FILTEREDVU_MARKER uint2(24, 29) //Size: 4, 1
|
||||
|
||||
// Some basic constants to use (Note, these should be compatible with
|
||||
// future version of AudioLink, but may change.
|
||||
#define AUDIOLINK_SAMPHIST 3069 // Internal use for algos, do not change.
|
||||
#define AUDIOLINK_SAMPLEDATA24 2046
|
||||
#define AUDIOLINK_EXPBINS 24
|
||||
#define AUDIOLINK_EXPOCT 10
|
||||
#define AUDIOLINK_ETOTALBINS (AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT)
|
||||
#define AUDIOLINK_WIDTH 128
|
||||
#define AUDIOLINK_SPS 48000 // Samples per second
|
||||
#define AUDIOLINK_ROOTNOTE 0
|
||||
#define AUDIOLINK_4BAND_FREQFLOOR 0.123
|
||||
#define AUDIOLINK_4BAND_FREQCEILING 1
|
||||
#define AUDIOLINK_BOTTOM_FREQUENCY 13.75
|
||||
#define AUDIOLINK_BASE_AMPLITUDE 2.5
|
||||
#define AUDIOLINK_DELAY_COEFFICIENT_MIN 0.3
|
||||
#define AUDIOLINK_DELAY_COEFFICIENT_MAX 0.9
|
||||
#define AUDIOLINK_DFT_Q 4.0
|
||||
#define AUDIOLINK_TREBLE_CORRECTION 5.0
|
||||
|
||||
// ColorChord constants
|
||||
#define COLORCHORD_EMAXBIN 192
|
||||
#define COLORCHORD_IIR_DECAY_1 0.90
|
||||
#define COLORCHORD_IIR_DECAY_2 0.85
|
||||
#define COLORCHORD_CONSTANT_DECAY_1 0.01
|
||||
#define COLORCHORD_CONSTANT_DECAY_2 0.0
|
||||
#define COLORCHORD_NOTE_CLOSEST 3.0
|
||||
#define COLORCHORD_NEW_NOTE_GAIN 8.0
|
||||
#define COLORCHORD_MAX_NOTES 10
|
||||
|
||||
uniform float4 _AudioTexture_TexelSize;
|
||||
|
||||
#ifdef SHADER_TARGET_SURFACE_ANALYSIS
|
||||
#define AUDIOLINK_STANDARD_INDEXING
|
||||
#endif
|
||||
|
||||
// Mechanism to index into texture.
|
||||
#ifdef AUDIOLINK_STANDARD_INDEXING
|
||||
sampler2D _AudioTexture;
|
||||
#define AudioLinkData(xycoord) tex2Dlod(_AudioTexture, float4(uint2(xycoord) * _AudioTexture_TexelSize.xy, 0, 0))
|
||||
#else
|
||||
uniform Texture2D<float4> _AudioTexture;
|
||||
SamplerState sampler_AudioTexture;
|
||||
#define AudioLinkData(xycoord) _AudioTexture[uint2(xycoord)]
|
||||
#endif
|
||||
uniform sampler2D _Stored;
|
||||
uniform float4 _Stored_TexelSize;
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiAudioLinkVariables
|
||||
//ifex _EnableAudioLink==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
float _AudioLinkDelay;
|
||||
float _AudioLinkAnimToggle;
|
||||
|
||||
float _AudioLinkSmoothingBass;
|
||||
float _AudioLinkSmoothingLowMid;
|
||||
float _AudioLinkSmoothingHighMid;
|
||||
float _AudioLinkSmoothingTreble;
|
||||
|
||||
float _DebugWaveform;
|
||||
float _DebugDFT;
|
||||
float _DebugBass;
|
||||
float _DebugLowMids;
|
||||
float _DebugHighMids;
|
||||
float _DebugTreble;
|
||||
float _DebugCCColors;
|
||||
float _DebugCCStrip;
|
||||
float _DebugCCLights;
|
||||
float _DebugAutocorrelator;
|
||||
float _DebugChronotensity;
|
||||
float _AudioLinkCCStripY;
|
||||
|
||||
float _AudioLinkBandOverridesEnabled;
|
||||
float4 _AudioLinkBandOverrideSliders;
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiAudioLinkFunctions
|
||||
//ifex _EnableAudioLink==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
|
||||
// Convenient mechanism to read from the AudioLink texture that handles reading off the end of one line and onto the next above it.
|
||||
float4 AudioLinkDataMultiline(uint2 xycoord)
|
||||
{
|
||||
return AudioLinkData(uint2(xycoord.x % AUDIOLINK_WIDTH, xycoord.y + xycoord.x / AUDIOLINK_WIDTH));
|
||||
}
|
||||
|
||||
// Mechanism to sample between two adjacent pixels and lerp between them, like "linear" supesampling
|
||||
float4 AudioLinkLerp(float2 xy)
|
||||
{
|
||||
return lerp(AudioLinkData(xy), AudioLinkData(xy + int2(1, 0)), frac(xy.x));
|
||||
}
|
||||
|
||||
// Same as AudioLinkLerp but properly handles multiline reading.
|
||||
float4 AudioLinkLerpMultiline(float2 xy)
|
||||
{
|
||||
return lerp(AudioLinkDataMultiline(xy), AudioLinkDataMultiline(xy + float2(1, 0)), frac(xy.x));
|
||||
}
|
||||
|
||||
//Tests to see if Audio Link texture is available
|
||||
bool AudioLinkIsAvailable()
|
||||
{
|
||||
if (_AudioLinkAnimToggle == 0) return false;
|
||||
#if !defined(AUDIOLINK_STANDARD_INDEXING)
|
||||
int width, height;
|
||||
_AudioTexture.GetDimensions(width, height);
|
||||
return width > 16;
|
||||
#else
|
||||
return _AudioTexture_TexelSize.z > 16;
|
||||
#endif
|
||||
}
|
||||
|
||||
//Get version of audiolink present in the world, 0 if no audiolink is present
|
||||
float AudioLinkGetVersion()
|
||||
{
|
||||
int2 dims;
|
||||
#if !defined(AUDIOLINK_STANDARD_INDEXING)
|
||||
_AudioTexture.GetDimensions(dims.x, dims.y);
|
||||
#else
|
||||
dims = _AudioTexture_TexelSize.zw;
|
||||
#endif
|
||||
|
||||
if (dims.x >= 128)
|
||||
return AudioLinkData(ALPASS_GENERALVU).x;
|
||||
else if (dims.x > 16)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
// This pulls data from this texture.
|
||||
#define AudioLinkGetSelfPixelData(xy) _SelfTexture2D[xy]
|
||||
|
||||
// Extra utility functions for time.
|
||||
uint AudioLinkDecodeDataAsUInt(uint2 indexloc)
|
||||
{
|
||||
uint4 rpx = AudioLinkData(indexloc);
|
||||
return rpx.r + rpx.g * 1024 + rpx.b * 1048576 + rpx.a * 1073741824;
|
||||
}
|
||||
|
||||
//Note: This will truncate time to every 134,217.728 seconds (~1.5 days of an instance being up) to prevent floating point aliasing.
|
||||
// if your code will alias sooner, you will need to use a different function. It should be safe to use this on all times.
|
||||
float AudioLinkDecodeDataAsSeconds(uint2 indexloc)
|
||||
{
|
||||
uint time = AudioLinkDecodeDataAsUInt(indexloc) & 0x7ffffff;
|
||||
//Can't just divide by float. Bug in Unity's HLSL compiler.
|
||||
return float(time / 1000) + float(time % 1000) / 1000.;
|
||||
}
|
||||
|
||||
#define ALDecodeDataAsSeconds(x) AudioLinkDecodeDataAsSeconds(x)
|
||||
#define ALDecodeDataAsUInt(x) AudioLinkDecodeDataAsUInt(x)
|
||||
|
||||
float AudioLinkRemap(float t, float a, float b, float u, float v)
|
||||
{
|
||||
return ((t - a) / (b - a)) * (v - u) + u;
|
||||
}
|
||||
|
||||
float3 AudioLinkHSVtoRGB(float3 HSV)
|
||||
{
|
||||
float3 RGB = 0;
|
||||
float C = HSV.z * HSV.y;
|
||||
float H = HSV.x * 6;
|
||||
float X = C * (1 - abs(fmod(H, 2) - 1));
|
||||
if (HSV.y != 0)
|
||||
{
|
||||
float I = floor(H);
|
||||
if (I == 0)
|
||||
{
|
||||
RGB = float3(C, X, 0);
|
||||
}
|
||||
else if (I == 1)
|
||||
{
|
||||
RGB = float3(X, C, 0);
|
||||
}
|
||||
else if (I == 2)
|
||||
{
|
||||
RGB = float3(0, C, X);
|
||||
}
|
||||
else if (I == 3)
|
||||
{
|
||||
RGB = float3(0, X, C);
|
||||
}
|
||||
else if (I == 4)
|
||||
{
|
||||
RGB = float3(X, 0, C);
|
||||
}
|
||||
else
|
||||
{
|
||||
RGB = float3(C, 0, X);
|
||||
}
|
||||
}
|
||||
float M = HSV.z - C;
|
||||
return RGB + M;
|
||||
}
|
||||
|
||||
float3 AudioLinkCCtoRGB(float bin, float intensity, int rootNote)
|
||||
{
|
||||
float note = bin / AUDIOLINK_EXPBINS;
|
||||
|
||||
float hue = 0.0;
|
||||
note *= 12.0;
|
||||
note = glsl_mod(4. - note + rootNote, 12.0);
|
||||
{
|
||||
if (note < 4.0)
|
||||
{
|
||||
//Needs to be YELLOW->RED
|
||||
hue = (note) / 24.0;
|
||||
}
|
||||
else if (note < 8.0)
|
||||
{
|
||||
// [4] [8]
|
||||
//Needs to be RED->BLUE
|
||||
hue = (note - 2.0) / 12.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// [8] [12]
|
||||
//Needs to be BLUE->YELLOW
|
||||
hue = (note - 4.0) / 8.0;
|
||||
}
|
||||
}
|
||||
float val = intensity - 0.1;
|
||||
return AudioLinkHSVtoRGB(float3(fmod(hue, 1.0), 1.0, clamp(val, 0.0, 1.0)));
|
||||
}
|
||||
|
||||
// Sample the amplitude of a given frequency in the DFT, supports frequencies in [13.75; 14080].
|
||||
float4 AudioLinkGetAmplitudeAtFrequency(float hertz)
|
||||
{
|
||||
float note = AUDIOLINK_EXPBINS * log2(hertz / AUDIOLINK_BOTTOM_FREQUENCY);
|
||||
return AudioLinkLerpMultiline(ALPASS_DFT + float2(note, 0));
|
||||
}
|
||||
|
||||
// Sample the amplitude of a given semitone in an octave. Octave is in [0; 9] while note is [0; 11].
|
||||
float AudioLinkGetAmplitudeAtNote(float octave, float note)
|
||||
{
|
||||
float quarter = note * 2.0;
|
||||
return AudioLinkLerpMultiline(ALPASS_DFT + float2(octave * AUDIOLINK_EXPBINS + quarter, 0));
|
||||
}
|
||||
|
||||
// Get a reasonable drop-in replacement time value for _Time.y with the
|
||||
// given chronotensity index [0; 7] and AudioLink band [0; 3].
|
||||
float AudioLinkGetChronoTime(uint index, uint band)
|
||||
{
|
||||
return (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(index, band))) / 100000.0;
|
||||
}
|
||||
|
||||
// Get a chronotensity value in the interval [0; 1], modulated by the speed input,
|
||||
// with the given chronotensity index [0; 7] and AudioLink band [0; 3].
|
||||
float AudioLinkGetChronoTimeNormalized(uint index, uint band, float speed)
|
||||
{
|
||||
return frac(AudioLinkGetChronoTime(index, band) * speed);
|
||||
}
|
||||
|
||||
// Get a chronotensity value in the interval [0; interval], modulated by the speed input,
|
||||
// with the given chronotensity index [0; 7] and AudioLink band [0; 3].
|
||||
float AudioLinkGetChronoTimeInterval(uint index, uint band, float speed, float interval)
|
||||
{
|
||||
return AudioLinkGetChronoTimeNormalized(index, band, speed) * interval;
|
||||
}
|
||||
|
||||
float getBandAtTime(float band, float time, float size = 1.0f)
|
||||
{
|
||||
//return remap(UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, band/128.0)).r, min(size,.9999), 1);
|
||||
return remapClamped(min(size, .9999), 1, AudioLinkData(ALPASS_AUDIOBASS + uint2(time * AUDIOLINK_WIDTH, band)).r);
|
||||
}
|
||||
|
||||
fixed3 maximize(fixed3 c)
|
||||
{
|
||||
if (c.x == 0 && c.y == 0 && c.z == 0)
|
||||
return fixed3(1.0, 1.0, 1.0);
|
||||
else
|
||||
return c / max(c.r, max(c.g, c.b));
|
||||
}
|
||||
|
||||
void initPoiAudioLink(inout PoiMods poiMods)
|
||||
{
|
||||
if (!_AudioLinkAnimToggle) return;
|
||||
|
||||
if (AudioLinkIsAvailable())
|
||||
{
|
||||
poiMods.audioLinkAvailable = true;
|
||||
poiMods.audioLinkVersion = AudioLinkGetVersion();
|
||||
poiMods.audioLink[0] = _AudioLinkSmoothingBass == 0 ? AudioLinkData(ALPASS_AUDIOLINK + float2(0, 0))[0] : AudioLinkData(ALPASS_FILTEREDAUDIOLINK + float2((1 - _AudioLinkSmoothingBass) * 15.95, 0))[0];
|
||||
poiMods.audioLink[1] = _AudioLinkSmoothingLowMid == 0 ? AudioLinkData(ALPASS_AUDIOLINK + float2(0, 1))[0] : AudioLinkData(ALPASS_FILTEREDAUDIOLINK + float2((1 - _AudioLinkSmoothingLowMid) * 15.95, 1))[0];
|
||||
poiMods.audioLink[2] = _AudioLinkSmoothingHighMid == 0 ? AudioLinkData(ALPASS_AUDIOLINK + float2(0, 2))[0] : AudioLinkData(ALPASS_FILTEREDAUDIOLINK + float2((1 - _AudioLinkSmoothingHighMid) * 15.95, 2))[0];
|
||||
poiMods.audioLink[3] = _AudioLinkSmoothingTreble == 0 ? AudioLinkData(ALPASS_AUDIOLINK + float2(0, 3))[0] : AudioLinkData(ALPASS_FILTEREDAUDIOLINK + float2((1 - _AudioLinkSmoothingTreble) * 15.95, 3))[0];
|
||||
poiMods.audioLink[4] = AudioLinkData(ALPASS_GENERALVU + float2(8, 0))[0];
|
||||
/*
|
||||
poiMods.globalColorTheme[4] = AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) );
|
||||
poiMods.globalColorTheme[5] = AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) );
|
||||
poiMods.globalColorTheme[6] = AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) );
|
||||
poiMods.globalColorTheme[7] = AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) );
|
||||
|
||||
poiMods.globalColorTheme[4] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 0, 0 ) )),1.0);
|
||||
poiMods.globalColorTheme[5] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 1, 0 ) )),1.0);
|
||||
poiMods.globalColorTheme[6] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 2, 0 ) )),1.0);
|
||||
poiMods.globalColorTheme[7] = float4(maximize(AudioLinkData( ALPASS_CCCOLORS + uint2( 3, 0 ) )),1.0);
|
||||
*/
|
||||
|
||||
poiMods.globalColorTheme[4] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(2, 0))[0], AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0);
|
||||
poiMods.globalColorTheme[5] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(3, 0))[0], AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0);
|
||||
poiMods.globalColorTheme[6] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(4, 0))[0], AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0);
|
||||
poiMods.globalColorTheme[7] = float4(AudioLinkCCtoRGB(glsl_mod(AudioLinkData(ALPASS_CCINTERNAL + uint2(5, 0))[0], AUDIOLINK_EXPBINS), 1, AUDIOLINK_ROOTNOTE), 1.0);
|
||||
|
||||
poiMods.globalColorTheme[8] = AudioLinkData(ALPASS_THEME_COLOR0);
|
||||
poiMods.globalColorTheme[9] = AudioLinkData(ALPASS_THEME_COLOR1);
|
||||
poiMods.globalColorTheme[10] = AudioLinkData(ALPASS_THEME_COLOR2);
|
||||
poiMods.globalColorTheme[11] = AudioLinkData(ALPASS_THEME_COLOR3);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_AudioLinkBandOverridesEnabled)
|
||||
{
|
||||
poiMods.audioLinkAvailable = true;
|
||||
poiMods.audioLink[0] = _AudioLinkBandOverrideSliders.x;
|
||||
poiMods.audioLink[1] = _AudioLinkBandOverrideSliders.y;
|
||||
poiMods.audioLink[2] = _AudioLinkBandOverrideSliders.z;
|
||||
poiMods.audioLink[3] = _AudioLinkBandOverrideSliders.w;
|
||||
}
|
||||
}
|
||||
|
||||
void DebugVisualizer(inout PoiFragData poiFragData, in PoiMesh poiMesh, in PoiMods poiMods)
|
||||
{
|
||||
if (_DebugWaveform)
|
||||
{
|
||||
float waveform = AudioLinkLerpMultiline(ALPASS_WAVEFORM + float2(500. * poiMesh.uv[0].x, 0)).r;
|
||||
poiFragData.emission += clamp(1 - 50 * abs(waveform - poiMesh.uv[0].y * 2. + 1), 0, 1);
|
||||
}
|
||||
if (_DebugDFT)
|
||||
{
|
||||
poiFragData.emission += AudioLinkLerpMultiline(ALPASS_DFT + uint2(poiMesh.uv[0].x * AUDIOLINK_ETOTALBINS, 0)).rrr;
|
||||
}
|
||||
if (_DebugBass)
|
||||
{
|
||||
poiFragData.emission += poiMods.audioLink[0];
|
||||
}
|
||||
if (_DebugLowMids)
|
||||
{
|
||||
poiFragData.emission += poiMods.audioLink[1];
|
||||
}
|
||||
if (_DebugHighMids)
|
||||
{
|
||||
poiFragData.emission += poiMods.audioLink[2];
|
||||
}
|
||||
if (_DebugTreble)
|
||||
{
|
||||
poiFragData.emission += poiMods.audioLink[3];
|
||||
}
|
||||
if (_DebugCCColors)
|
||||
{
|
||||
poiFragData.emission += AudioLinkData(ALPASS_CCCOLORS + uint2(3 + 1, 0));
|
||||
}
|
||||
if (_DebugCCStrip)
|
||||
{
|
||||
poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].x * AUDIOLINK_WIDTH, 0));
|
||||
}
|
||||
if (_DebugCCLights)
|
||||
{
|
||||
poiFragData.emission += AudioLinkData(ALPASS_CCLIGHTS + uint2(uint(poiMesh.uv[0].x * 8) + uint(poiMesh.uv[0].y * 16) * 8, 0));
|
||||
}
|
||||
if (_DebugAutocorrelator)
|
||||
{
|
||||
poiFragData.emission += saturate(AudioLinkLerp(ALPASS_AUTOCORRELATOR + float2((abs(1. - poiMesh.uv[0].x * 2.)) * AUDIOLINK_WIDTH, 0)).rrr);
|
||||
}
|
||||
if (_DebugChronotensity)
|
||||
{
|
||||
poiFragData.emission += (AudioLinkDecodeDataAsUInt(ALPASS_CHRONOTENSITY + uint2(1, 0)) % 1000000) / 1000000.0;
|
||||
}
|
||||
}
|
||||
|
||||
void SetupAudioLink(inout PoiFragData poiFragData, inout PoiMods poiMods, in PoiMesh poiMesh)
|
||||
{
|
||||
initPoiAudioLink(poiMods);
|
||||
DebugVisualizer(poiFragData, poiMesh, poiMods);
|
||||
|
||||
if (_AudioLinkCCStripY)
|
||||
{
|
||||
poiFragData.emission += AudioLinkLerp(ALPASS_CCSTRIP + float2(poiMesh.uv[0].y * AUDIOLINK_WIDTH, 0)).rgb * .5;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiAudioLinkFunctionCalls
|
||||
//ifex _EnableAudioLink==0
|
||||
#ifdef POI_AUDIOLINK
|
||||
SetupAudioLink(poiFragData, poiMods, poiMesh);
|
||||
#endif
|
||||
//endex
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1be7b43adb0e07543b4687f3e0f50e1f
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a620568a49f87349b7478e5fdb6f02d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiBackface
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiBackFace
|
||||
Name: Poi Back Face
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: -3101754527048639204, guid: 837549448592a3a4ea33a7aa0e689f00,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- MAIN_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 6702876446688562091, guid: 837549448592a3a4ea33a7aa0e689f00,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- DEPTHNORMAL_PASS_KEYWORDS
|
||||
- OUTLINE_PASS_KEYWORDS
|
||||
- EARLYZ_PASS_KEYWORDS
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
- SHADOW_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 9198516683745240821, guid: 837549448592a3a4ea33a7aa0e689f00,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- SHADOW_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 3739020101595156813, guid: 837549448592a3a4ea33a7aa0e689f00,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
- FRAGMENT_SHADOW_FUNCTIONS
|
||||
- FRAGMENT_META_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -2703058238815093264, guid: 837549448592a3a4ea33a7aa0e689f00,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_COLOR
|
||||
- FRAGMENT_ADD_COLOR
|
||||
- FRAGMENT_SHADOW_COLOR
|
||||
- FRAGMENT_META_COLOR
|
||||
NeedsVariant: 0
|
||||
Queue: 10
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e5f5acfca7186c42ad0956d45397b4f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,120 @@
|
||||
#T#PoiBackFaceProperties
|
||||
//ifex _BackFaceEnabled!=1
|
||||
// Back Face Textures and Emission
|
||||
[HideInInspector] m_start_backFace (" Back Face--{reference_property:_BackFaceEnabled,button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/color-and-normals/back-face},hover:Documentation}}", Float) = 0
|
||||
[HideInInspector][ThryToggle(POI_BACKFACE)]_BackFaceEnabled ("Backface Enabled", Float) = 0
|
||||
_BackFaceColor ("Color--{reference_property:_BackFaceColorThemeIndex}", Color) = (1, 1, 1, 1)
|
||||
[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _BackFaceColorThemeIndex ("", Int) = 0
|
||||
[sRGBWarning(true)]_BackFaceTexture ("Texture--{reference_properties:[_BackFaceTexturePan, _BackFaceTextureUV]}", 2D) = "white" { }
|
||||
[HideInInspector][Vector2]_BackFaceTexturePan ("Panning", Vector) = (0, 0, 0, 0)
|
||||
[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos, 5, Local Pos, 8, Polar UV, 6, Distorted UV, 7, Matcap, 9)]_BackFaceTextureUV ("UV#", Int) = 0
|
||||
[sRGBWarning]_BackFaceMask ("Mask--{reference_properties:[_BackFaceMaskPan, _BackFaceMaskUV, _BackFaceMaskChannel]}", 2D) = "white" { }
|
||||
[HideInInspector][Vector2]_BackFaceMaskPan ("Panning", Vector) = (0, 0, 0, 0)
|
||||
[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos, 5, Local Pos, 8, Polar UV, 6, Distorted UV, 7, Matcap, 9)]_BackFaceMaskUV ("UV#", Int) = 0
|
||||
[HideInInspector][Enum(R, 0, G, 1, B, 2, A, 3)]_BackFaceMaskChannel ("Channel", Float) = 0
|
||||
_BackFaceEmissionStrength ("Emission Strength", Range(0, 20)) = 0
|
||||
|
||||
[HideInInspector] s_start_BackFaceHueShift ("Hue Shift--{reference_property:_BackFaceHueShiftEnabled,persistent_expand:true}", Float) = 0
|
||||
[HideInInspector][ToggleUI]_BackFaceHueShiftEnabled ("Hue Shift", Float) = 0
|
||||
[ThryWideEnum(OKLab, 0, HSV, 1)] _BackFaceShiftColorSpace ("Color Space", Int) = 0
|
||||
[ThryWideEnum(Hue Select, 0, Hue Shift, 1)] _BackFaceHueSelectOrShift ("Select or Shift", Int) = 1
|
||||
_BackFaceHueShift ("Shift", Range(0, 1)) = 0
|
||||
_BackFaceHueShiftSpeed ("Shift Speed", Float) = 0
|
||||
[HideInInspector] s_end_BackFaceHueShift ("Hue Shift", Float) = 0
|
||||
|
||||
[HideInInspector] s_start_BackfaceMods ("Backface Mods--{persistent_expand:true,default_expand:false}", Float) = 0
|
||||
_BackFaceDetailIntensity ("Detail Intensity", Range(0, 5)) = 1
|
||||
[ToggleUI]_BackFaceReplaceAlpha ("Replace Alpha", Float) = 0
|
||||
_BackFaceEmissionLimiter ("Global Emission Multiplier", Float) = 1
|
||||
[HideInInspector] s_end_BackfaceMods ("Backface Mods", Float) = 0
|
||||
[HideInInspector] m_end_backFace ("Back Face", Float) = 0
|
||||
//endex
|
||||
#T#PoiBackFaceKeywords
|
||||
//ifex _BackFaceEnabled!=1
|
||||
#pragma shader_feature_local POI_BACKFACE
|
||||
//endex
|
||||
|
||||
#T#PoiBackFaceVariables
|
||||
//ifex _BackFaceEnabled!=1
|
||||
#ifdef POI_BACKFACE
|
||||
float _BackFaceEnabled;
|
||||
float _BackFaceDetailIntensity;
|
||||
float _BackFaceEmissionStrength;
|
||||
float2 _BackFacePanning;
|
||||
float4 _BackFaceColor;
|
||||
float _BackFaceColorThemeIndex;
|
||||
float _BackFaceReplaceAlpha;
|
||||
|
||||
#if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED)
|
||||
Texture2D _BackFaceTexture;
|
||||
#endif
|
||||
float4 _BackFaceTexture_ST;
|
||||
float2 _BackFaceTexturePan;
|
||||
float _BackFaceTextureUV;
|
||||
|
||||
#if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
Texture2D _BackFaceMask;
|
||||
#endif
|
||||
float4 _BackFaceMask_ST;
|
||||
float2 _BackFaceMaskPan;
|
||||
float _BackFaceMaskUV;
|
||||
float _BackFaceMaskChannel;
|
||||
|
||||
float _BackFaceHueShiftEnabled;
|
||||
float _BackFaceHueShift;
|
||||
float _BackFaceShiftColorSpace;
|
||||
float _BackFaceHueShiftSpeed;
|
||||
float _BackFaceEmissionLimiter;
|
||||
float _BackFaceHueSelectOrShift;
|
||||
#endif
|
||||
|
||||
//TODO detail strength stuff
|
||||
//endex
|
||||
#T#PoiBackFaceFunction
|
||||
//ifex _BackFaceEnabled!=1
|
||||
#ifdef POI_BACKFACE
|
||||
void ApplyBackFaceColor(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiMods poiMods)
|
||||
{
|
||||
if (!poiMesh.isFrontFace)
|
||||
{
|
||||
float4 backFaceColor = _BackFaceColor;
|
||||
backFaceColor.rgb = poiThemeColor(poiMods, backFaceColor.rgb, _BackFaceColorThemeIndex);
|
||||
#if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED)
|
||||
backFaceColor *= POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiUV(poiMesh.uv[_BackFaceTextureUV], _BackFaceTexture_ST), _BackFaceTexturePan);
|
||||
#endif
|
||||
|
||||
if (_BackFaceHueShiftEnabled)
|
||||
{
|
||||
backFaceColor.rgb = hueShift(backFaceColor.rgb, frac(_BackFaceHueShift + _BackFaceHueShiftSpeed * _Time.x), _BackFaceShiftColorSpace, _BackFaceHueSelectOrShift);
|
||||
}
|
||||
|
||||
float backFaceMask = 1;
|
||||
#if defined(PROP_BACKFACEMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
backFaceMask *= POI2D_SAMPLER_PAN(_BackFaceMask, _MainTex, poiUV(poiMesh.uv[_BackFaceMaskUV], _BackFaceMask_ST), _BackFaceMaskPan)[_BackFaceMaskChannel];
|
||||
#endif
|
||||
if (!_BackFaceReplaceAlpha)
|
||||
{
|
||||
backFaceMask *= backFaceColor.a;
|
||||
}
|
||||
|
||||
poiFragData.baseColor = lerp(poiFragData.baseColor, backFaceColor.rgb, backFaceMask);
|
||||
|
||||
UNITY_BRANCH
|
||||
if (_BackFaceReplaceAlpha)
|
||||
{
|
||||
poiFragData.alpha = backFaceColor.a;
|
||||
}
|
||||
|
||||
poiFragData.emission += backFaceColor.rgb * _BackFaceEmissionStrength * backFaceMask;
|
||||
poiMods.globalEmission = poiMods.globalEmission * _BackFaceEmissionLimiter;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//endex
|
||||
#T#PoiBackFaceFunctionCall
|
||||
//ifex _BackFaceEnabled!=1
|
||||
#ifdef POI_BACKFACE
|
||||
ApplyBackFaceColor(poiFragData, poiMesh, poiMods);
|
||||
#endif
|
||||
//endex
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 837549448592a3a4ea33a7aa0e689f00
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d61b95d934914c4abeba314b47df6d7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,70 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiBacklight
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiBacklight
|
||||
Name:
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 3003435717227043389, guid: 1cb7a3461c21738448b935b7dcc91108,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- LIGHTING_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -8137303536783710132, guid: 1cb7a3461c21738448b935b7dcc91108,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -1903488131248136623, guid: 1cb7a3461c21738448b935b7dcc91108,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- SHADOW_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
- OUTLINE_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -9086731845197701924, guid: 1cb7a3461c21738448b935b7dcc91108,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
- FRAGMENT_SHADOW_FUNCTIONS
|
||||
- FRAGMENT_META_FUNCTIONS
|
||||
- FRAGMENT_OUTLINE_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 3818937678796867229, guid: 1cb7a3461c21738448b935b7dcc91108,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_LIGHTING
|
||||
- FRAGMENT_ADD_LIGHTING
|
||||
- FRAGMENT_SHADOW_LIGHTING
|
||||
- FRAGMENT_META_LIGHTING
|
||||
- FRAGMENT_OUTLINE_LIGHTING
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eef7be30d866ea6488f9d1a3ea96ab7d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,82 @@
|
||||
#T#PoiBacklightProperties
|
||||
//ifex _BacklightEnabled!=1
|
||||
[HideInInspector] m_start_backlight (" Backlight--{reference_property:_BacklightEnabled, button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/shading/backlight},hover:Documentation}}", Float) = 0
|
||||
[HideInInspector][ThryToggle(POI_BACKLIGHT)]_BacklightEnabled ("Backlight Enabled", Float) = 0
|
||||
[HDR][Gamma] _BacklightColor ("Color", Color) = (0.85, 0.8, 0.7, 1.0)
|
||||
[sRGBWarning(true)] _BacklightColorTex ("Texture--{reference_properties:[_BacklightColorTexPan, _BacklightColorTexUV]}", 2D) = "white" { }
|
||||
[HideInInspector][Vector2] _BacklightColorTexPan ("Panning", Vector) = (0, 0, 0, 0)
|
||||
[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos, 5, Local Pos, 8, Polar UV, 6, Distorted UV, 7, Matcap, 9)] _BacklightColorTexUV ("UV", Int) = 0
|
||||
_BacklightMainStrength ("Main Color Blend", Range(0, 1)) = 0
|
||||
_BacklightNormalStrength ("Normal Strength", Range(0, 1)) = 1.0
|
||||
_BacklightBorder ("Border", Range(0, 1)) = 0.35
|
||||
_BacklightBlur ("Blur", Range(0, 1)) = 0.05
|
||||
_BacklightDirectivity ("Directivity", Float) = 5.0
|
||||
_BacklightViewStrength ("View direction strength", Range(0, 1)) = 1
|
||||
[ToggleUI] _BacklightReceiveShadow ("Receive Shadow", Int) = 1
|
||||
[ToggleUI] _BacklightBackfaceMask ("Backface Mask", Int) = 1
|
||||
[HideInInspector] m_end_backlight ("Backlight", Float) = 0
|
||||
//endex
|
||||
#T#PoiBacklightKeywords
|
||||
//ifex _BacklightEnabled!=1
|
||||
#pragma shader_feature_local POI_BACKLIGHT
|
||||
//endex
|
||||
#T#PoiBacklightVariables
|
||||
//ifex _BacklightEnabled!=1
|
||||
#ifdef POI_BACKLIGHT
|
||||
float4 _BacklightColor;
|
||||
#if defined(PROP_BACKLIGHTCOLORTEX) || !defined(OPTIMIZER_ENABLED)
|
||||
Texture2D _BacklightColorTex;
|
||||
float4 _BacklightColorTex_ST;
|
||||
float2 _BacklightColorTexPan;
|
||||
float _BacklightColorTexUV;
|
||||
#endif
|
||||
float _BacklightMainStrength;
|
||||
float _BacklightNormalStrength;
|
||||
float _BacklightBorder;
|
||||
float _BacklightBlur;
|
||||
float _BacklightDirectivity;
|
||||
float _BacklightViewStrength;
|
||||
int _BacklightReceiveShadow;
|
||||
int _BacklightBackfaceMask;
|
||||
#endif
|
||||
//endex
|
||||
#T#PoiBacklightFunction
|
||||
//ifex _BacklightEnabled!=1
|
||||
#ifdef POI_BACKLIGHT
|
||||
void ApplyBacklight(inout PoiFragData poiFragData, in PoiMesh poiMesh, inout PoiLight poiLight, in PoiCam poiCam, inout PoiMods poiMods)
|
||||
{
|
||||
|
||||
// Color
|
||||
float3 backlightColor = _BacklightColor.rgb;
|
||||
#if defined(PROP_BACKLIGHTCOLORTEX) || !defined(OPTIMIZER_ENABLED)
|
||||
backlightColor *= POI2D_SAMPLER_PAN(_BacklightColorTex, _MainTex, poiUV(poiMesh.uv[_BacklightColorTexUV], _BacklightColorTex_ST), _BacklightColorTexPan).rgb;
|
||||
#endif
|
||||
|
||||
float3 normal = lerp(poiMesh.normals[0], poiMesh.normals[1], _BacklightNormalStrength);
|
||||
// Factor
|
||||
float3 headDir = normalize(getCameraPosition() - poiMesh.worldPos.xyz);
|
||||
float headDotLight = dot(headDir, poiLight.direction);
|
||||
float backlightFactor = pow(saturate(-headDotLight * 0.5 + 0.5), max(0, _BacklightDirectivity));
|
||||
float backlightLN = dot(normalize(-headDir * _BacklightViewStrength + poiLight.direction), normal) * 0.5 + 0.5;
|
||||
#if defined(POINT) || defined(SPOT)
|
||||
if (_BacklightReceiveShadow) backlightLN *= saturate(poiLight.additiveShadow);
|
||||
#else
|
||||
if (_BacklightReceiveShadow) backlightLN *= saturate(poiLight.attenuation);
|
||||
#endif
|
||||
backlightLN = poiEdgeLinear(backlightLN, _BacklightBorder, _BacklightBlur);
|
||||
float backlight = saturate(backlightFactor * backlightLN);
|
||||
backlight = !poiMesh.isFrontFace && _BacklightBackfaceMask ? 0.0 : backlight;
|
||||
|
||||
// Blend
|
||||
backlightColor = lerp(backlightColor, backlightColor * poiFragData.baseColor, _BacklightMainStrength);
|
||||
poiLight.finalLightAdd += backlight * backlightColor * poiLight.directColor;
|
||||
}
|
||||
#endif
|
||||
//endex
|
||||
#T#PoiBacklightFunctionCall
|
||||
//ifex _BacklightEnabled!=1
|
||||
#ifdef POI_BACKLIGHT
|
||||
ApplyBacklight(poiFragData, poiMesh, poiLight, poiCam, poiMods);
|
||||
#endif
|
||||
//endex
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1cb7a3461c21738448b935b7dcc91108
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 752113ac546a43147a017314c171ce98
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,42 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiStencil
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiStencil
|
||||
Name: Poi Stencils
|
||||
Version:
|
||||
Author:
|
||||
Description:
|
||||
AllowDuplicates: 0
|
||||
ForceDuplicateLogic: 0
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 3419128985690004776, guid: 32ded4667257b3f4e93d2d3058e89155,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- RENDERING_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 101
|
||||
- Template: {fileID: 7180907857290092215, guid: 32ded4667257b3f4e93d2d3058e89155,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PASS_STENCIL
|
||||
- ADD_PASS_STENCIL
|
||||
- SHADOW_PASS_STENCIL
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bc9a6f3110c97941a79c0f76a712bae
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,40 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiStencilTwoPass
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiStencilTwoPass
|
||||
Name: Poi Stencil Two Pass
|
||||
Version:
|
||||
Author:
|
||||
Description:
|
||||
AllowDuplicates: 0
|
||||
ForceDuplicateLogic: 0
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 4498648522856964495, guid: 32ded4667257b3f4e93d2d3058e89155,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- RENDERING_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 102
|
||||
- Template: {fileID: -8545981536984775487, guid: 32ded4667257b3f4e93d2d3058e89155,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASETWO_PASS_STENCIL
|
||||
NeedsVariant: 0
|
||||
Queue: 101
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08bb4be3026823d4292cacd0c4a00f90
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,55 @@
|
||||
#T#PoiStencilProperties
|
||||
// Stencils
|
||||
[HideInInspector] m_start_StencilPassOptions ("Stencil--{button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/rendering/stencil},hover:Documentation}}", Float) = 0
|
||||
[ThryWideEnum(Simple, 0, Front Face vs Back Face, 1)] _StencilType ("Stencil Type", Float) = 0
|
||||
[IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0
|
||||
[IntRange] _StencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255
|
||||
[IntRange] _StencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255
|
||||
[Enum(UnityEngine.Rendering.StencilOp)] _StencilPassOp ("Stencil Pass Op--{condition_showS:(_StencilType==0)}", Float) = 0
|
||||
[Enum(UnityEngine.Rendering.StencilOp)] _StencilFailOp ("Stencil Fail Op--{condition_showS:(_StencilType==0)}", Float) = 0
|
||||
[Enum(UnityEngine.Rendering.StencilOp)] _StencilZFailOp ("Stencil ZFail Op--{condition_showS:(_StencilType==0)}", Float) = 0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilCompareFunction ("Stencil Compare Function--{condition_showS:(_StencilType==0)}", Float) = 8
|
||||
|
||||
[HideInInspector] m_start_StencilPassBackOptions("Back--{condition_showS:(_StencilType==1)}", Float) = 0
|
||||
[Helpbox(1)] _FFBFStencilHelp0 ("Front Face and Back Face Stencils only work when locked in due to Unity's Stencil managment", Int) = 0
|
||||
[Enum(UnityEngine.Rendering.StencilOp)] _StencilBackPassOp ("Back Pass Op", Float) = 0
|
||||
[Enum(UnityEngine.Rendering.StencilOp)] _StencilBackFailOp ("Back Fail Op", Float) = 0
|
||||
[Enum(UnityEngine.Rendering.StencilOp)] _StencilBackZFailOp ("Back ZFail Op", Float) = 0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilBackCompareFunction ("Back Compare Function", Float) = 8
|
||||
[HideInInspector] m_end_StencilPassBackOptions("Back", Float) = 0
|
||||
|
||||
[HideInInspector] m_start_StencilPassFrontOptions("Front--{condition_showS:(_StencilType==1)}", Float) = 0
|
||||
[Helpbox(1)] _FFBFStencilHelp1 ("Front Face and Back Face Stencils only work when locked in due to Unity's Stencil managment", Int) = 0
|
||||
[Enum(UnityEngine.Rendering.StencilOp)] _StencilFrontPassOp ("Front Pass Op", Float) = 0
|
||||
[Enum(UnityEngine.Rendering.StencilOp)] _StencilFrontFailOp ("Front Fail Op", Float) = 0
|
||||
[Enum(UnityEngine.Rendering.StencilOp)] _StencilFrontZFailOp ("Front ZFail Op", Float) = 0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilFrontCompareFunction ("Front Compare Function", Float) = 8
|
||||
[HideInInspector] m_end_StencilPassFrontOptions("Front", Float) = 0
|
||||
|
||||
[HideInInspector] m_end_StencilPassOptions ("Stencil", Float) = 0
|
||||
|
||||
#T#PoiStencilImplementation
|
||||
Stencil
|
||||
{
|
||||
Ref [_StencilRef]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
//ifex _StencilType==1
|
||||
Comp [_StencilCompareFunction]
|
||||
Pass [_StencilPassOp]
|
||||
Fail [_StencilFailOp]
|
||||
ZFail [_StencilZFailOp]
|
||||
//endex
|
||||
|
||||
//ifex _StencilType==0
|
||||
CompBack [_StencilBackCompareFunction]
|
||||
PassBack [_StencilBackPassOp]
|
||||
FailBack [_StencilBackFailOp]
|
||||
ZFailBack [_StencilBackZFailOp]
|
||||
|
||||
CompFront [_StencilFrontCompareFunction]
|
||||
PassFront [_StencilFrontPassOp]
|
||||
FailFront [_StencilFrontFailOp]
|
||||
ZFailFront [_StencilFrontZFailOp]
|
||||
//endex
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32ded4667257b3f4e93d2d3058e89155
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc3947cb72cadb74bb1a1ca7c08cce1e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiBlackLightMasking
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiBlackLightMasking
|
||||
Name:
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
AllowDuplicates: 0
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 3036204003895637931, guid: d62caea497d8b4744ada102ce55812e6,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- GLOBAL_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 6317577487401931402, guid: d62caea497d8b4744ada102ce55812e6,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- DEPTHNORMAL_PASS_KEYWORDS
|
||||
- OUTLINE_PASS_KEYWORDS
|
||||
- EARLYZ_PASS_KEYWORDS
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
- SHADOW_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -6597706017038819620, guid: d62caea497d8b4744ada102ce55812e6,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- SHADOW_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
- OUTLINE_PROPERTY_VARIABLES
|
||||
- DEPTHNORMAL_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -4327617738496747933, guid: d62caea497d8b4744ada102ce55812e6,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
- FRAGMENT_SHADOW_FUNCTIONS
|
||||
- FRAGMENT_META_FUNCTIONS
|
||||
- FRAGMENT_OUTLINE_FUNCTIONS
|
||||
- FRAGMENT_DEPTHNORMAL_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -7845599545550261965, guid: d62caea497d8b4744ada102ce55812e6,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_INIT_LATE
|
||||
- FRAGMENT_ADD_INIT_LATE
|
||||
- FRAGMENT_SHADOW_INIT_LATE
|
||||
- FRAGMENT_META_INIT_LATE
|
||||
- FRAGMENT_OUTLINE_INIT_LATE
|
||||
- FRAGMENT_DEPTHNORMAL_INIT_LATE
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 883f6564ee1d11544ab7c82b2438e3d5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,137 @@
|
||||
#T#PoiBlackLightMaskingProperties
|
||||
//ifex _BlackLightMaskingEnabled==0
|
||||
[HideInInspector] m_start_BlackLightMasking ("BlackLight Masking--{reference_property:_BlackLightMaskingEnabled, button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/modifiers/blacklight-masking},hover:Documentation}}", Float) = 0
|
||||
[HideInInspector][ThryToggle(POI_BLACKLIGHTMASKING)] _BlackLightMaskingEnabled ("BlackLight Masking Enabled", Float) = 0
|
||||
|
||||
[ThryHeaderLabel(One, 13)]
|
||||
_BlackLightMasking0Key ("Key", Float) = 1
|
||||
[Vector2] _BlackLightMasking0Range ("Range", Vector) = (0.1, 0.5, 0, 0)
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _BlackLightMasking0GlobalMaskIndex ("Apply to Global Mask--{reference_property:_BlackLightMasking0GlobalMaskBlendType}", Int) = 0
|
||||
[HideInInspector][ThryWideEnum(Add, 7, Subtract, 1, Multiply, 2, Divide, 3, Min, 4, Max, 5, Average, 6, Replace, 0)]_BlackLightMasking0GlobalMaskBlendType ("Blending", Range(0, 1)) = 0
|
||||
[Space(4)]
|
||||
[ThryHeaderLabel(Two, 13)]
|
||||
_BlackLightMasking1Key ("Key", Float) = 2
|
||||
[Vector2] _BlackLightMasking1Range ("Range", Vector) = (0.1, 0.5, 0, 0)
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _BlackLightMasking1GlobalMaskIndex ("Apply to Global Mask--{reference_property:_BlackLightMasking1GlobalMaskBlendType}", Int) = 0
|
||||
[HideInInspector][ThryWideEnum(Add, 7, Subtract, 1, Multiply, 2, Divide, 3, Min, 4, Max, 5, Average, 6, Replace, 0)]_BlackLightMasking1GlobalMaskBlendType ("Blending", Range(0, 1)) = 0
|
||||
[Space(4)]
|
||||
[ThryHeaderLabel(Three, 13)]
|
||||
_BlackLightMasking2Key ("Key", Float) = 3
|
||||
[Vector2] _BlackLightMasking2Range ("Range", Vector) = (0.1, 0.5, 0, 0)
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _BlackLightMasking2GlobalMaskIndex ("Apply to Global Mask--{reference_property:_BlackLightMasking2GlobalMaskBlendType}", Int) = 0
|
||||
[HideInInspector][ThryWideEnum(Add, 7, Subtract, 1, Multiply, 2, Divide, 3, Min, 4, Max, 5, Average, 6, Replace, 0)]_BlackLightMasking2GlobalMaskBlendType ("Blending", Range(0, 1)) = 0
|
||||
[Space(4)]
|
||||
[ThryHeaderLabel(Four, 13)]
|
||||
_BlackLightMasking3Key ("Key", Float) = 4
|
||||
[Vector2] _BlackLightMasking3Range ("Range", Vector) = (0.1, 0.5, 0, 0)
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _BlackLightMasking3GlobalMaskIndex ("Apply to Global Mask--{reference_property:_BlackLightMasking3GlobalMaskBlendType}", Int) = 0
|
||||
[HideInInspector][ThryWideEnum(Add, 7, Subtract, 1, Multiply, 2, Divide, 3, Min, 4, Max, 5, Average, 6, Replace, 0)]_BlackLightMasking3GlobalMaskBlendType ("Blending", Range(0, 1)) = 0
|
||||
|
||||
[HideInInspector] m_end_BlackLightMasking ("BlackLight Masking", Float) = 0
|
||||
//endex
|
||||
|
||||
#T#PoiBlackLightMaskingKeywords
|
||||
//ifex _BlackLightMaskingEnabled==0
|
||||
#pragma shader_feature_local POI_BLACKLIGHTMASKING
|
||||
//endex
|
||||
|
||||
#T#PoiBlackLightMaskingVariables
|
||||
//ifex _BlackLightMaskingEnabled==0
|
||||
#ifdef POI_BLACKLIGHTMASKING
|
||||
float _BlackLightMasking0Key;
|
||||
float2 _BlackLightMasking0Range;
|
||||
float _BlackLightMasking0GlobalMaskIndex;
|
||||
float _BlackLightMasking0GlobalMaskBlendType;
|
||||
|
||||
float _BlackLightMasking1Key;
|
||||
float2 _BlackLightMasking1Range;
|
||||
float _BlackLightMasking1GlobalMaskIndex;
|
||||
float _BlackLightMasking1GlobalMaskBlendType;
|
||||
|
||||
float _BlackLightMasking2Key;
|
||||
float2 _BlackLightMasking2Range;
|
||||
float _BlackLightMasking2GlobalMaskIndex;
|
||||
float _BlackLightMasking2GlobalMaskBlendType;
|
||||
|
||||
float _BlackLightMasking3Key;
|
||||
float2 _BlackLightMasking3Range;
|
||||
float _BlackLightMasking3GlobalMaskIndex;
|
||||
float _BlackLightMasking3GlobalMaskBlendType;
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiBlackLightMaskingFunctions
|
||||
//ifex _BlackLightMaskingEnabled==0
|
||||
#ifdef POI_BLACKLIGHTMASKING
|
||||
void calculateBlackLightMasks(in PoiMesh poiMesh, inout PoiMods poiMods)
|
||||
{
|
||||
#ifdef VERTEXLIGHT_ON
|
||||
for (int lightIndex = 0; lightIndex < 4; lightIndex++)
|
||||
{
|
||||
float3 lightPos = float3(unity_4LightPosX0[lightIndex], unity_4LightPosY0[lightIndex], unity_4LightPosZ0[lightIndex]);
|
||||
if (!distance(unity_LightColor[lightIndex].rgb, float3(0, 0, 0)))
|
||||
{
|
||||
if (_BlackLightMasking0GlobalMaskIndex > 0)
|
||||
{
|
||||
if (unity_LightColor[lightIndex].a == _BlackLightMasking0Key)
|
||||
{
|
||||
applyToGlobalMask(poiMods, _BlackLightMasking0GlobalMaskIndex - 1, _BlackLightMasking0GlobalMaskBlendType, smoothstep(_BlackLightMasking0Range.y, _BlackLightMasking0Range.x, distance(poiMesh.worldPos, lightPos)));
|
||||
}
|
||||
}
|
||||
|
||||
if (_BlackLightMasking1GlobalMaskIndex > 0)
|
||||
{
|
||||
if (unity_LightColor[lightIndex].a == _BlackLightMasking1Key)
|
||||
{
|
||||
applyToGlobalMask(poiMods, _BlackLightMasking1GlobalMaskIndex - 1, _BlackLightMasking1GlobalMaskBlendType, smoothstep(_BlackLightMasking1Range.y, _BlackLightMasking1Range.x, distance(poiMesh.worldPos, lightPos)));
|
||||
}
|
||||
}
|
||||
|
||||
if (_BlackLightMasking2GlobalMaskIndex > 0)
|
||||
{
|
||||
if (unity_LightColor[lightIndex].a == _BlackLightMasking2Key)
|
||||
{
|
||||
applyToGlobalMask(poiMods, _BlackLightMasking2GlobalMaskIndex - 1, _BlackLightMasking2GlobalMaskBlendType, smoothstep(_BlackLightMasking0Range.y, _BlackLightMasking0Range.x, distance(poiMesh.worldPos, lightPos)));
|
||||
}
|
||||
}
|
||||
|
||||
if (_BlackLightMasking3GlobalMaskIndex > 0)
|
||||
{
|
||||
if (unity_LightColor[lightIndex].a == _BlackLightMasking3Key)
|
||||
{
|
||||
applyToGlobalMask(poiMods, _BlackLightMasking3GlobalMaskIndex - 1, _BlackLightMasking3GlobalMaskBlendType, smoothstep(_BlackLightMasking0Range.y, _BlackLightMasking0Range.x, distance(poiMesh.worldPos, lightPos)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (_BlackLightMasking0GlobalMaskIndex > 0)
|
||||
{
|
||||
applyToGlobalMask(poiMods, _BlackLightMasking0GlobalMaskIndex - 1, _BlackLightMasking0GlobalMaskBlendType, 0);
|
||||
}
|
||||
|
||||
if (_BlackLightMasking1GlobalMaskIndex > 0)
|
||||
{
|
||||
applyToGlobalMask(poiMods, _BlackLightMasking1GlobalMaskIndex - 1, _BlackLightMasking1GlobalMaskBlendType, 0);
|
||||
}
|
||||
|
||||
if (_BlackLightMasking2GlobalMaskIndex > 0)
|
||||
{
|
||||
applyToGlobalMask(poiMods, _BlackLightMasking2GlobalMaskIndex - 1, _BlackLightMasking2GlobalMaskBlendType, 0);
|
||||
}
|
||||
|
||||
if (_BlackLightMasking3GlobalMaskIndex > 0)
|
||||
{
|
||||
applyToGlobalMask(poiMods, _BlackLightMasking3GlobalMaskIndex - 1, _BlackLightMasking3GlobalMaskBlendType, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiBlackLightMaskingFunctionCalls
|
||||
//ifex _BlackLightMaskingEnabled==0
|
||||
#ifdef POI_BLACKLIGHTMASKING
|
||||
calculateBlackLightMasks(poiMesh, poiMods);
|
||||
#endif
|
||||
//endex
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d62caea497d8b4744ada102ce55812e6
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0253f1491e1552f4294b5568dcc60f55
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,69 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiCubemap
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiCubemap
|
||||
Name:
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
Enabled:
|
||||
Name:
|
||||
DisplayName:
|
||||
Type:
|
||||
DefaultValue:
|
||||
DefaultTextureAsset: {fileID: 0}
|
||||
Attributes: []
|
||||
EnableValue: 0
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 5709453681845802839, guid: b0bbd699c8ad8404c8f0032be7670867,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- LIGHTING_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -7135968679813074166, guid: b0bbd699c8ad8404c8f0032be7670867,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 170900233396724283, guid: b0bbd699c8ad8404c8f0032be7670867,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -6936511827229705383, guid: b0bbd699c8ad8404c8f0032be7670867,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 8866829741740583284, guid: b0bbd699c8ad8404c8f0032be7670867,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_COLOR
|
||||
- FRAGMENT_ADD_COLOR
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b7107bd37b2093f499c145a305820813
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,186 @@
|
||||
#T#PoiCubeMapProperties
|
||||
//ifex _CubeMapEnabled==0
|
||||
[HideInInspector] m_start_CubeMap (" CubeMap--{reference_property:_CubeMapEnabled,button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/shading/cubemap},hover:Documentation}}", Float) = 0
|
||||
[HideInInspector][ThryToggle(_CUBEMAP)]_CubeMapEnabled ("Enable CubeMap", Float) = 0
|
||||
[ThryWideEnum(Skybox, 0, Reflection, 1, World Normal Direction, 2, Local Normal Direction, 3)] _CubeMapUVMode ("UV Mode", Int) = 1
|
||||
_CubeMapWorldNormalsStrength ("Normals Strength--{condition_showS:(_CubeMapUVMode==2)}", Range(0, 1)) = 1
|
||||
_CubeMapColor ("Color--{reference_property:_CubeMapColorThemeIndex}", Color) = (1, 1, 1, 1)
|
||||
[HideInInspector][ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)] _CubeMapColorThemeIndex ("", Int) = 0
|
||||
[NoScaleOffset]_CubeMap ("CubeMap--{reference_properties:[_CubeMapRotation, _CubeMapRotationPan]}", Cube) = "" { }
|
||||
[HideInInspector][Vector3]_CubeMapRotation ("Rotation in Degrees", Vector) = (0, 0, 0, 0)
|
||||
[HideInInspector][Vector3]_CubeMapRotationPan ("Panning in Degrees", Vector) = (0, 0, 0, 0)
|
||||
[ThryWideEnum(Replace, 0, Multiply, 1, Add, 2)]_CubemapBlendType ("Blending", Float) = 0
|
||||
_CubeMapBlendAmount ("Blend Alpha", Range(0, 1)) = 1
|
||||
|
||||
_CubeMapIntensity ("Brightness", Range(0, 5)) = 1
|
||||
_CubeMapEmissionStrength ("Emission Strength", Range(0, 20)) = 0
|
||||
_CubeMapSmoothness ("Smoothness", Range(0, 1)) = 1
|
||||
[Enum(Vertex, 0, Pixel, 1)] _CubeMapNormal ("Normal to use", Int) = 1
|
||||
|
||||
|
||||
[HideInInspector] s_start_CubeMapMasking ("Masking--{persistent_expand:true,default_expand:true}", Float) = 1
|
||||
[sRGBWarning]_CubeMapMask ("Mask--{reference_properties:[_CubeMapMaskPan, _CubeMapMaskUV, _CubeMapMaskChannel, _CubeMapMaskInvert]}", 2D) = "white" { }
|
||||
[HideInInspector][Vector2]_CubeMapMaskPan ("Panning", Vector) = (0, 0, 0, 0)
|
||||
[HideInInspector][ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Panosphere, 4, World Pos, 5, Local Pos, 8, Polar UV, 6, Distorted UV, 7, Matcap, 9)] _CubeMapMaskUV ("UV", Int) = 0
|
||||
[HideInInspector][Enum(R, 0, G, 1, B, 2, A, 3)]_CubeMapMaskChannel ("Channel", Float) = 0
|
||||
[HideInInspector][ToggleUI]_CubeMapMaskInvert ("Invert", Float) = 0
|
||||
_CubeMapLightMask ("Hide in Shadow", Range(0, 1)) = 0
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)] _CubeMapMaskGlobalMask ("Global Mask--{reference_property:_CubeMapMaskGlobalMaskBlendType}", Int) = 0
|
||||
[HideInInspector][ThryWideEnum(Add, 7, Subtract, 1, Multiply, 2, Divide, 3, Min, 4, Max, 5, Average, 6, Replace, 0)]_CubeMapMaskGlobalMaskBlendType ("Blending", Range(0, 1)) = 2
|
||||
[HideInInspector] s_end_CubeMapMasking ("Masking", Float) = 0
|
||||
|
||||
[HideInInspector] s_start_CubeMapColorAdjust ("Color Adjust--{reference_property:_CubeMapHueShiftEnabled,persistent_expand:true,default_expand:false}", Float) = 0
|
||||
[HideInInspector][ToggleUI]_CubeMapHueShiftEnabled ("Enabled", Float) = 0
|
||||
[ThryWideEnum(OKLab, 0, HSV, 1)] _CubeMapHueShiftColorSpace ("Color Space", Int) = 0
|
||||
[ThryWideEnum(Hue Select, 0, Hue Shift, 1)] _CubeMapHueSelectOrShift ("Select or Shift", Int) = 1
|
||||
_CubeMapHueShiftSpeed ("Hue Shift Speed", Float) = 0
|
||||
_CubeMapHueShift ("Hue Shift", Range(0, 1)) = 0
|
||||
_CubeMapBrightness ("Brightness", Range(-1, 1)) = 0
|
||||
_CubeMapContrast ("Contrast", Range(-1, 10)) = 1
|
||||
_CubeMapSaturation ("Saturation", Range(-1, 10)) = 1
|
||||
[HideInInspector] s_end_CubeMapColorAdjust ("", Float) = 0
|
||||
|
||||
|
||||
[HideInInspector] m_end_CubeMap ("CubeMap", Float) = 0
|
||||
//endex
|
||||
|
||||
#T#PoiCubeMap_Keyword
|
||||
//ifex _CubeMapEnabled==0
|
||||
#pragma shader_feature_local _CUBEMAP
|
||||
//endex
|
||||
|
||||
#T#PoiCubeMapVariables
|
||||
//ifex _CubeMapEnabled==0
|
||||
#ifdef _CUBEMAP
|
||||
#if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED)
|
||||
TextureCube _CubeMap;
|
||||
float3 _CubeMapRotation;
|
||||
float3 _CubeMapRotationPan;
|
||||
#endif
|
||||
#if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
Texture2D _CubeMapMask;
|
||||
float4 _CubeMapMask_ST;
|
||||
float2 _CubeMapMaskPan;
|
||||
float _CubeMapMaskUV;
|
||||
float _CubeMapMaskChannel;
|
||||
#endif
|
||||
float _CubeMapUVMode;
|
||||
float _CubeMapWorldNormalsStrength;
|
||||
float _CubeMapMaskInvert;
|
||||
float _CubeMapMaskGlobalMask;
|
||||
float _CubeMapMaskGlobalMaskBlendType;
|
||||
float4 _CubeMapColor;
|
||||
float _CubeMapColorThemeIndex;
|
||||
float _CubeMapIntensity;
|
||||
float _CubemapBlendType;
|
||||
float _CubeMapBlendAmount;
|
||||
float _CubeMapEnable;
|
||||
float _CubeMapLightMask;
|
||||
float _CubeMapEmissionStrength;
|
||||
float _CubeMapNormal;
|
||||
float _CubeMapHueShiftEnabled;
|
||||
float _CubeMapHueShiftSpeed;
|
||||
float _CubeMapHueShift;
|
||||
float _CubeMapHueShiftColorSpace;
|
||||
float _CubeMapHueSelectOrShift;
|
||||
float _CubeMapSaturation;
|
||||
float _CubeMapBrightness;
|
||||
float _CubeMapContrast;
|
||||
float _CubeMapSmoothness;
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiCubeMapFunctions
|
||||
//ifex _CubeMapEnabled==0
|
||||
#ifdef _CUBEMAP
|
||||
#if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED)
|
||||
// From Unity's MIT'd Skybox-Cubed.shader
|
||||
float3 RotateAroundYInDegrees(float3 dir, float degrees)
|
||||
{
|
||||
float alpha = degrees * UNITY_PI / 180.0;
|
||||
float sina, cosa;
|
||||
sincos(alpha, sina, cosa);
|
||||
float2x2 m = float2x2(cosa, -sina, sina, cosa);
|
||||
return float3(mul(m, dir.xz), dir.y).xzy;
|
||||
}
|
||||
#endif
|
||||
void applyCubemap(inout PoiFragData poiFragData, in PoiCam poiCam, in PoiMesh poiMesh, in PoiLight poiLight, in PoiMods poiMods)
|
||||
{
|
||||
float3 CubeMapUV = 0;
|
||||
|
||||
switch(_CubeMapUVMode)
|
||||
{
|
||||
case 0: // Skybox
|
||||
CubeMapUV = -poiCam.viewDir;
|
||||
break;
|
||||
case 1: // Reflection
|
||||
CubeMapUV = poiCam.reflectionDir;
|
||||
break;
|
||||
case 2: // World Normal Direction
|
||||
CubeMapUV = lerp(poiMesh.normals[0], poiMesh.normals[1], _CubeMapWorldNormalsStrength);
|
||||
break;
|
||||
case 3: // Local Normal Direction
|
||||
CubeMapUV = poiMesh.objNormal;
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(PROP_CUBEMAP) || !defined(OPTIMIZER_ENABLED)
|
||||
if (any(_CubeMapRotation.xyz) || any(_CubeMapRotationPan.xyz))
|
||||
{
|
||||
// Do funny swizzle so we don't have to make a new function for every direction
|
||||
CubeMapUV = RotateAroundYInDegrees(CubeMapUV.yxz, _CubeMapRotation.x + (_CubeMapRotationPan.x * _Time.y)).yxz;
|
||||
CubeMapUV = RotateAroundYInDegrees(CubeMapUV.xyz, _CubeMapRotation.y + (_CubeMapRotationPan.y * _Time.y)).xyz;
|
||||
CubeMapUV = RotateAroundYInDegrees(CubeMapUV.xzy, _CubeMapRotation.z + (_CubeMapRotationPan.z * _Time.y)).xzy;
|
||||
}
|
||||
//float4 cubeMap = texCUBElod(_CubeMap, float4(CubeMapUV, (1 - _CubeMapSmoothness) * (1 - _CubeMapSmoothness) * 8));
|
||||
float mipLevel = (1 - _CubeMapSmoothness) * (1 - _CubeMapSmoothness) * 8;
|
||||
float4 cubeMap = _CubeMap.SampleLevel(sampler_linear_clamp, CubeMapUV, mipLevel);
|
||||
|
||||
|
||||
cubeMap.rgb *= poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex);
|
||||
#else
|
||||
float4 cubeMap = float4(0.21763764082, 0.21763764082, 0.21763764082, .5) * float4(poiThemeColor(poiMods, _CubeMapColor, _CubeMapColorThemeIndex), 1);
|
||||
#endif
|
||||
|
||||
cubeMap.rgb *= _CubeMapIntensity;
|
||||
#if defined(PROP_CUBEMAPMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
float CubeMapMask = POI2D_SAMPLER_PAN(_CubeMapMask, _MainTex, poiUV(poiMesh.uv[_CubeMapMaskUV], _CubeMapMask_ST), _CubeMapMaskPan)[_CubeMapMaskChannel];
|
||||
#else
|
||||
float CubeMapMask = 1;
|
||||
#endif
|
||||
|
||||
if (_CubeMapMaskGlobalMask > 0)
|
||||
{
|
||||
CubeMapMask = maskBlend(CubeMapMask, poiMods.globalMask[_CubeMapMaskGlobalMask - 1], _CubeMapMaskGlobalMaskBlendType);
|
||||
}
|
||||
|
||||
if (_CubeMapMaskInvert)
|
||||
{
|
||||
CubeMapMask = 1 - CubeMapMask;
|
||||
}
|
||||
|
||||
//UNITY_BRANCH
|
||||
if (_CubeMapHueShiftEnabled)
|
||||
{
|
||||
cubeMap.rgb = hueShift(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed, _CubeMapHueShiftColorSpace, _CubeMapHueSelectOrShift);
|
||||
cubeMap = PoiColorBCS(cubeMap, _CubeMapBrightness, _CubeMapContrast, _CubeMapSaturation);
|
||||
//cubeMap.rgb = ModifyViaHSV(cubeMap.rgb, _CubeMapHueShift + _Time.x * _CubeMapHueShiftSpeed, _CubeMapSaturation, _CubeMapValue);
|
||||
|
||||
}
|
||||
CubeMapMask = min(CubeMapMask, lerp(1, poiLight.rampedLightMap, _CubeMapLightMask));
|
||||
float cubeMapAlpha = CubeMapMask * cubeMap.a * _CubeMapBlendAmount;
|
||||
poiFragData.baseColor.rgb = lerp(poiFragData.baseColor.rgb, cubeMap.rgb, cubeMapAlpha * (_CubemapBlendType == 0));
|
||||
poiFragData.baseColor.rgb *= lerp(1, cubeMap.rgb, cubeMapAlpha * (_CubemapBlendType == 1));
|
||||
poiFragData.baseColor.rgb += cubeMap.rgb * cubeMapAlpha * (_CubemapBlendType == 2);
|
||||
poiFragData.emission += cubeMap.rgb * _CubeMapEmissionStrength * CubeMapMask * cubeMap.a;
|
||||
}
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiCubeMapFunctionCalls
|
||||
//ifex _CubeMapEnabled==0
|
||||
#ifdef _CUBEMAP
|
||||
applyCubemap(poiFragData, poiCam, poiMesh, poiLight, poiMods);
|
||||
#endif
|
||||
//endex
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0bbd699c8ad8404c8f0032be7670867
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05981691151d70c49a55190a867fb58a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,76 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiDEBUG
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiDEBUG
|
||||
Name:
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: -1275887129824804133, guid: 56941cb9e4e374049b23c8cf5095caa9,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- RENDERING_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 8723007432455142483, guid: 56941cb9e4e374049b23c8cf5095caa9,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- SHADOW_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
- OUTLINE_PROPERTY_VARIABLES
|
||||
- EARLYZ_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -4799136419785047218, guid: 56941cb9e4e374049b23c8cf5095caa9,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_COLOR
|
||||
- FRAGMENT_ADD_COLOR
|
||||
- FRAGMENT_SHADOW_COLOR
|
||||
- FRAGMENT_META_COLOR
|
||||
- FRAGMENT_OUTLINE_COLOR
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 6542013654300467295, guid: 56941cb9e4e374049b23c8cf5095caa9,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
- FRAGMENT_SHADOW_FUNCTIONS
|
||||
- FRAGMENT_META_FUNCTIONS
|
||||
- FRAGMENT_OUTLINE_FUNCTIONS
|
||||
- FRAGMENT_EARLYZ_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -2295856223524367409, guid: 56941cb9e4e374049b23c8cf5095caa9,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- VERTEX_INPUT_MODS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 5359368295694927781, guid: 56941cb9e4e374049b23c8cf5095caa9,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- VERTEX_MODS_POST_CLIPPOS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f106a21c82e51d49b4e6b4ab55564df
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,309 @@
|
||||
#T#PoiDEBUGProperties
|
||||
//ifex _DEBUG_PersistDuringLock==0
|
||||
[HideInInspector] m_start_DEBUG ("DEBUG--{reference_property:_DEBUGEnabled}", Float) = 0
|
||||
[HideInInspector][ToggleUI]_DEBUGEnabled ("DEBUG Enabled", Float) = 0
|
||||
[NonModifiableTextureData][HideInInspector]_DEBUG_PersistDuringLock ("Persist Debug During Lock", Float) = 0
|
||||
[Helpbox(3)] _DEBUG_ErrorText ("This module will be removed when locked--{condition_showS:(_DEBUG_PersistDuringLock==0)}", Int) = 0
|
||||
[Helpbox(2)] _DEBUG_WarningText ("This module will NOT be removed when locked--{condition_showS:(_DEBUG_PersistDuringLock==1)}", Int) = 0
|
||||
[ThryWideEnum(RGB, 0, R, 1, G, 2, B, 3, A, 4)] _DEBUG_ChannelSelect ("Channel Select", Int) = 0
|
||||
[ToggleUI] _DEBUG_Remap ("Remap", Int) = 0
|
||||
[ThryWideEnum(Off, 0, baseColor, 1, finalColor, 2, alpha, 3, emission, 4)]
|
||||
_DEBUG_PoiFragData ("PoiFragData", Int) = 0
|
||||
[ThryWideEnum(Off, 0, normals, 1, normals_bumped, 2, objNormal, 3, tangentSpaceNormal, 4, binormal, 5, binormal_bumped, 6, tangent, 7, tangent_bumped, 8, worldPos, 9, localPos, 10, objectPosition, 11, isFrontFace, 12, vertexColor, 13)]
|
||||
_DEBUG_PoiMesh0 ("PoiMesh0", Int) = 0
|
||||
[ThryWideEnum(Off, 0, lightmapUV, 1, uv0, 2, uv1, 3, uv2, 4, uv3, 5, uv_panosphere, 6, uv_worldposxz, 7, uv_polar, 8, uv_distorted, 9, parallaxUV, 10)]
|
||||
_DEBUG_PoiMesh1 ("PoiMesh1", Int) = 0
|
||||
[ThryWideEnum(Off, 0, viewDir, 1, forwardDir, 2, worldPos, 3, distanceToVert, 4, clipPos, 5, reflectionDir, 6, vertexReflectionDir, 7, tangentViewDir, 8, grabPos, 9, screenUV, 10, vDotN, 11, worldDirection, 12)]
|
||||
_DEBUG_PoiCam ("PoiCam", Int) = 0
|
||||
[ThryWideEnum(Off, 0, direction, 1, attenuation, 2, attenuationStrength, 3, directColor, 4, indirectColor, 5, occlusion, 6, shadowMask, 7, detailShadow, 8, halfDir, 9, lightMap, 10, rampedLightMap, 11, additiveShadow, 12, finalLighting, 13, finalLightAdd, 14)]
|
||||
_DEBUG_PoiLight ("PoiLight", Int) = 0
|
||||
[ThryWideEnum(Off, 0, vDotNL, 1, vertexVDotNL, 2, vColor, 3, vCorrectedDotNL, 4, vAttenuation, 5, vSaturatedDotNL, 6, vPosition, 7, vDirection, 8, vFinalLighting, 9, vHalfDir, 10, vDotNH, 11, vertexVDotNH, 12, vDotLH, 13)]
|
||||
_DEBUG_PoiLightVertex ("PoiLightVertex", Int) = 0
|
||||
[ThryWideEnum(Off, 0, Mask, 1, audioLink, 2, audioLinkAvailable, 3, audioLinkVersion, 4, audioLinkTexture, 5, detailMask, 7, backFaceDetailIntensity, 8, globalEmission, 9)]
|
||||
_DEBUG_PoiMods ("PoiMods", Int) = 0
|
||||
[ThryWideEnum(Off, 0, Theme Color 0, 1, Theme Color 1, 2, Theme Color 2, 3, Theme Color 3, 4, ColorChord 0, 5, ColorChord 1, 6, ColorChord 2, 7, ColorChord 3, 8, AL Theme 0, 9, AL Theme 1, 10, AL Theme 2, 11, AL Theme 3, 12)]
|
||||
_DEBUG_globalColorTheme ("globalColorTheme", Int) = 0
|
||||
[ThryWideEnum(Off, 0, 1R, 1, 1G, 2, 1B, 3, 1A, 4, 2R, 5, 2G, 6, 2B, 7, 2A, 8, 3R, 9, 3G, 10, 3B, 11, 3A, 12, 4R, 13, 4G, 14, 4B, 15, 4A, 16)]
|
||||
_DEBUG_globalMask ("globalMask", Int) = 0
|
||||
[ToggleUI]_DEBUG_uvUnwrap ("UV Unwrap", Int) = 0
|
||||
[ThryWideEnum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)]
|
||||
_DEBUG_uvUnwrap_select ("UV Unwrap select", Int) = 0
|
||||
_DEBUG_uvUnwrap_scale ("UV Unwrap scale", Float) = 1
|
||||
[ThryWideEnum(Object, 0, Screen, 1)]_DEBUG_uvUnwrap_space ("UV Unwrap space", Int) = 0
|
||||
[HideInInspector] m_end_DEBUG ("DEBUG", Float) = 0
|
||||
//endex
|
||||
#T#PoiDEBUGVariables
|
||||
//ifex _DEBUG_PersistDuringLock==0
|
||||
int _DEBUGEnabled;
|
||||
int _DEBUG_ChannelSelect;
|
||||
int _DEBUG_Remap;
|
||||
int _DEBUG_PoiFragData;
|
||||
int _DEBUG_PoiMesh0;
|
||||
int _DEBUG_PoiMesh1;
|
||||
int _DEBUG_PoiCam;
|
||||
int _DEBUG_PoiLight;
|
||||
int _DEBUG_PoiLightVertex;
|
||||
int _DEBUG_PoiMods;
|
||||
int _DEBUG_globalColorTheme;
|
||||
int _DEBUG_globalMask;
|
||||
int _DEBUG_uvUnwrap;
|
||||
int _DEBUG_uvUnwrap_select;
|
||||
float _DEBUG_uvUnwrap_scale;
|
||||
int _DEBUG_uvUnwrap_space;
|
||||
//endex
|
||||
#T#PoiDEBUGFunction
|
||||
//ifex _DEBUG_PersistDuringLock==0
|
||||
float4 debugreturn (float x, int cs, int remap)
|
||||
{
|
||||
return float4(x.xxx * lerp(1, 0.5, remap) + lerp(0, 0.5, remap), 1);
|
||||
}
|
||||
float4 debugreturn (float2 xy, int cs, int remap)
|
||||
{
|
||||
float f = 0;
|
||||
if (cs > 0)
|
||||
{
|
||||
xy = f = xy[cs - 1];
|
||||
}
|
||||
return float4(xy.xy * lerp(1, float2(0.5, 0.5), remap) + lerp(0, float2(0.5, 0.5), remap), f * lerp(1, 0.5, remap) + lerp(0, 0.5, remap), 1);
|
||||
}
|
||||
float4 debugreturn (float3 xyz, int cs, int remap)
|
||||
{
|
||||
if (cs > 0)
|
||||
{
|
||||
xyz = xyz[cs - 1];
|
||||
}
|
||||
return float4(xyz.xyz * lerp(1, float3(0.5, 0.5, 0.5), remap) + lerp(0, float3(0.5, 0.5, 0.5), remap), 1);
|
||||
}
|
||||
float4 debugreturn (float4 xyzw, int cs, int remap)
|
||||
{
|
||||
if (cs > 0)
|
||||
{
|
||||
xyzw = xyzw[cs - 1];
|
||||
}
|
||||
return float4(xyzw.xyz * lerp(1, float3(0.5, 0.5, 0.5), remap) + lerp(0, float3(0.5, 0.5, 0.5), remap), 1);
|
||||
}
|
||||
//endex
|
||||
#T#PoiDEBUGVertFunctionCall
|
||||
//ifex _DEBUG_PersistDuringLock==0
|
||||
if (_DEBUGEnabled)
|
||||
{
|
||||
if (_DEBUG_uvUnwrap && _DEBUG_uvUnwrap_space == 0)
|
||||
{
|
||||
if (_DEBUG_uvUnwrap_select == 0) v.vertex.xyz = float3((1 - v.uv0.x / _DEBUG_uvUnwrap_scale) - .5, (v.uv0.y / _DEBUG_uvUnwrap_scale) - .5, 0);
|
||||
if (_DEBUG_uvUnwrap_select == 1) v.vertex.xyz = float3((1 - v.uv1.x / _DEBUG_uvUnwrap_scale) - .5, (v.uv1.y / _DEBUG_uvUnwrap_scale) - .5, 0);
|
||||
if (_DEBUG_uvUnwrap_select == 2) v.vertex.xyz = float3((1 - v.uv2.x / _DEBUG_uvUnwrap_scale) - .5, (v.uv2.y / _DEBUG_uvUnwrap_scale) - .5, 0);
|
||||
if (_DEBUG_uvUnwrap_select == 3) v.vertex.xyz = float3((1 - v.uv3.x / _DEBUG_uvUnwrap_scale) - .5, (v.uv3.y / _DEBUG_uvUnwrap_scale) - .5, 0);
|
||||
}
|
||||
}
|
||||
//endex
|
||||
#T#PoiDEBUGVert2FunctionCall
|
||||
//ifex _DEBUG_PersistDuringLock==0
|
||||
if (_DEBUGEnabled)
|
||||
{
|
||||
if (_DEBUG_uvUnwrap && _DEBUG_uvUnwrap_space == 1)
|
||||
{
|
||||
if (_DEBUG_uvUnwrap_select == 0) o.pos.xyzw = float4((v.uv0.x / _DEBUG_uvUnwrap_scale) * 2 - 1, (1 - v.uv0.y / _DEBUG_uvUnwrap_scale) * 2 - 1, 1, 1);
|
||||
if (_DEBUG_uvUnwrap_select == 1) o.pos.xyzw = float4((v.uv1.x / _DEBUG_uvUnwrap_scale) * 2 - 1, (1 - v.uv1.y / _DEBUG_uvUnwrap_scale) * 2 - 1, 1, 1);
|
||||
if (_DEBUG_uvUnwrap_select == 2) o.pos.xyzw = float4((v.uv2.x / _DEBUG_uvUnwrap_scale) * 2 - 1, (1 - v.uv2.y / _DEBUG_uvUnwrap_scale) * 2 - 1, 1, 1);
|
||||
if (_DEBUG_uvUnwrap_select == 3) o.pos.xyzw = float4((v.uv3.x / _DEBUG_uvUnwrap_scale) * 2 - 1, (1 - v.uv3.y / _DEBUG_uvUnwrap_scale) * 2 - 1, 1, 1);
|
||||
}
|
||||
}
|
||||
//endex
|
||||
#T#PoiDEBUGFragFunctionCall
|
||||
//ifex _DEBUG_PersistDuringLock==0
|
||||
if (_DEBUGEnabled)
|
||||
{
|
||||
if (_DEBUG_PoiFragData > 0)
|
||||
{
|
||||
switch(_DEBUG_PoiFragData)
|
||||
{
|
||||
case 1: return debugreturn (poiFragData.baseColor, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 2: return debugreturn (poiFragData.finalColor, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 3: return debugreturn (poiFragData.alpha, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 4: return debugreturn (poiFragData.emission, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
default:
|
||||
return float4(POI_ERROR(poiMesh, 5), 1) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
if (_DEBUG_PoiMesh0 > 0)
|
||||
{
|
||||
switch(_DEBUG_PoiMesh0)
|
||||
{
|
||||
case 1: return debugreturn (poiMesh.normals[0], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 2: return debugreturn (poiMesh.normals[1], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 3: return debugreturn (poiMesh.objNormal, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 4: return debugreturn (poiMesh.tangentSpaceNormal, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 5: return debugreturn (poiMesh.binormal[0], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 6: return debugreturn (poiMesh.binormal[1], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 7: return debugreturn (poiMesh.tangent[0], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 8: return debugreturn (poiMesh.tangent[1], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 9: return debugreturn (frac(poiMesh.worldPos), _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 10: return debugreturn (frac(poiMesh.localPos), _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 11: return debugreturn (frac(poiMesh.objectPosition), _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 12: return debugreturn (poiMesh.isFrontFace, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 13: return debugreturn (poiMesh.vertexColor, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
default:
|
||||
return float4(POI_ERROR(poiMesh, 5), 1) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
if (_DEBUG_PoiMesh1 > 0)
|
||||
{
|
||||
switch(_DEBUG_PoiMesh1)
|
||||
{
|
||||
case 1: return debugreturn (poiMesh.lightmapUV, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 2: return debugreturn (frac(poiMesh.uv[0]), _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 3: return debugreturn (frac(poiMesh.uv[1]), _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 4: return debugreturn (frac(poiMesh.uv[2]), _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 5: return debugreturn (frac(poiMesh.uv[3]), _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 6: return debugreturn (poiMesh.uv[4], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 7: return debugreturn (poiMesh.uv[5], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 8: return debugreturn (poiMesh.uv[6], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 9: return debugreturn (poiMesh.uv[7], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 10: return debugreturn (poiMesh.parallaxUV, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
default:
|
||||
return float4(POI_ERROR(poiMesh, 5), 1) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
if (_DEBUG_PoiCam > 0)
|
||||
{
|
||||
switch(_DEBUG_PoiCam)
|
||||
{
|
||||
case 1: return debugreturn (poiCam.viewDir, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 2: return debugreturn (poiCam.forwardDir, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 3: return debugreturn (frac(poiCam.worldPos), _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 4: return debugreturn (poiCam.distanceToVert, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 5: return debugreturn (poiCam.clipPos, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 6: return debugreturn (poiCam.reflectionDir, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 7: return debugreturn (poiCam.vertexReflectionDir, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 8: return debugreturn (poiCam.tangentViewDir, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 9: return debugreturn (poiCam.posScreenSpace, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 10: return debugreturn (poiCam.screenUV, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 11: return debugreturn (poiCam.vDotN, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 12: return debugreturn (poiCam.worldDirection, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
default:
|
||||
return float4(POI_ERROR(poiMesh, 5), 1) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
if (_DEBUG_PoiLight > 0)
|
||||
{
|
||||
switch(_DEBUG_PoiLight)
|
||||
{
|
||||
case 1: return debugreturn (poiLight.direction, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 2: return debugreturn (poiLight.attenuation, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 3: return debugreturn (poiLight.attenuationStrength, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 4: return debugreturn (poiLight.directColor, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 5: return debugreturn (poiLight.indirectColor, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 6: return debugreturn (poiLight.occlusion, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 7: return debugreturn (poiLight.shadowMask, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 8: return debugreturn (poiLight.detailShadow, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 9: return debugreturn (poiLight.halfDir, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 10: return debugreturn (poiLight.lightMap, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 11: return debugreturn (poiLight.rampedLightMap, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
#ifdef POI_PASS_ADD
|
||||
case 12: return debugreturn (poiLight.additiveShadow, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
#endif
|
||||
case 13: return debugreturn (poiLight.finalLighting, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 14: return debugreturn (poiLight.finalLightAdd, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
default:
|
||||
return float4(POI_ERROR(poiMesh, 5), 1) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
if (_DEBUG_PoiLightVertex > 0)
|
||||
{
|
||||
#ifdef VERTEXLIGHT_ON
|
||||
if (_DEBUG_ChannelSelect == 0)
|
||||
{
|
||||
float4 output = 0;
|
||||
int c = 0;
|
||||
for (int index = 0; index < 4; index++)
|
||||
{
|
||||
if (!any(poiLight.vPosition[index])) continue;
|
||||
c++;
|
||||
switch(_DEBUG_PoiLightVertex)
|
||||
{
|
||||
case 1: output.rgb += debugreturn (poiLight.vDotNL[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 2: output.rgb += debugreturn (poiLight.vertexVDotNL[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 3: output.rgb += debugreturn (poiLight.vColor[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 4: output.rgb += debugreturn (poiLight.vCorrectedDotNL[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 5: output.rgb += debugreturn (poiLight.vAttenuation[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 6: output.rgb += debugreturn (poiLight.vSaturatedDotNL[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 7: output.rgb += debugreturn (poiLight.vPosition[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 8: output.rgb += debugreturn (poiLight.vDirection[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 9: output.rgb += debugreturn (poiLight.vFinalLighting[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 10: output.rgb += debugreturn (poiLight.vHalfDir[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 11: output.rgb += debugreturn (poiLight.vDotNH[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 12: output.rgb += debugreturn (poiLight.vertexVDotNH[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 13: output.rgb += debugreturn (poiLight.vDotLH[index], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
default:
|
||||
return float4(POI_ERROR(poiMesh, 5), 1) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
output.rgb = output.rgb / c;
|
||||
return output + POI_SAFE_RGB0;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(_DEBUG_PoiLightVertex)
|
||||
{
|
||||
case 1: return debugreturn (poiLight.vDotNL[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 2: return debugreturn (poiLight.vertexVDotNL[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 3: return debugreturn (poiLight.vColor[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 4: return debugreturn (poiLight.vCorrectedDotNL[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 5: return debugreturn (poiLight.vAttenuation[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 6: return debugreturn (poiLight.vSaturatedDotNL[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 7: return debugreturn (poiLight.vPosition[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 8: return debugreturn (poiLight.vDirection[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 9: return debugreturn (poiLight.vFinalLighting[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 10: return debugreturn (poiLight.vHalfDir[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 11: return debugreturn (poiLight.vDotNH[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 12: return debugreturn (poiLight.vertexVDotNH[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 13: return debugreturn (poiLight.vDotLH[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
default:
|
||||
return float4(POI_ERROR(poiMesh, 5), 1) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (_DEBUG_PoiMods > 0)
|
||||
{
|
||||
switch(_DEBUG_PoiMods)
|
||||
{
|
||||
case 1: return debugreturn (poiMods.Mask, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 2: return debugreturn (poiMods.audioLink[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 3: return debugreturn (poiMods.audioLinkAvailable, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 4: return debugreturn (poiMods.audioLinkVersion, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 5: return debugreturn (poiMods.audioLinkTexture, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 7: return debugreturn (poiMods.detailMask, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 8: return debugreturn (poiMods.backFaceDetailIntensity, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 9: return debugreturn (poiMods.globalEmission, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
default:
|
||||
return float4(POI_ERROR(poiMesh, 5), 1) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
if (_DEBUG_PoiMods > 0)
|
||||
{
|
||||
switch(_DEBUG_PoiMods)
|
||||
{
|
||||
case 1: return debugreturn (poiMods.Mask, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 2: return debugreturn (poiMods.audioLink[_DEBUG_ChannelSelect - 1], 0, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 3: return debugreturn (poiMods.audioLinkAvailable, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 4: return debugreturn (poiMods.audioLinkVersion, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 5: return debugreturn (poiMods.audioLinkTexture, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 7: return debugreturn (poiMods.detailMask, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 8: return debugreturn (poiMods.backFaceDetailIntensity, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
case 9: return debugreturn (poiMods.globalEmission, _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
default:
|
||||
return float4(POI_ERROR(poiMesh, 5), 1) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
if (_DEBUG_globalColorTheme > 0)
|
||||
{
|
||||
return debugreturn (poiMods.globalColorTheme[_DEBUG_globalColorTheme - 1], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
if (_DEBUG_globalMask > 0)
|
||||
{
|
||||
return debugreturn (poiMods.globalMask[_DEBUG_globalMask - 1], _DEBUG_ChannelSelect, _DEBUG_Remap) + POI_SAFE_RGB0; break;
|
||||
}
|
||||
}
|
||||
//endex
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56941cb9e4e374049b23c8cf5095caa9
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a5fcd4211f01434aa9d2fafb4595d03
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,70 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiDecals
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiDecals
|
||||
Name:
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
AllowDuplicates: 1
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 8428600710535791143, guid: 41f9db446eef137408ffc08139ce8d01,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- MAIN_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 99
|
||||
- Template: {fileID: -5811997720698039619, guid: 41f9db446eef137408ffc08139ce8d01,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- DEPTHNORMAL_PASS_KEYWORDS
|
||||
- OUTLINE_PASS_KEYWORDS
|
||||
- EARLYZ_PASS_KEYWORDS
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
- SHADOW_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -9183495692868678764, guid: 41f9db446eef137408ffc08139ce8d01,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- META_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 5444516229790824447, guid: 41f9db446eef137408ffc08139ce8d01,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
- FRAGMENT_META_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -1670893242210294853, guid: 41f9db446eef137408ffc08139ce8d01,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_COLOR
|
||||
- FRAGMENT_ADD_COLOR
|
||||
- FRAGMENT_META_COLOR
|
||||
NeedsVariant: 0
|
||||
Queue: 52
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15d0dbfc16740a6458f40abedce1e247
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41f9db446eef137408ffc08139ce8d01
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d1aa20407c69cd4d8d788b613d40c06
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,71 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiDepthBulge
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiDepthBulge
|
||||
Name:
|
||||
Version:
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: 5422018894877597305, guid: e6e4696c94ff15c44a7e6d8d55313660,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- SPECIALFX_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -4901449755712060275, guid: e6e4696c94ff15c44a7e6d8d55313660,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- DEPTHNORMAL_PASS_KEYWORDS
|
||||
- OUTLINE_PASS_KEYWORDS
|
||||
- EARLYZ_PASS_KEYWORDS
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
- SHADOW_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -5523425299334511518, guid: e6e4696c94ff15c44a7e6d8d55313660,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 4887371795553766738, guid: e6e4696c94ff15c44a7e6d8d55313660,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- VERTEX_BASE_FUNCTIONS
|
||||
- VERTEX_ADD_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 6780877963282784232, guid: e6e4696c94ff15c44a7e6d8d55313660,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- VERTEX_MODS_PENETRATION
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -9071281687185107574, guid: e6e4696c94ff15c44a7e6d8d55313660,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_SHADOW_FIRSTLINE
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b39ca163cdc5544793d775714022874
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,84 @@
|
||||
#T#PoiDepthBulgeProperties
|
||||
//ifex _EnableDepthBulge==0
|
||||
[HideInInspector] m_start_DepthBulge (" Depth Bulge--{reference_property:_EnableDepthBulge,button_help:{text:Tutorial,action:{type:URL,data:https://www.poiyomi.com/special-fx/depth-bulge},hover:Documentation}}", Float) = 0
|
||||
[HideInInspector][ThryToggle(POI_DEPTHBULGE)] _EnableDepthBulge ("Bulge", Float) = 0
|
||||
[Helpbox(1)]_DepthBulgeWarning ("Depth Bulge doesn't write to depth, which can break certain transparent effects like custom fog and raymarching", Int) = 0
|
||||
_DepthBulgeMask ("Bulge Mask--{reference_properties:[_DepthBulgeMaskUV, _DepthBulgeMaskChannel]}", 2D) = "white" { }
|
||||
[HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _DepthBulgeMaskUV ("UV", Int) = 0
|
||||
[HideInInspector][Enum(R, 0, G, 1, B, 2, A, 3)] _DepthBulgeMaskChannel ("Channel", Float) = 0
|
||||
_DepthBulgeFadeLength ("Touch Distance", Range(0, 1.0)) = 0.02
|
||||
_DepthBulgeHeight ("Bulge Height", Range(-0.2, 0.2)) = 0.02
|
||||
[HideInInspector] m_end_DepthBulge ("Depth Bulge", Float) = 0
|
||||
//endex
|
||||
#T#PoiDepthBulgeKeywords
|
||||
//ifex _EnableDepthBulge==0
|
||||
#pragma shader_feature_local POI_DEPTHBULGE
|
||||
//endex
|
||||
#T#PoiDepthBulgeVariables
|
||||
//ifex _EnableDepthBulge==0
|
||||
#ifdef POI_DEPTHBULGE
|
||||
float _DepthBulgeFadeLength;
|
||||
float _DepthBulgeHeight;
|
||||
|
||||
#if defined(PROP_DEPTHBULGEMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
sampler2D _DepthBulgeMask;
|
||||
#endif
|
||||
float _DepthBulgeMaskUV;
|
||||
float4 _DepthBulgeMask_ST;
|
||||
float _DepthBulgeMaskChannel;
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiDepthBulgeFunctions
|
||||
//ifex _EnableDepthBulge==0
|
||||
#if defined(POI_DEPTHBULGE)
|
||||
void applyDepthBulgeFX(inout VertexOut o)
|
||||
{
|
||||
float4 pos = UnityObjectToClipPos(o.localPos);
|
||||
float4 grabPos = ComputeGrabScreenPos(pos);
|
||||
|
||||
if(!DepthTextureExists()) return;
|
||||
float depth = SampleScreenDepth(float2(grabPos.xy / grabPos.w));
|
||||
|
||||
#if defined(PROP_DEPTHBULGEMASK) || !defined(OPTIMIZER_ENABLED)
|
||||
float depthBulgeMask = tex2Dlod(_DepthBulgeMask, float4(poiUV(vertexUV(o, _DepthBulgeMaskUV), _DepthBulgeMask_ST), 0, 0))[_DepthBulgeMaskChannel];
|
||||
#else
|
||||
float depthBulgeMask = 1.0;
|
||||
#endif
|
||||
|
||||
depth = Linear01Depth(depth);
|
||||
|
||||
float intersect = 0;
|
||||
if (depth != 1)
|
||||
{
|
||||
float diff = distance(depth, Linear01Depth(pos.z / pos.w));
|
||||
if (diff > 0)
|
||||
{
|
||||
intersect = 1 - smoothstep(0, _ProjectionParams.w * _DepthBulgeFadeLength, diff);
|
||||
}
|
||||
}
|
||||
float4 offset = intersect * _DepthBulgeHeight * float4(o.normal, 0);
|
||||
|
||||
offset = IsInMirror() ? 0 : offset;
|
||||
offset *= depthBulgeMask;
|
||||
|
||||
o.worldPos.xyz += offset.xyz;
|
||||
o.localPos.xyz += mul(unity_WorldToObject, float4(offset.xyz, 0)).xyz;
|
||||
}
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiDepthBulgeFunctionCalls
|
||||
//ifex _EnableDepthBulge==0
|
||||
#if defined(POI_DEPTHBULGE) && (defined(POI_PASS_BASE) || defined(POI_PASS_ADD))
|
||||
applyDepthBulgeFX(o);
|
||||
#endif
|
||||
//endex
|
||||
|
||||
#T#PoiDepthBulgeKillShadow
|
||||
//ifex _EnableDepthBulge==0
|
||||
#ifdef POI_DEPTHBULGE
|
||||
clip(-1);
|
||||
return 0;
|
||||
#endif
|
||||
//endex
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6e4696c94ff15c44a7e6d8d55313660
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: b8e1b7bf6f1d9674dbe75fe157540c41, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c051b86da044db7459ce33ff82cbc875
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,75 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
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: 1039f25740a92fc4292bb1d94d07ad19, type: 3}
|
||||
m_Name: VRLM_PoiDepthFX
|
||||
m_EditorClassIdentifier:
|
||||
Id: PoiTouchFX
|
||||
Name:
|
||||
Version: 1.0
|
||||
Author: Poiyomi
|
||||
Description:
|
||||
EnableProperties: []
|
||||
Properties: []
|
||||
ModuleDependencies: []
|
||||
IncompatibleWith: []
|
||||
Templates:
|
||||
- Template: {fileID: -7772069551757908154, guid: 416990b27a9487d40a62123ecca5a2f1,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- SPECIALFX_PROPERTIES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 2728699451086678995, guid: 416990b27a9487d40a62123ecca5a2f1,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- DEPTHNORMAL_PASS_KEYWORDS
|
||||
- OUTLINE_PASS_KEYWORDS
|
||||
- EARLYZ_PASS_KEYWORDS
|
||||
- BASE_PASS_KEYWORDS
|
||||
- FUR_BASE_PASS_KEYWORDS
|
||||
- ADD_PASS_KEYWORDS
|
||||
- META_PASS_KEYWORDS
|
||||
- SHADOW_PASS_KEYWORDS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -3504185731099954628, guid: 416990b27a9487d40a62123ecca5a2f1,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- BASE_PROPERTY_VARIABLES
|
||||
- ADD_PROPERTY_VARIABLES
|
||||
- SHADOW_PROPERTY_VARIABLES
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: -1354598148198089868, guid: 416990b27a9487d40a62123ecca5a2f1,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_FUNCTIONS
|
||||
- FRAGMENT_ADD_FUNCTIONS
|
||||
- FRAGMENT_SHADOW_FUNCTIONS
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
- Template: {fileID: 6827594594127180737, guid: 416990b27a9487d40a62123ecca5a2f1,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_BASE_COLOR
|
||||
- FRAGMENT_ADD_COLOR
|
||||
- FRAGMENT_SHADOW_COLOR
|
||||
NeedsVariant: 0
|
||||
Queue: 0
|
||||
- Template: {fileID: -4458247281684517588, guid: 416990b27a9487d40a62123ecca5a2f1,
|
||||
type: 3}
|
||||
Keywords:
|
||||
- FRAGMENT_SHADOW_FIRSTLINE
|
||||
NeedsVariant: 0
|
||||
Queue: 100
|
||||
Functions: []
|
||||
AdditionalSerializedData:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user