mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-20 01:42:37 +08:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ff52e4735 | |||
| a3773e3302 | |||
| 5a9f335bf8 | |||
| 3807e4c69a | |||
| 184967c120 | |||
| 2cca822413 | |||
| 90ab16c3fd | |||
| e1f3abf7a6 | |||
| 770e61bb12 | |||
| a0820bf847 | |||
| 1a21464c0e | |||
| 1143fbb84a | |||
| eff923493a | |||
| 0898d730ad | |||
| 1106f4bf46 | |||
| 2861b1ce61 | |||
| 6eabdc694e | |||
| ae177a800c | |||
| 88bb76d735 | |||
| 37daad01c4 | |||
| 1ce32f7829 | |||
| 726bb100a0 | |||
| f8682f3c98 | |||
| 99669728cc | |||
| 30bf783320 | |||
| d6ee505e7c | |||
| 3917df60af | |||
| 6845678f8f | |||
| 9fbaae7d07 | |||
| 3d1abb979a | |||
| 6af34e2994 | |||
| a6781b9289 | |||
| 7f60a56a9a | |||
| 2dd2e26166 | |||
| 21172f37c2 | |||
| 01bbeedde7 | |||
| c6fa44a0b6 | |||
| 26da24dbc4 | |||
| 6014ab54d0 | |||
| dbdb99b52a | |||
| 3b095bcebd | |||
| 2a900987f5 | |||
| 974e3e8769 | |||
| 909281c66b | |||
| 75ed355e27 | |||
| a0dd316df6 | |||
| 4f66bbfb4d | |||
| 91d5519356 | |||
| 76be0fc860 |
@@ -0,0 +1,126 @@
|
||||
# Required secrets
|
||||
# UNITY_LICENSE: The contents of Unity license file
|
||||
# UNITY_EMAIL: Unity user email to login
|
||||
# UNITY_PASSWORD: Unity user password to login
|
||||
name: 🧪 Test URP
|
||||
run-name: 🧪 Test URP (${{ github.event.pull_request.title || github.ref_name }})
|
||||
|
||||
env:
|
||||
# MINIMUM_VERSION: The minimum version of Unity.
|
||||
MINIMUM_VERSION: 6000.0
|
||||
# EXCLUDE_FILTER: The excluded versions of Unity.
|
||||
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.2|2023.3)"
|
||||
PROJECT_PATH: UIEffectURP
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
usePeriodVersions:
|
||||
description: "Use the period versions (.0f1, .10f1, 20f1, ...)."
|
||||
required: false
|
||||
default: "true"
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
- "develop-*"
|
||||
tags:
|
||||
- "!*"
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
name: ⚙️ Setup
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
unityVersions: ${{ steps.setup.outputs.unityVersions }}
|
||||
steps:
|
||||
- name: ⚙️ Find target Unity versions
|
||||
id: setup
|
||||
run: |
|
||||
echo "==== Target Unity Versions ===="
|
||||
LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
|
||||
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
|
||||
ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
|
||||
else
|
||||
ADDITIONAL_VERSIONS=[]
|
||||
fi
|
||||
|
||||
VERSIONS=`echo "[${LATEST_VERSIONS}, ${ADDITIONAL_VERSIONS}]" \
|
||||
| jq -c '[ flatten | sort | unique | .[] | select( test("${{ env.EXCLUDE_FILTER }}") | not ) ]'`
|
||||
echo "unityVersions=${VERSIONS}" | tee $GITHUB_OUTPUT
|
||||
|
||||
test:
|
||||
name: 🧪 Run tests
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
checks: write
|
||||
contents: read
|
||||
needs: setup
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 6
|
||||
matrix:
|
||||
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
|
||||
steps:
|
||||
- name: 🚚 Checkout ($${{ github.ref }})
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🚚 Checkout pull request (pull_request_target)
|
||||
if: github.event_name == 'pull_request_target'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 🚚 Marge pull request (pull_request_target)
|
||||
if: github.event_name == 'pull_request_target'
|
||||
run: |
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
git merge origin/${{ github.event.pull_request.base.ref }} --no-edit
|
||||
|
||||
- name: 📥 Cache library
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: Library
|
||||
key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
|
||||
restore-keys: |
|
||||
Library-${{ matrix.unityVersion }}-
|
||||
Library-
|
||||
|
||||
- name: 🛠️ Build Unity Project (Test)
|
||||
uses: game-ci/unity-builder@v4
|
||||
timeout-minutes: 45
|
||||
with:
|
||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||
targetPlatform: StandaloneLinux64
|
||||
allowDirtyBuild: true
|
||||
customParameters: -nographics
|
||||
projectPath: ${{ env.PROJECT_PATH }}
|
||||
env:
|
||||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||
|
||||
# - name: 🧪 Run tests
|
||||
# uses: game-ci/unity-test-runner@v4
|
||||
# timeout-minutes: 45
|
||||
# with:
|
||||
# customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||
# # unityVersion: ${{ matrix.unityVersion }}
|
||||
# customParameters: -nographics
|
||||
# checkName: ${{ matrix.unityVersion }} Test Results
|
||||
# githubToken: ${{ github.token }}
|
||||
# env:
|
||||
# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
||||
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||
@@ -10,6 +10,7 @@ env:
|
||||
MINIMUM_VERSION: 2020.3
|
||||
# EXCLUDE_FILTER: The excluded versions of Unity.
|
||||
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.2|2023.3)"
|
||||
PROJECT_PATH: .
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -104,6 +105,7 @@ jobs:
|
||||
targetPlatform: StandaloneLinux64
|
||||
allowDirtyBuild: true
|
||||
customParameters: -nographics
|
||||
projectPath: ${{ env.PROJECT_PATH }}
|
||||
env:
|
||||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
||||
@@ -118,6 +120,7 @@ jobs:
|
||||
customParameters: -nographics
|
||||
checkName: ${{ matrix.unityVersion }} Test Results
|
||||
githubToken: ${{ github.token }}
|
||||
projectPath: ${{ env.PROJECT_PATH }}
|
||||
env:
|
||||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
||||
|
||||
@@ -1,14 +1,35 @@
|
||||
using Coffee.UIEffects;
|
||||
using UnityEngine;
|
||||
|
||||
[ExecuteAlways]
|
||||
public class GradationTest : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private UIEffect m_Target;
|
||||
[Range(-1, 1)]
|
||||
[SerializeField]
|
||||
protected float m_GradationOffset = 0;
|
||||
|
||||
[SerializeField] private Gradient m_Gradient;
|
||||
[Range(0.01f, 10)]
|
||||
[SerializeField]
|
||||
protected float m_GradationScale = 1;
|
||||
|
||||
public void SetGradation()
|
||||
[SerializeField]
|
||||
[Range(0, 360)]
|
||||
private float m_GradationRotation = 0;
|
||||
|
||||
private UIEffect[] _uiEffects;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
m_Target.SetGradientKeys(m_Gradient.colorKeys, m_Gradient.alphaKeys, m_Gradient.mode);
|
||||
_uiEffects = GetComponentsInChildren<UIEffect>(true);
|
||||
}
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
foreach (var uiEffect in _uiEffects)
|
||||
{
|
||||
uiEffect.gradationOffset = m_GradationOffset;
|
||||
uiEffect.gradationScale = m_GradationScale;
|
||||
uiEffect.gradationRotation = m_GradationRotation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,932 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &1256184
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1256185}
|
||||
m_Layer: 5
|
||||
m_Name: Root
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1256185
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1256184}
|
||||
m_LocalRotation: {x: 0.1981076, y: 0.13871644, z: 0.13871644, w: 0.9603483}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1022391538}
|
||||
m_Father: {fileID: 320007022}
|
||||
m_LocalEulerAnglesHint: {x: 20, y: 20, z: 20}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 200}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &320007018
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 320007022}
|
||||
- component: {fileID: 320007021}
|
||||
- component: {fileID: 320007020}
|
||||
- component: {fileID: 320007019}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &320007019
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 320007018}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &320007020
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 320007018}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!223 &320007021
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 320007018}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 1076137588}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 1
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &320007022
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 320007018}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1256185}
|
||||
- {fileID: 2068343013}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &1022391537
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1022391538}
|
||||
- component: {fileID: 1022391541}
|
||||
- component: {fileID: 1022391540}
|
||||
- component: {fileID: 1022391539}
|
||||
m_Layer: 5
|
||||
m_Name: UIEffect
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1022391538
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1022391537}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1256185}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 50, y: 50}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1022391539
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1022391537}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 0
|
||||
m_ToneIntensity: 1
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 1
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.5
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 0
|
||||
m_TransitionRate: 0.5
|
||||
m_TransitionReverse: 0
|
||||
m_TransitionTex: {fileID: 0}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionTexSpeed: {x: 0, y: 0}
|
||||
m_TransitionRotation: 0
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.2
|
||||
m_TransitionSoftness: 0.2
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 0.1
|
||||
m_TargetSoftness: 0.5
|
||||
m_BlendType: 1
|
||||
m_SrcBlendMode: 1
|
||||
m_DstBlendMode: 10
|
||||
m_ShadowMode: 0
|
||||
m_ShadowDistance: {x: 1, y: -1}
|
||||
m_ShadowIteration: 1
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 65535
|
||||
ctime2: 0
|
||||
ctime3: 0
|
||||
ctime4: 0
|
||||
ctime5: 0
|
||||
ctime6: 0
|
||||
ctime7: 0
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_ColorSpace: -1
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeColorGlow: 0
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
m_DetailFilter: 4
|
||||
m_DetailIntensity: 1
|
||||
m_DetailThreshold:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_DetailTex: {fileID: 2800000, guid: e3e220b3071ad46a58b9051928389c6b, type: 3}
|
||||
m_DetailTexScale: {x: 1, y: 1}
|
||||
m_DetailTexOffset: {x: 0, y: 0}
|
||||
m_DetailTexSpeed: {x: 0, y: 0}
|
||||
m_CustomRoot: {fileID: 1256185}
|
||||
m_Flip: 0
|
||||
--- !u!114 &1022391540
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1022391537}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1022391541
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1022391537}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1076137586
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1076137589}
|
||||
- component: {fileID: 1076137588}
|
||||
- component: {fileID: 1076137587}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1076137587
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1076137586}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1076137588
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1076137586}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.01
|
||||
far clip plane: 3000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1076137589
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1076137586}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1000, y: 1000, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1303535690
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1303535693}
|
||||
- component: {fileID: 1303535692}
|
||||
- component: {fileID: 1303535691}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1303535691
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1303535690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1303535692
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1303535690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &1303535693
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1303535690}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1740148341
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1740148343}
|
||||
- component: {fileID: 1740148342}
|
||||
- component: {fileID: 1740148344}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1740148342
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1740148341}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1740148343
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1740148341}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!114 &1740148344
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1740148341}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 1
|
||||
m_UsePipelineSettings: 1
|
||||
m_AdditionalLightsShadowResolutionTier: 2
|
||||
m_LightLayerMask: 1
|
||||
m_CustomShadowLayers: 0
|
||||
m_ShadowLayerMask: 1
|
||||
m_LightCookieSize: {x: 1, y: 1}
|
||||
m_LightCookieOffset: {x: 0, y: 0}
|
||||
--- !u!1 &2068343012
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2068343013}
|
||||
- component: {fileID: 2068343016}
|
||||
- component: {fileID: 2068343015}
|
||||
- component: {fileID: 2068343014}
|
||||
m_Layer: 5
|
||||
m_Name: UIEffect
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2068343013
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2068343012}
|
||||
m_LocalRotation: {x: 0.1981076, y: 0.13871644, z: 0.13871644, w: 0.9603483}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 320007022}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2068343014
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2068343012}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 0
|
||||
m_ToneIntensity: 1
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 1
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.5
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 0
|
||||
m_TransitionRate: 0.5
|
||||
m_TransitionReverse: 0
|
||||
m_TransitionTex: {fileID: 0}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionTexSpeed: {x: 0, y: 0}
|
||||
m_TransitionRotation: 0
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.2
|
||||
m_TransitionSoftness: 0.2
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 0.1
|
||||
m_TargetSoftness: 0.5
|
||||
m_BlendType: 1
|
||||
m_SrcBlendMode: 1
|
||||
m_DstBlendMode: 10
|
||||
m_ShadowMode: 0
|
||||
m_ShadowDistance: {x: 1, y: -1}
|
||||
m_ShadowIteration: 1
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 65535
|
||||
ctime2: 0
|
||||
ctime3: 0
|
||||
ctime4: 0
|
||||
ctime5: 0
|
||||
ctime6: 0
|
||||
ctime7: 0
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_ColorSpace: -1
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeColorGlow: 0
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
m_DetailFilter: 4
|
||||
m_DetailIntensity: 1
|
||||
m_DetailThreshold:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_DetailTex: {fileID: 2800000, guid: e3e220b3071ad46a58b9051928389c6b, type: 3}
|
||||
m_DetailTexScale: {x: 1, y: 1}
|
||||
m_DetailTexOffset: {x: 0, y: 0}
|
||||
m_DetailTexSpeed: {x: 0, y: 0}
|
||||
m_CustomRoot: {fileID: 0}
|
||||
m_Flip: 0
|
||||
--- !u!114 &2068343015
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2068343012}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &2068343016
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2068343012}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 320007022}
|
||||
- {fileID: 1740148343}
|
||||
- {fileID: 1303535693}
|
||||
- {fileID: 1076137589}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f70ff0f1e25b4388b9bcb38d619f7bf
|
||||
PrefabImporter:
|
||||
guid: 36defbd49737346888941c302d8fd96e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
@@ -0,0 +1,123 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3e220b3071ad46a58b9051928389c6b
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b8df35684c964c1da889d4128ed94ed
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-7987516966893236458
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
|
||||
m_Name: Bloom
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
skipIterations:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
threshold:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.99
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 2
|
||||
scatter:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.7
|
||||
clamp:
|
||||
m_OverrideState: 0
|
||||
m_Value: 65472
|
||||
tint:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
||||
highQualityFiltering:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
downscale:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
maxIterations:
|
||||
m_OverrideState: 0
|
||||
m_Value: 6
|
||||
dirtTexture:
|
||||
m_OverrideState: 0
|
||||
m_Value: {fileID: 0}
|
||||
dimension: 1
|
||||
dirtIntensity:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
--- !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: d7fd9488000d3734a9e00ee676215985, type: 3}
|
||||
m_Name: MultiColorDissolve
|
||||
m_EditorClassIdentifier:
|
||||
components:
|
||||
- {fileID: -7987516966893236458}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57ac8962e3fd34b1ab7016e803973b51
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,80 @@
|
||||
using Coffee.UIEffects;
|
||||
using UnityEngine;
|
||||
|
||||
[ExecuteAlways]
|
||||
public class MultiColorDissolve : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private UIEffect m_Base;
|
||||
|
||||
[Header("Dissolve 1")]
|
||||
[SerializeField] private UIEffect m_Dissolve1;
|
||||
|
||||
[ColorUsage(true, true)]
|
||||
[SerializeField]
|
||||
private Color m_DissolveColor1 = Color.red;
|
||||
|
||||
[Range(0, 0.1f)]
|
||||
[SerializeField]
|
||||
private float m_Delay1 = 0.05f;
|
||||
|
||||
[Range(0, 0.2f)]
|
||||
[SerializeField]
|
||||
private float m_Width1 = 0.1f;
|
||||
|
||||
[Range(0, 1f)]
|
||||
[SerializeField]
|
||||
private float m_Softness1 = 0.5f;
|
||||
|
||||
[Header("Dissolve 2")]
|
||||
[SerializeField]
|
||||
private UIEffect m_Dissolve2;
|
||||
|
||||
[ColorUsage(true, true)]
|
||||
[SerializeField]
|
||||
private Color m_DissolveColor2 = Color.magenta;
|
||||
|
||||
[Range(0, 0.1f)]
|
||||
[SerializeField]
|
||||
private float m_Delay2 = 0.1f;
|
||||
|
||||
[Range(0, 0.2f)]
|
||||
[SerializeField]
|
||||
private float m_Width2 = 0.1f;
|
||||
|
||||
[Range(0, 1f)]
|
||||
[SerializeField]
|
||||
private float m_Softness2 = 0.5f;
|
||||
|
||||
[Space]
|
||||
[Range(0, 1)] [SerializeField] private float m_Rate;
|
||||
|
||||
public void SetRate(float rate)
|
||||
{
|
||||
m_Rate = rate;
|
||||
if (m_Base)
|
||||
{
|
||||
m_Base.transitionRate = rate;
|
||||
}
|
||||
|
||||
if (m_Dissolve1)
|
||||
{
|
||||
m_Dissolve1.transitionRate = rate - m_Delay1;
|
||||
m_Dissolve1.transitionColor = m_DissolveColor1;
|
||||
m_Dissolve1.transitionWidth = m_Width1;
|
||||
m_Dissolve1.transitionSoftness = m_Softness1;
|
||||
}
|
||||
|
||||
if (m_Dissolve2)
|
||||
{
|
||||
m_Dissolve2.transitionRate = rate - m_Delay2 * 2;
|
||||
m_Dissolve2.transitionColor = m_DissolveColor2;
|
||||
m_Dissolve2.transitionWidth = m_Width2;
|
||||
m_Dissolve2.transitionSoftness = m_Softness2;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
SetRate(m_Rate);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23cc1f211cd264050a641c01c4a6d77a
|
||||
guid: 1cb0fa86a0fba445092aa81b4974b7cd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ea354ac6895e4e7489fd006c9b61082
|
||||
PrefabImporter:
|
||||
guid: ba87f0cfb8c4b4eaea328308391c06e5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -38,7 +38,6 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.37311924, g: 0.38073963, b: 0.3587269, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@@ -253,6 +252,7 @@ MonoBehaviour:
|
||||
m_UseTargetTransform: 1
|
||||
m_SamplingScale: 1
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_CustomRoot: {fileID: 0}
|
||||
--- !u!114 &571623417
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -395,6 +395,7 @@ Canvas:
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 27
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
@@ -476,7 +477,7 @@ GameObject:
|
||||
- component: {fileID: 1120943173}
|
||||
- component: {fileID: 1120943172}
|
||||
m_Layer: 5
|
||||
m_Name: UIEffect (1)
|
||||
m_Name: UIEffect_KeyFeature
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -491,16 +492,16 @@ RectTransform:
|
||||
m_GameObject: {fileID: 1120943170}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_LocalScale: {x: 2, y: 2, z: 2}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 986199155}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 125, y: -57}
|
||||
m_SizeDelta: {x: 627.607, y: 970.6}
|
||||
m_AnchoredPosition: {x: 0, y: -12.107}
|
||||
m_SizeDelta: {x: 404, y: 512}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1120943172
|
||||
MonoBehaviour:
|
||||
@@ -515,93 +516,111 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 1
|
||||
m_ToneIntensity: 0.875
|
||||
m_ToneIntensity: 0.5
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 6
|
||||
m_ColorIntensity: 0.7
|
||||
m_Color: {r: 0.745283, g: 0, b: 0.11693734, a: 1}
|
||||
m_ColorIntensity: 0.5
|
||||
m_Color: {r: 0.5377358, g: 0, b: 0.09190052, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 5
|
||||
m_SamplingIntensity: 0.197
|
||||
m_SamplingFilter: 1
|
||||
m_SamplingIntensity: 0
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 3
|
||||
m_TransitionRate: 0.411
|
||||
m_TransitionFilter: 8
|
||||
m_TransitionRate: 0
|
||||
m_TransitionReverse: 0
|
||||
m_TransitionTex: {fileID: 2800000, guid: 5a9e7b253d8344331a9ef15185eaa629, type: 3}
|
||||
m_TransitionTex: {fileID: 2800000, guid: 51cf4ae69d327428fbac4ee73e8587fe, type: 3}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionRotation: 120
|
||||
m_TransitionTexSpeed: {x: 0, y: 0}
|
||||
m_TransitionRotation: 45
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.071
|
||||
m_TransitionSoftness: 0.401
|
||||
m_TransitionWidth: 0.5
|
||||
m_TransitionSoftness: 0.475
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5019608, b: 1.0039216, a: 1}
|
||||
m_Min: 0.5
|
||||
m_Max: 0.85
|
||||
m_TransitionColorFilter: 1
|
||||
m_TransitionColor: {r: 0, g: 0, b: 0, a: 0.5019608}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1}
|
||||
m_TargetRange: 0.118
|
||||
m_TargetColor: {r: 0.15686275, g: 0.72156864, b: 0.8509804, a: 1}
|
||||
m_TargetRange: 0.033
|
||||
m_TargetSoftness: 0.5
|
||||
m_BlendType: 1
|
||||
m_SrcBlendMode: 1
|
||||
m_DstBlendMode: 10
|
||||
m_ShadowMode: 0
|
||||
m_ShadowDistance: {x: 5, y: -5}
|
||||
m_ShadowIteration: 4
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowMode: 4
|
||||
m_ShadowDistance: {x: 3, y: -3}
|
||||
m_ShadowIteration: 2
|
||||
m_ShadowFade: 0.1
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_ShadowColor: {r: 0, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 1
|
||||
m_GradationMode: 10
|
||||
m_GradationIntensity: 0.75
|
||||
m_GradationColorFilter: 1
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 0, b: 0, a: 1}
|
||||
key1: {r: 1, g: 0.8571428, b: 0, a: 1}
|
||||
key2: {r: 0.2857144, g: 1, b: 0, a: 0}
|
||||
key3: {r: 0, g: 1, b: 0.57142854, a: 0}
|
||||
key4: {r: 0, g: 0.5714288, b: 1, a: 0}
|
||||
key5: {r: 0.28571415, g: 0, b: 1, a: 0}
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 0.2857144, g: 1, b: 0, a: 1}
|
||||
key2: {r: 1, g: 1, b: 1, a: 1}
|
||||
key3: {r: 0, g: 0.5714288, b: 1, a: 0}
|
||||
key4: {r: 1, g: 1, b: 1, a: 0}
|
||||
key5: {r: 1, g: 0, b: 0.8571429, a: 0}
|
||||
key6: {r: 1, g: 0, b: 0.8571429, a: 0}
|
||||
key7: {r: 1, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 9830
|
||||
ctime2: 18724
|
||||
ctime3: 28720
|
||||
ctime4: 38165
|
||||
ctime5: 46838
|
||||
ctime0: 10879
|
||||
ctime1: 21823
|
||||
ctime2: 32768
|
||||
ctime3: 43646
|
||||
ctime4: 54591
|
||||
ctime5: 65535
|
||||
ctime6: 56173
|
||||
ctime7: 65535
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime2: 65535
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_NumColorKeys: 8
|
||||
m_Mode: 1
|
||||
m_NumColorKeys: 6
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: -0.349
|
||||
m_GradationScale: 0.62374645
|
||||
m_GradationRotation: 0
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 0.15
|
||||
m_GradationRotation: 135
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeMode: 2
|
||||
m_EdgeWidth: 0.05
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeColor: {r: 1, g: 0.2688679, b: 0.76984084, a: 1}
|
||||
m_EdgeColorGlow: 0
|
||||
m_EdgeShinyRate: 0.75
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinySpeed: 1
|
||||
m_EdgeShinyAutoPlaySpeed: 0
|
||||
m_PatternArea: 1
|
||||
m_DetailFilter: 0
|
||||
m_DetailIntensity: 1
|
||||
m_DetailThreshold:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_DetailTex: {fileID: 0}
|
||||
m_DetailTexScale: {x: 1, y: 1}
|
||||
m_DetailTexOffset: {x: 0, y: 0}
|
||||
m_DetailTexSpeed: {x: 0, y: 0}
|
||||
m_CustomRoot: {fileID: 0}
|
||||
m_Flip: 0
|
||||
--- !u!114 &1120943173
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -654,7 +673,7 @@ GameObject:
|
||||
- component: {fileID: 1242517206}
|
||||
- component: {fileID: 1242517205}
|
||||
m_Layer: 5
|
||||
m_Name: UIEffect
|
||||
m_Name: UIEffect_Inspector
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -671,7 +690,8 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 2125393230}
|
||||
m_Father: {fileID: 986199155}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -718,6 +738,31 @@ MonoBehaviour:
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_SeparateReverseCurve: 0
|
||||
m_ReverseCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 1
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 1
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_Delay: 0.5
|
||||
m_Duration: 1
|
||||
m_Interval: 0.5
|
||||
@@ -728,6 +773,9 @@ MonoBehaviour:
|
||||
m_OnComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnChangedRate:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &1242517206
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -748,7 +796,7 @@ MonoBehaviour:
|
||||
m_Color: {r: 1, g: 0.08701122, b: 0, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 1
|
||||
m_SamplingIntensity: 1
|
||||
m_SamplingIntensity: 0.7
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 3
|
||||
@@ -757,6 +805,7 @@ MonoBehaviour:
|
||||
m_TransitionTex: {fileID: 2800000, guid: 5a9e7b253d8344331a9ef15185eaa629, type: 3}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionTexSpeed: {x: 0, y: 0}
|
||||
m_TransitionRotation: 120
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.074
|
||||
@@ -773,7 +822,7 @@ MonoBehaviour:
|
||||
m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1}
|
||||
m_TargetRange: 0.118
|
||||
m_TargetSoftness: 0.5
|
||||
m_BlendType: 1
|
||||
m_BlendType: 0
|
||||
m_SrcBlendMode: 1
|
||||
m_DstBlendMode: 10
|
||||
m_ShadowMode: 4
|
||||
@@ -783,11 +832,15 @@ MonoBehaviour:
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 2
|
||||
m_GradationMode: 10
|
||||
m_GradationIntensity: 1
|
||||
m_GradationColorFilter: 1
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 0, b: 0, a: 1}
|
||||
@@ -817,17 +870,30 @@ MonoBehaviour:
|
||||
m_Mode: 0
|
||||
m_NumColorKeys: 8
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: -0.349
|
||||
m_GradationScale: 0.62374645
|
||||
m_GradationRotation: 0
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 60
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 2
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 6
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeColorGlow: 0
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinySpeed: 1
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
m_DetailFilter: 1
|
||||
m_DetailIntensity: 1
|
||||
m_DetailThreshold:
|
||||
m_Min: 0.25
|
||||
m_Max: 0.5
|
||||
m_DetailTex: {fileID: 2800000, guid: dee1cb6c2ee294c6087ea9d89d368417, type: 3}
|
||||
m_DetailTexScale: {x: 1, y: 1}
|
||||
m_DetailTexOffset: {x: 0, y: 0}
|
||||
m_DetailTexSpeed: {x: 0, y: 0}
|
||||
m_CustomRoot: {fileID: 2125393230}
|
||||
m_Flip: 1
|
||||
--- !u!114 &1242517207
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -935,6 +1001,7 @@ MonoBehaviour:
|
||||
m_TransitionTex: {fileID: 0}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionTexSpeed: {x: 0, y: 0}
|
||||
m_TransitionRotation: 0
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.2
|
||||
@@ -964,8 +1031,12 @@ MonoBehaviour:
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationIntensity: 1
|
||||
m_GradationColorFilter: 1
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -1003,9 +1074,22 @@ MonoBehaviour:
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeColorGlow: 0
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinySpeed: 1
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
m_DetailFilter: 0
|
||||
m_DetailIntensity: 1
|
||||
m_DetailThreshold:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_DetailTex: {fileID: 0}
|
||||
m_DetailTexScale: {x: 1, y: 1}
|
||||
m_DetailTexOffset: {x: 0, y: 0}
|
||||
m_DetailTexSpeed: {x: 0, y: 0}
|
||||
m_CustomRoot: {fileID: 0}
|
||||
m_Flip: 0
|
||||
--- !u!114 &1567169364
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1082,6 +1166,31 @@ MonoBehaviour:
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_SeparateReverseCurve: 0
|
||||
m_ReverseCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 1
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 1
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_Delay: 0.5
|
||||
m_Duration: 1
|
||||
m_Interval: 0.5
|
||||
@@ -1092,3 +1201,42 @@ MonoBehaviour:
|
||||
m_OnComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnChangedRate:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &2125393229
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2125393230}
|
||||
m_Layer: 5
|
||||
m_Name: Root
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2125393230
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2125393229}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1242517204}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
||||
+7207
-6183
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@ using Debug = UnityEngine.Debug;
|
||||
|
||||
internal static class TextMeshProSupport
|
||||
{
|
||||
private const string k_Version = "userData: v5.6.0";
|
||||
private const string k_Version = "userData: v5.8.0";
|
||||
private const string k_VersionUnity6 = k_Version + " (Unity 6)";
|
||||
|
||||
private static readonly Dictionary<string, string> s_FileGuids = new Dictionary<string, string>()
|
||||
|
||||
@@ -103,7 +103,7 @@ NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
@@ -116,7 +116,7 @@ NavMeshSettings:
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
@@ -154,6 +154,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1238718230}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -272,13 +273,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 216727156}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &853562893
|
||||
GameObject:
|
||||
@@ -358,7 +359,6 @@ Canvas:
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 27
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
@@ -376,6 +376,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 974292077}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -415,6 +416,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1439618203}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -480,6 +482,8 @@ MonoBehaviour:
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationIntensity: 1
|
||||
m_GradationColorFilter: 1
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -511,7 +515,6 @@ MonoBehaviour:
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_ColorSpace: -1
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
@@ -522,11 +525,22 @@ MonoBehaviour:
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeColorGlow: 0
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
m_DetailFilter: 0
|
||||
m_DetailIntensity: 1
|
||||
m_DetailThreshold:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_DetailTex: {fileID: 0}
|
||||
m_DetailTexScale: {x: 1, y: 1}
|
||||
m_DetailTexOffset: {x: 0, y: 0}
|
||||
m_DetailTexSpeed: {x: 0, y: 0}
|
||||
m_CustomRoot: {fileID: 0}
|
||||
m_Flip: 0
|
||||
--- !u!114 &899451495
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -672,6 +686,7 @@ RectTransform:
|
||||
- {fileID: 1439618203}
|
||||
- {fileID: 1238718230}
|
||||
m_Father: {fileID: 853562897}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -750,6 +765,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1238718230}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -899,6 +915,7 @@ RectTransform:
|
||||
- {fileID: 171138033}
|
||||
- {fileID: 1039816999}
|
||||
m_Father: {fileID: 974292077}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -945,17 +962,9 @@ Camera:
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
@@ -989,13 +998,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1419796999}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1439618202
|
||||
GameObject:
|
||||
@@ -1028,6 +1037,7 @@ RectTransform:
|
||||
- {fileID: 1624967587}
|
||||
- {fileID: 899451493}
|
||||
m_Father: {fileID: 974292077}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -1045,7 +1055,7 @@ GameObject:
|
||||
- component: {fileID: 1624967587}
|
||||
- component: {fileID: 1624967590}
|
||||
- component: {fileID: 1624967589}
|
||||
- component: {fileID: 1624967588}
|
||||
- component: {fileID: 1624967592}
|
||||
- component: {fileID: 1624967591}
|
||||
m_Layer: 5
|
||||
m_Name: Unity-Chan
|
||||
@@ -1067,118 +1077,13 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1439618203}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -72, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1624967588
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1624967586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 0
|
||||
m_ToneIntensity: 1
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 1
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ColorGlow: 0
|
||||
m_SamplingFilter: 0
|
||||
m_SamplingIntensity: 0.5
|
||||
m_SamplingWidth: 1
|
||||
m_SamplingScale: 1
|
||||
m_TransitionFilter: 3
|
||||
m_TransitionRate: 0.5
|
||||
m_TransitionReverse: 0
|
||||
m_TransitionTex: {fileID: 2800000, guid: b438fd66429e341d690c1ad9fba13fae, type: 3}
|
||||
m_TransitionTexScale: {x: 1, y: 1}
|
||||
m_TransitionTexOffset: {x: 0, y: 0}
|
||||
m_TransitionTexSpeed: {x: 0, y: 0}
|
||||
m_TransitionRotation: 0
|
||||
m_TransitionKeepAspectRatio: 1
|
||||
m_TransitionWidth: 0.2
|
||||
m_TransitionSoftness: 0.5
|
||||
m_TransitionRange:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_TransitionColorFilter: 6
|
||||
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
|
||||
m_TransitionColorGlow: 0
|
||||
m_TransitionPatternReverse: 0
|
||||
m_TransitionAutoPlaySpeed: 0
|
||||
m_TargetMode: 0
|
||||
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TargetRange: 1
|
||||
m_TargetSoftness: 0.5
|
||||
m_BlendType: 1
|
||||
m_SrcBlendMode: 1
|
||||
m_DstBlendMode: 10
|
||||
m_ShadowMode: 0
|
||||
m_ShadowDistance: {x: 1, y: -1}
|
||||
m_ShadowIteration: 1
|
||||
m_ShadowFade: 0.9
|
||||
m_ShadowMirrorScale: 0.5
|
||||
m_ShadowBlurIntensity: 1
|
||||
m_ShadowColorFilter: 4
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 65535
|
||||
ctime2: 0
|
||||
ctime3: 0
|
||||
ctime4: 0
|
||||
ctime5: 0
|
||||
ctime6: 0
|
||||
ctime7: 0
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_ColorSpace: -1
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
m_GradationOffset: 0
|
||||
m_GradationScale: 1
|
||||
m_GradationRotation: 0
|
||||
m_AllowToModifyMeshShape: 1
|
||||
m_EdgeMode: 0
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
m_CustomRoot: {fileID: 0}
|
||||
--- !u!114 &1624967589
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1231,10 +1136,30 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_Horizontal: 1
|
||||
m_Vertical: 1
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
--- !u!114 &1624967592
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1419797002}
|
||||
- {fileID: 216727159}
|
||||
- {fileID: 853562897}
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1624967586}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f19b7e2285c104f6ca47d583f3e5444f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectFactor: 0.5
|
||||
m_Width: 0.125
|
||||
m_Rotation: 135
|
||||
m_Softness: 1
|
||||
m_Brightness: 0.5
|
||||
m_Gloss: 1
|
||||
m_EffectArea: 0
|
||||
m_Player:
|
||||
play: 0
|
||||
initialPlayDelay: 0
|
||||
duration: 1
|
||||
loop: 0
|
||||
loopDelay: 0
|
||||
updateMode: 0
|
||||
m_TransitionTexture: {fileID: 2800000, guid: 297e4244884ca46788412fdf92bbdb8b, type: 3}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c00285a6a9d0843f4a7da23d7dda6582
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
using UnityEditor;
|
||||
|
||||
internal static class UserDataEditor
|
||||
{
|
||||
[InitializeOnLoadMethod]
|
||||
private static void InitializeOnLoadMethod()
|
||||
{
|
||||
Editor.finishedDefaultHeaderGUI += OnFinishedDefaultHeaderGUI;
|
||||
}
|
||||
|
||||
private static void OnFinishedDefaultHeaderGUI(Editor editor)
|
||||
{
|
||||
var importer = editor.target as AssetImporter;
|
||||
if (!importer)
|
||||
{
|
||||
if (!AssetDatabase.Contains(editor.target)) return;
|
||||
|
||||
importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(editor.target));
|
||||
}
|
||||
|
||||
if (!importer) return;
|
||||
|
||||
EditorGUIUtility.labelWidth = 55;
|
||||
importer.userData = EditorGUILayout.DelayedTextField("userdata", importer.userData);
|
||||
AssetDatabase.WriteImportSettingsIfDirty(importer.assetPath);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92afd1c51675640e88e3abb238cd225f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -11,11 +11,13 @@ ShaderVariantCollection:
|
||||
- first: {fileID: 4800000, guid: 935b7be1c88464d2eb87204fdfab5a38, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords: COLOR_HSV_MODIFIER GLOW_ON UNDERLAY_ON
|
||||
- keywords: COLOR_FILTER GLOW_ON GRADATION_GRADIENT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY GLOW_ON UNDERLAY_ON
|
||||
- keywords: COLOR_FILTER GLOW_ON TRANSITION_BURN UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_REPLACE EDGE_PLAIN GLOW_ON UNDERLAY_ON
|
||||
- keywords: COLOR_FILTER GLOW_ON UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: EDGE_PLAIN GLOW_ON UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON
|
||||
passType: 0
|
||||
@@ -27,57 +29,42 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SAMPLING_RGB_SHIFT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SHADOW_COLOR_REPLACE TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON SHADOW_COLOR_REPLACE UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
|
||||
- keywords: GLOW_ON TRANSITION_BURN UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN UNDERLAY_ON
|
||||
- keywords: GLOW_ON TRANSITION_DISSOLVE UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
|
||||
UNDERLAY_ON
|
||||
- keywords: GLOW_ON TRANSITION_MELT UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNDERLAY_ON
|
||||
- keywords: GLOW_ON TRANSITION_PATTERN UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_PATTERN UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNDERLAY_ON
|
||||
passType: 0
|
||||
- keywords: GLOW_ON TRANSITION_COLOR_REPLACE TRANSITION_MELT UNDERLAY_ON
|
||||
- keywords: GLOW_ON TRANSITION_SHINY UNDERLAY_ON
|
||||
passType: 0
|
||||
- first: {fileID: 4800000, guid: 96246b1ead49a4c5a996fd477bc5a117, type: 3}
|
||||
second:
|
||||
variants:
|
||||
- keywords:
|
||||
passType: 0
|
||||
- keywords: COLOR_ADDITIVE
|
||||
- keywords: COLOR_FILTER
|
||||
passType: 0
|
||||
- keywords: COLOR_CONTRAST
|
||||
- keywords: COLOR_FILTER EDGE_PLAIN
|
||||
passType: 0
|
||||
- keywords: COLOR_HSV_MODIFIER
|
||||
- keywords: COLOR_FILTER EDGE_PLAIN TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: COLOR_HSV_MODIFIER TARGET_HUE
|
||||
- keywords: COLOR_FILTER EDGE_SHINY
|
||||
passType: 0
|
||||
- keywords: COLOR_HSV_MODIFIER TARGET_LUMINANCE
|
||||
- keywords: COLOR_FILTER SAMPLING_BLUR_FAST
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY
|
||||
- keywords: COLOR_FILTER SAMPLING_BLUR_FAST TONE_GRAYSCALE
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY SHADOW_COLOR_REPLACE
|
||||
- keywords: COLOR_FILTER SAMPLING_BLUR_FAST TONE_GRAYSCALE TRANSITION_DISSOLVE
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY_ADDITIVE
|
||||
- keywords: COLOR_FILTER TARGET_HUE
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY_ADDITIVE SAMPLING_BLUR_FAST TONE_GRAYSCALE TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_DISSOLVE
|
||||
- keywords: COLOR_FILTER TARGET_LUMINANCE
|
||||
passType: 0
|
||||
- keywords: COLOR_MULTIPLY_LUMINANCE
|
||||
passType: 0
|
||||
- keywords: COLOR_REPLACE
|
||||
passType: 0
|
||||
- keywords: COLOR_SUBTRACTIVE
|
||||
- keywords: COLOR_FILTER TRANSITION_MELT
|
||||
passType: 0
|
||||
- keywords: DETAIL_ADDITIVE
|
||||
passType: 0
|
||||
@@ -85,47 +72,41 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: DETAIL_MULTIPLY
|
||||
passType: 0
|
||||
- keywords: DETAIL_MULTIPLY EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY
|
||||
passType: 0
|
||||
- keywords: DETAIL_MULTIPLY_ADDITIVE
|
||||
passType: 0
|
||||
- keywords: DETAIL_REPLACE
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_PLAIN
|
||||
- keywords: DETAIL_SUBTRACTIVE
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_PLAIN SHADOW_COLOR_MULTIPLY_ADDITIVE
|
||||
- keywords: EDGE_PLAIN
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY
|
||||
- keywords: EDGE_PLAIN TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY SAMPLING_EDGE_ALPHA
|
||||
- keywords: EDGE_SHINY
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY SHADOW_COLOR_MULTIPLY_ADDITIVE
|
||||
- keywords: EDGE_SHINY SAMPLING_EDGE_ALPHA
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY TRANSITION_COLOR_MULTIPLY
|
||||
TRANSITION_PATTERN
|
||||
- keywords: EDGE_SHINY TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
TRANSITION_PATTERN
|
||||
- keywords: GRADATION_COLOR2
|
||||
passType: 0
|
||||
- keywords: EDGE_PLAIN SHADOW_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
|
||||
- keywords: GRADATION_COLOR4
|
||||
passType: 0
|
||||
- keywords: EDGE_PLAIN TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
|
||||
- keywords: GRADATION_GRADIENT
|
||||
passType: 0
|
||||
- keywords: GRADATION_RADIAL
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_DETAIL
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_FAST
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_MULTIPLY_ADDITIVE TONE_GRAYSCALE
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_REPLACE
|
||||
passType: 0
|
||||
- keywords: SAMPLING_BLUR_MEDIUM
|
||||
passType: 0
|
||||
- keywords: SAMPLING_EDGE_ALPHA
|
||||
passType: 0
|
||||
- keywords: SAMPLING_EDGE_LUMINANCE
|
||||
passType: 0
|
||||
- keywords: SAMPLING_EDGE_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MASK
|
||||
- keywords: SAMPLING_EDGE_LUMINANCE TRANSITION_MASK
|
||||
passType: 0
|
||||
- keywords: SAMPLING_PIXELATION
|
||||
passType: 0
|
||||
@@ -135,8 +116,6 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: SAMPLING_RGB_SHIFT
|
||||
passType: 0
|
||||
- keywords: SHADOW_COLOR_REPLACE
|
||||
passType: 0
|
||||
- keywords: TONE_GRAYSCALE
|
||||
passType: 0
|
||||
- keywords: TONE_NEGATIVE
|
||||
@@ -147,36 +126,32 @@ ShaderVariantCollection:
|
||||
passType: 0
|
||||
- keywords: TONE_SEPIA
|
||||
passType: 0
|
||||
- keywords: TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE
|
||||
- keywords: TRANSITION_BURN
|
||||
passType: 0
|
||||
- keywords: TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MASK
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_COLOR_REPLACE TRANSITION_MELT
|
||||
- keywords: TRANSITION_BURN UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_CUTOFF
|
||||
passType: 0
|
||||
- keywords: TRANSITION_DISSOLVE
|
||||
passType: 0
|
||||
- keywords: TRANSITION_DISSOLVE UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_FADE
|
||||
passType: 0
|
||||
- keywords: TRANSITION_MASK
|
||||
passType: 0
|
||||
- keywords: TRANSITION_MELT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_MELT UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_PATTERN
|
||||
passType: 0
|
||||
- keywords: TRANSITION_PATTERN UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
- keywords: TRANSITION_SHINY
|
||||
passType: 0
|
||||
- keywords: TRANSITION_SHINY UNITY_UI_CLIP_RECT
|
||||
passType: 0
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -189,10 +164,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 7d43f626d9b5f4d729097092ded48bdb, type: 3}
|
||||
m_Name: UIEffectProjectSettings
|
||||
m_EditorClassIdentifier:
|
||||
m_TransformSensitivity: 1
|
||||
m_RuntimePresets:
|
||||
- {fileID: 1645081683573595507, guid: 3b09ad143990c4c8795c6e93760e132a, type: 3}
|
||||
- {fileID: 1645081683573595507, guid: 4f70ff0f1e25b4388b9bcb38d619f7bf, type: 3}
|
||||
m_RuntimePresets: []
|
||||
m_RuntimePresetsV2:
|
||||
- {fileID: 11400000, guid: 460881a8263ce454799a8c689c28d8c9, type: 2}
|
||||
- {fileID: 11400000, guid: b919bc84de9254bcf8f614d392db83bb, type: 2}
|
||||
m_UseHDRColorPicker: 1
|
||||
m_ShaderVariantCollection: {fileID: -8740588384831342173}
|
||||
m_ShaderVariantRegistry:
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
./Packages/src/CHANGELOG.md
|
||||
@@ -4,7 +4,7 @@
|
||||
"com.coffee.minimal-resource": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
|
||||
"com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
||||
"com.coffee.symbolic-linker": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
|
||||
"com.unity.ide.rider": "3.0.34",
|
||||
"com.unity.ide.rider": "3.0.36",
|
||||
"com.unity.test-framework": "1.1.33",
|
||||
"com.unity.textmeshpro": "3.0.9",
|
||||
"com.unity.modules.animation": "1.0.0"
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "2045eaab5b485827cef8bf0bb9e1552dce4f8d6d"
|
||||
"hash": "4a182298bd6293c4e6e33dd40bb7a050847190d8"
|
||||
},
|
||||
"com.coffee.minimal-resource": {
|
||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "2bd2bf356dd692a39de9db2ff11faaf79fbfaea3"
|
||||
"hash": "4a182298bd6293c4e6e33dd40bb7a050847190d8"
|
||||
},
|
||||
"com.coffee.nano-monitor": {
|
||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
||||
@@ -21,14 +21,14 @@
|
||||
"dependencies": {
|
||||
"com.unity.ugui": "1.0.0"
|
||||
},
|
||||
"hash": "2045eaab5b485827cef8bf0bb9e1552dce4f8d6d"
|
||||
"hash": "4a182298bd6293c4e6e33dd40bb7a050847190d8"
|
||||
},
|
||||
"com.coffee.symbolic-linker": {
|
||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "3c280f1a8f4db5038b881ff07f270efd9638fa31"
|
||||
"hash": "4a182298bd6293c4e6e33dd40bb7a050847190d8"
|
||||
},
|
||||
"com.coffee.ui-effect": {
|
||||
"version": "file:src",
|
||||
@@ -46,7 +46,7 @@
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.34",
|
||||
"version": "3.0.36",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,3 +1,97 @@
|
||||
## [5.8.4](https://github.com/mob-sakai/UIEffect/compare/5.8.3...5.8.4) (2025-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* NRE while canvas is disabled ([a3773e3](https://github.com/mob-sakai/UIEffect/commit/a3773e33028c60517fb4e6c534f6280194df8e64)), closes [#342](https://github.com/mob-sakai/UIEffect/issues/342)
|
||||
|
||||
## [5.8.3](https://github.com/mob-sakai/UIEffect/compare/5.8.2...5.8.3) (2025-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* the alpha of the gradation color and gradient was being ignored ([3807e4c](https://github.com/mob-sakai/UIEffect/commit/3807e4c69aefaef04b2245522e7c5085ccc65a36)), closes [#341](https://github.com/mob-sakai/UIEffect/issues/341)
|
||||
|
||||
## [5.8.2](https://github.com/mob-sakai/UIEffect/compare/5.8.1...5.8.2) (2025-04-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `Flip` is ignored when loading a preset ([e1f3abf](https://github.com/mob-sakai/UIEffect/commit/e1f3abf7a65b62718b28e33ac2f7d700c3ae3f5a))
|
||||
* fix detail color ([90ab16c](https://github.com/mob-sakai/UIEffect/commit/90ab16c3fd46435ebf7c8e47ffb4ec521d2f61c9))
|
||||
* indicate in the inspector using tooltips and asterisks that `Rotation` and `Keep Aspect Ratio` are shared properties ([2cca822](https://github.com/mob-sakai/UIEffect/commit/2cca822413aa7580e1eb777c3295d1de928cd65f))
|
||||
|
||||
## [5.8.1](https://github.com/mob-sakai/UIEffect/compare/5.8.0...5.8.1) (2025-04-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* built-in presets cannot be used with `UIEffectReplica` ([1106f4b](https://github.com/mob-sakai/UIEffect/commit/1106f4bf4632e1372d44ced9a38e98209a6b55e8))
|
||||
* New presets ignore `DetailColor` property ([1143fbb](https://github.com/mob-sakai/UIEffect/commit/1143fbb84a1e08817de93f1349ee5cdad0972db5)), closes [#336](https://github.com/mob-sakai/UIEffect/issues/336)
|
||||
* prevent built-in preset assets from being editable ([0898d73](https://github.com/mob-sakai/UIEffect/commit/0898d730add42970fb74bf2ad8aca9809bf6dd39))
|
||||
|
||||
# [5.8.0](https://github.com/mob-sakai/UIEffect/compare/5.7.0...5.8.0) (2025-04-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `ShadowMode.Mirror` does not flip the effect ([37daad0](https://github.com/mob-sakai/UIEffect/commit/37daad01c4f3f4c259650b1493aeae204e0bd247))
|
||||
* fix alpha clipping for ShaderGraph ([ae177a8](https://github.com/mob-sakai/UIEffect/commit/ae177a800cba1561b523292279d7986d4eff9f9c))
|
||||
* unable to add editor presets as runtime presets to project settings ([726bb10](https://github.com/mob-sakai/UIEffect/commit/726bb100a0ad327619634ea73ccdccc36276d0d0)), closes [#330](https://github.com/mob-sakai/UIEffect/issues/330)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `DetailColor` property ([30bf783](https://github.com/mob-sakai/UIEffect/commit/30bf783320398d68b90b09b0dcf93738b4683e00)), closes [#332](https://github.com/mob-sakai/UIEffect/issues/332)
|
||||
* ScriptableObject based preset system ([f8682f3](https://github.com/mob-sakai/UIEffect/commit/f8682f3c9889fb56ff3cd9010934f998e121553a)), closes [#333](https://github.com/mob-sakai/UIEffect/issues/333)
|
||||
|
||||
# [5.7.0](https://github.com/mob-sakai/UIEffect/compare/5.6.4...5.7.0) (2025-04-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* colors appeared darker when alpha was low ([21172f3](https://github.com/mob-sakai/UIEffect/commit/21172f37c21792906ac9e33827c771d388397653))
|
||||
* shrink shader variants for color filters ([7f60a56](https://github.com/mob-sakai/UIEffect/commit/7f60a56a9af6b4ecee223b466f1b2499af0194f4))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `UIEffectReplica.flip` has been deprecated ([6af34e2](https://github.com/mob-sakai/UIEffect/commit/6af34e2994378fd33025b41fe08898b552aa08ab))
|
||||
* add `GradationIntensity` and `GradationColorFilter` properties ([a6781b9](https://github.com/mob-sakai/UIEffect/commit/a6781b92899c38f49eccfebf4173028955a5aced))
|
||||
* calculate the normalized position on the shader side ([01bbeed](https://github.com/mob-sakai/UIEffect/commit/01bbeedde7cf2d757d6d295475f0ad9acd24dce3)), closes [#323](https://github.com/mob-sakai/UIEffect/issues/323) [#324](https://github.com/mob-sakai/UIEffect/issues/324)
|
||||
* ShaderGraph support ([2dd2e26](https://github.com/mob-sakai/UIEffect/commit/2dd2e261666b611be3a1fd5ac112db34fd99038e)), closes [#326](https://github.com/mob-sakai/UIEffect/issues/326)
|
||||
|
||||
## [5.6.4](https://github.com/mob-sakai/UIEffect/compare/5.6.3...5.6.4) (2025-04-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* avoid potential allocations ([26da24d](https://github.com/mob-sakai/UIEffect/commit/26da24dbc4022dcd71e7a58e5f02a6922ba2ddff))
|
||||
* optional shaders do not support all shader combinations ([6014ab5](https://github.com/mob-sakai/UIEffect/commit/6014ab54d010872f8fee63fc961ac5ab2edd08e1))
|
||||
|
||||
## [5.6.3](https://github.com/mob-sakai/UIEffect/compare/5.6.2...5.6.3) (2025-04-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix a potential `ArgumentOutOfRangeException` that could occur when changing the FontAsset in TextMeshPro ([3b095bc](https://github.com/mob-sakai/UIEffect/commit/3b095bcebd8b1264c373b8b71c27d3c35f673f3b)), closes [#327](https://github.com/mob-sakai/UIEffect/issues/327)
|
||||
|
||||
## [5.6.2](https://github.com/mob-sakai/UIEffect/compare/5.6.1...5.6.2) (2025-04-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix a potential `ArgumentOutOfRangeException` that could occur when changing the FontAsset in TextMeshPro ([909281c](https://github.com/mob-sakai/UIEffect/commit/909281c66b702d8497e9f847c91b688716b9c6a7)), closes [#327](https://github.com/mob-sakai/UIEffect/issues/327)
|
||||
* Remove unnecessary vertex expansion ([974e3e8](https://github.com/mob-sakai/UIEffect/commit/974e3e8769d456c5cdd8eb1767a7cf57ab4d52fc))
|
||||
* undo now works correctly after clicking the 'Clear' button in the inspector ([75ed355](https://github.com/mob-sakai/UIEffect/commit/75ed355e27faf8962390eb6788e1887ffd1b5f89))
|
||||
|
||||
## [5.6.1](https://github.com/mob-sakai/UIEffect/compare/5.6.0...5.6.1) (2025-03-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* changes were not correctly marked as dirty when loading presets ([76be0fc](https://github.com/mob-sakai/UIEffect/commit/76be0fc860c27b89235b7fb9a766dcc38b3d9924))
|
||||
|
||||
# [5.6.0](https://github.com/mob-sakai/UIEffect/compare/5.5.3...5.6.0) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Coffee.UIEffects.Editors
|
||||
@@ -12,107 +11,16 @@ namespace Coffee.UIEffects.Editors
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIEffect), true)]
|
||||
[CanEditMultipleObjects]
|
||||
public class UIEffectEditor : Editor
|
||||
public class UIEffectEditor : UIEffectPropertyEditor
|
||||
{
|
||||
private class UIEffectEditorSettings : ScriptableSingleton<UIEffectEditorSettings>
|
||||
{
|
||||
public bool m_ExpandOthers = true;
|
||||
}
|
||||
|
||||
private static readonly PropertyInfo s_PiGradient = typeof(SerializedProperty)
|
||||
.GetProperty("gradientValue", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
private static readonly Func<SerializedProperty, Gradient> s_GetGradient =
|
||||
(Func<SerializedProperty, Gradient>)Delegate.CreateDelegate(typeof(Func<SerializedProperty, Gradient>),
|
||||
s_PiGradient.GetMethod);
|
||||
|
||||
private static readonly Action<SerializedProperty, Gradient> s_SetGradient =
|
||||
(Action<SerializedProperty, Gradient>)Delegate.CreateDelegate(typeof(Action<SerializedProperty, Gradient>),
|
||||
s_PiGradient.SetMethod);
|
||||
|
||||
private SerializedProperty _toneFilter;
|
||||
private SerializedProperty _toneIntensity;
|
||||
|
||||
private SerializedProperty _colorFilter;
|
||||
private SerializedProperty _color;
|
||||
private SerializedProperty _colorIntensity;
|
||||
private SerializedProperty _colorGlow;
|
||||
|
||||
private SerializedProperty _samplingFilter;
|
||||
private SerializedProperty _samplingIntensity;
|
||||
private SerializedProperty _samplingWidth;
|
||||
private SerializedProperty _samplingScale;
|
||||
|
||||
private SerializedProperty _transitionFilter;
|
||||
private SerializedProperty _transitionRate;
|
||||
private SerializedProperty _transitionTex;
|
||||
private SerializedProperty _transitionTexScale;
|
||||
private SerializedProperty _transitionTexOffset;
|
||||
private SerializedProperty _transitionTexSpeed;
|
||||
private SerializedProperty _transitionReverse;
|
||||
private SerializedProperty _transitionRotation;
|
||||
private SerializedProperty _transitionKeepAspectRatio;
|
||||
private SerializedProperty _transitionWidth;
|
||||
private SerializedProperty _transitionSoftness;
|
||||
private SerializedProperty _transitionRange;
|
||||
private SerializedProperty _transitionColorFilter;
|
||||
private SerializedProperty _transitionColor;
|
||||
private SerializedProperty _transitionColorGlow;
|
||||
private SerializedProperty _transitionPatternReverse;
|
||||
private SerializedProperty _transitionAutoPlaySpeed;
|
||||
|
||||
private SerializedProperty _targetMode;
|
||||
private SerializedProperty _targetColor;
|
||||
private SerializedProperty _targetRange;
|
||||
private SerializedProperty _targetSoftness;
|
||||
|
||||
private SerializedProperty _blendType;
|
||||
private SerializedProperty _srcBlendMode;
|
||||
private SerializedProperty _dstBlendMode;
|
||||
|
||||
private SerializedProperty _shadowMode;
|
||||
private SerializedProperty _shadowDistance;
|
||||
private SerializedProperty _shadowDistanceX;
|
||||
private SerializedProperty _shadowDistanceY;
|
||||
private SerializedProperty _shadowIteration;
|
||||
private SerializedProperty _shadowFade;
|
||||
private SerializedProperty _shadowMirrorScale;
|
||||
private SerializedProperty _shadowBlurIntensity;
|
||||
private SerializedProperty _shadowColorFilter;
|
||||
private SerializedProperty _shadowColor;
|
||||
private SerializedProperty _shadowColorGlow;
|
||||
|
||||
private SerializedProperty _gradationMode;
|
||||
private SerializedProperty _gradationColor1;
|
||||
private SerializedProperty _gradationColor2;
|
||||
private SerializedProperty _gradationColor3;
|
||||
private SerializedProperty _gradationColor4;
|
||||
private SerializedProperty _gradationGradient;
|
||||
private SerializedProperty _gradationOffset;
|
||||
private SerializedProperty _gradationScale;
|
||||
private SerializedProperty _gradationRotation;
|
||||
|
||||
private SerializedProperty _edgeMode;
|
||||
private SerializedProperty _edgeWidth;
|
||||
private SerializedProperty _edgeColorFilter;
|
||||
private SerializedProperty _edgeColor;
|
||||
private SerializedProperty _edgeColorGlow;
|
||||
private SerializedProperty _edgeShinyRate;
|
||||
private SerializedProperty _edgeShinyWidth;
|
||||
private SerializedProperty _edgeShinyAutoPlaySpeed;
|
||||
private SerializedProperty _patternArea;
|
||||
|
||||
private SerializedProperty _detailFilter;
|
||||
private SerializedProperty _detailIntensity;
|
||||
private SerializedProperty _detailThreshold;
|
||||
private SerializedProperty _detailTex;
|
||||
private SerializedProperty _detailTexScale;
|
||||
private SerializedProperty _detailTexOffset;
|
||||
private SerializedProperty _detailTexSpeed;
|
||||
|
||||
private SerializedProperty _allowToModifyMeshShape;
|
||||
private SerializedProperty _customRoot;
|
||||
private SerializedProperty _flip;
|
||||
|
||||
private static bool expandOthers
|
||||
{
|
||||
@@ -120,354 +28,27 @@ namespace Coffee.UIEffects.Editors
|
||||
get => UIEffectEditorSettings.instance.m_ExpandOthers;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
protected override void OnEnable()
|
||||
{
|
||||
if (target == null) return;
|
||||
base.OnEnable();
|
||||
|
||||
_toneFilter = serializedObject.FindProperty("m_ToneFilter");
|
||||
_toneIntensity = serializedObject.FindProperty("m_ToneIntensity");
|
||||
|
||||
_colorFilter = serializedObject.FindProperty("m_ColorFilter");
|
||||
_color = serializedObject.FindProperty("m_Color");
|
||||
_colorIntensity = serializedObject.FindProperty("m_ColorIntensity");
|
||||
_colorGlow = serializedObject.FindProperty("m_ColorGlow");
|
||||
|
||||
_samplingFilter = serializedObject.FindProperty("m_SamplingFilter");
|
||||
_samplingIntensity = serializedObject.FindProperty("m_SamplingIntensity");
|
||||
_samplingWidth = serializedObject.FindProperty("m_SamplingWidth");
|
||||
_samplingScale = serializedObject.FindProperty("m_SamplingScale");
|
||||
|
||||
_transitionFilter = serializedObject.FindProperty("m_TransitionFilter");
|
||||
_transitionRate = serializedObject.FindProperty("m_TransitionRate");
|
||||
_transitionTex = serializedObject.FindProperty("m_TransitionTex");
|
||||
_transitionTexScale = serializedObject.FindProperty("m_TransitionTexScale");
|
||||
_transitionTexOffset = serializedObject.FindProperty("m_TransitionTexOffset");
|
||||
_transitionTexSpeed = serializedObject.FindProperty("m_TransitionTexSpeed");
|
||||
_transitionReverse = serializedObject.FindProperty("m_TransitionReverse");
|
||||
_transitionRotation = serializedObject.FindProperty("m_TransitionRotation");
|
||||
_transitionKeepAspectRatio = serializedObject.FindProperty("m_TransitionKeepAspectRatio");
|
||||
_transitionWidth = serializedObject.FindProperty("m_TransitionWidth");
|
||||
_transitionSoftness = serializedObject.FindProperty("m_TransitionSoftness");
|
||||
_transitionRange = serializedObject.FindProperty("m_TransitionRange");
|
||||
_transitionColorFilter = serializedObject.FindProperty("m_TransitionColorFilter");
|
||||
_transitionColor = serializedObject.FindProperty("m_TransitionColor");
|
||||
_transitionColorGlow = serializedObject.FindProperty("m_TransitionColorGlow");
|
||||
_transitionPatternReverse = serializedObject.FindProperty("m_TransitionPatternReverse");
|
||||
_transitionAutoPlaySpeed = serializedObject.FindProperty("m_TransitionAutoPlaySpeed");
|
||||
|
||||
_targetMode = serializedObject.FindProperty("m_TargetMode");
|
||||
_targetColor = serializedObject.FindProperty("m_TargetColor");
|
||||
_targetRange = serializedObject.FindProperty("m_TargetRange");
|
||||
_targetSoftness = serializedObject.FindProperty("m_TargetSoftness");
|
||||
|
||||
_blendType = serializedObject.FindProperty("m_BlendType");
|
||||
_srcBlendMode = serializedObject.FindProperty("m_SrcBlendMode");
|
||||
_dstBlendMode = serializedObject.FindProperty("m_DstBlendMode");
|
||||
|
||||
_shadowMode = serializedObject.FindProperty("m_ShadowMode");
|
||||
_shadowDistance = serializedObject.FindProperty("m_ShadowDistance");
|
||||
_shadowDistanceX = _shadowDistance.FindPropertyRelative("x");
|
||||
_shadowDistanceY = _shadowDistance.FindPropertyRelative("y");
|
||||
_shadowIteration = serializedObject.FindProperty("m_ShadowIteration");
|
||||
_shadowFade = serializedObject.FindProperty("m_ShadowFade");
|
||||
_shadowMirrorScale = serializedObject.FindProperty("m_ShadowMirrorScale");
|
||||
_shadowBlurIntensity = serializedObject.FindProperty("m_ShadowBlurIntensity");
|
||||
_shadowColorFilter = serializedObject.FindProperty("m_ShadowColorFilter");
|
||||
_shadowColor = serializedObject.FindProperty("m_ShadowColor");
|
||||
_shadowColorGlow = serializedObject.FindProperty("m_ShadowColorGlow");
|
||||
|
||||
_edgeMode = serializedObject.FindProperty("m_EdgeMode");
|
||||
_edgeWidth = serializedObject.FindProperty("m_EdgeWidth");
|
||||
_edgeColorFilter = serializedObject.FindProperty("m_EdgeColorFilter");
|
||||
_edgeColor = serializedObject.FindProperty("m_EdgeColor");
|
||||
_edgeColorGlow = serializedObject.FindProperty("m_EdgeColorGlow");
|
||||
_edgeShinyRate = serializedObject.FindProperty("m_EdgeShinyRate");
|
||||
_edgeShinyWidth = serializedObject.FindProperty("m_EdgeShinyWidth");
|
||||
_edgeShinyAutoPlaySpeed = serializedObject.FindProperty("m_EdgeShinyAutoPlaySpeed");
|
||||
_patternArea = serializedObject.FindProperty("m_PatternArea");
|
||||
|
||||
_gradationMode = serializedObject.FindProperty("m_GradationMode");
|
||||
_gradationColor1 = serializedObject.FindProperty("m_GradationColor1");
|
||||
_gradationColor2 = serializedObject.FindProperty("m_GradationColor2");
|
||||
_gradationColor3 = serializedObject.FindProperty("m_GradationColor3");
|
||||
_gradationColor4 = serializedObject.FindProperty("m_GradationColor4");
|
||||
_gradationGradient = serializedObject.FindProperty("m_GradationGradient");
|
||||
_gradationOffset = serializedObject.FindProperty("m_GradationOffset");
|
||||
_gradationScale = serializedObject.FindProperty("m_GradationScale");
|
||||
_gradationRotation = serializedObject.FindProperty("m_GradationRotation");
|
||||
|
||||
_detailFilter = serializedObject.FindProperty("m_DetailFilter");
|
||||
_detailIntensity = serializedObject.FindProperty("m_DetailIntensity");
|
||||
_detailThreshold = serializedObject.FindProperty("m_DetailThreshold");
|
||||
_detailTex = serializedObject.FindProperty("m_DetailTex");
|
||||
_detailTexScale = serializedObject.FindProperty("m_DetailTexScale");
|
||||
_detailTexOffset = serializedObject.FindProperty("m_DetailTexOffset");
|
||||
_detailTexSpeed = serializedObject.FindProperty("m_DetailTexSpeed");
|
||||
|
||||
_allowToModifyMeshShape = serializedObject.FindProperty("m_AllowToModifyMeshShape");
|
||||
_customRoot = serializedObject.FindProperty("m_CustomRoot");
|
||||
_flip = serializedObject.FindProperty("m_Flip");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
// Preset
|
||||
DrawPresetMenu(targets);
|
||||
DrawSeparator();
|
||||
|
||||
// Properties
|
||||
DrawProperties();
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
public void DrawProperties()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
// Tone filter
|
||||
if (DrawHeaderPopup(_toneFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_toneIntensity);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Color filter
|
||||
DrawSeparator();
|
||||
var prevColorFilter = (ColorFilter)_colorFilter.intValue;
|
||||
if (DrawHeaderPopup(_colorFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_colorIntensity);
|
||||
DrawColor(_color, (ColorFilter)_colorFilter.intValue, prevColorFilter, false);
|
||||
EditorGUILayout.PropertyField(_colorGlow);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
EditorGUI.EndChangeCheck();
|
||||
|
||||
// Sampling filter
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_samplingFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_samplingIntensity);
|
||||
if (_samplingFilter.intValue == (int)SamplingFilter.EdgeAlpha
|
||||
|| _samplingFilter.intValue == (int)SamplingFilter.EdgeLuminance)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_samplingWidth);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Transition filter
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_transitionFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_transitionRate);
|
||||
EditorGUILayout.PropertyField(_transitionTex);
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_transitionTexScale, EditorGUIUtility.TrTempContent("Scale"));
|
||||
EditorGUILayout.PropertyField(_transitionTexOffset, EditorGUIUtility.TrTempContent("Offset"));
|
||||
EditorGUILayout.PropertyField(_transitionTexSpeed, EditorGUIUtility.TrTempContent("Speed"));
|
||||
if (_transitionTexSpeed.vector2Value != Vector2.zero)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionRotation, EditorGUIUtility.TrTempContent("Rotation"));
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio,
|
||||
EditorGUIUtility.TrTempContent("Keep Aspect Ratio"));
|
||||
EditorGUILayout.PropertyField(_transitionReverse, EditorGUIUtility.TrTempContent("Reverse"));
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
if (_transitionFilter.intValue == (int)TransitionFilter.Pattern)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_transitionWidth, EditorGUIUtility.TrTempContent("Pattern Size"));
|
||||
EditorGUILayout.PropertyField(_transitionRange, EditorGUIUtility.TrTempContent("Pattern Range"));
|
||||
EditorGUILayout.PropertyField(_transitionPatternReverse,
|
||||
EditorGUIUtility.TrTempContent("Pattern Reverse"));
|
||||
DrawColor(_transitionColorFilter, _transitionColor, null);
|
||||
}
|
||||
else if (2 < _transitionFilter.intValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_transitionWidth);
|
||||
EditorGUILayout.PropertyField(_transitionSoftness);
|
||||
DrawColor(_transitionColorFilter, _transitionColor, _transitionColorGlow);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionAutoPlaySpeed);
|
||||
if (0 < _transitionFilter.intValue && !Mathf.Approximately(0, _transitionAutoPlaySpeed.floatValue))
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Target
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_targetMode))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_targetColor);
|
||||
EditorGUILayout.PropertyField(_targetRange);
|
||||
EditorGUILayout.PropertyField(_targetSoftness);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Blending
|
||||
DrawSeparator();
|
||||
if (!DrawHeaderPopup(_blendType))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_srcBlendMode);
|
||||
EditorGUILayout.PropertyField(_dstBlendMode);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Shadow
|
||||
DrawSeparator();
|
||||
var prevShadowMode = (ShadowMode)_shadowMode.intValue;
|
||||
if (DrawHeaderPopup(_shadowMode))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
if ((ShadowMode)_shadowMode.intValue == ShadowMode.Mirror)
|
||||
{
|
||||
if (prevShadowMode != ShadowMode.Mirror)
|
||||
{
|
||||
_shadowDistanceX.floatValue = 0.5f;
|
||||
_shadowDistanceY.floatValue = 0f;
|
||||
}
|
||||
|
||||
EditorGUILayout.Slider(_shadowDistanceX, 0, 1, "Reflection");
|
||||
EditorGUILayout.PropertyField(_shadowDistanceY, EditorGUIUtility.TrTempContent("Offset"));
|
||||
EditorGUILayout.PropertyField(_shadowMirrorScale);
|
||||
EditorGUILayout.PropertyField(_shadowFade);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (prevShadowMode == ShadowMode.Mirror)
|
||||
{
|
||||
_shadowDistanceX.floatValue = 1f;
|
||||
_shadowDistanceY.floatValue = -1f;
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_shadowDistance);
|
||||
EditorGUILayout.PropertyField(_shadowIteration);
|
||||
DrawColor(_shadowColorFilter, _shadowColor, _shadowColorGlow, false);
|
||||
EditorGUILayout.PropertyField(_shadowFade);
|
||||
}
|
||||
|
||||
// Shadow blur intensity
|
||||
switch ((SamplingFilter)_samplingFilter.intValue)
|
||||
{
|
||||
case SamplingFilter.BlurFast:
|
||||
case SamplingFilter.BlurMedium:
|
||||
case SamplingFilter.BlurDetail:
|
||||
EditorGUILayout.PropertyField(_shadowBlurIntensity);
|
||||
break;
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Gradient
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_gradationMode))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
switch ((GradationMode)_gradationMode.intValue)
|
||||
{
|
||||
case GradationMode.HorizontalGradient:
|
||||
case GradationMode.VerticalGradient:
|
||||
case GradationMode.AngleGradient:
|
||||
DrawGradientField(_gradationGradient);
|
||||
break;
|
||||
case GradationMode.Diagonal:
|
||||
DrawColorPickerField("Top", _gradationColor1, _gradationColor2);
|
||||
DrawColorPickerField("Bottom", _gradationColor3, _gradationColor4);
|
||||
break;
|
||||
default:
|
||||
DrawColorPickerField(EditorGUILayout.GetControlRect(), _gradationColor1, true);
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.width -= 24;
|
||||
DrawColorPickerField(r, _gradationColor2, true);
|
||||
|
||||
r.x += r.width + 4;
|
||||
r.width = 20;
|
||||
SwapColorsButton(r, _gradationColor1, _gradationColor2);
|
||||
break;
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_gradationOffset);
|
||||
EditorGUILayout.PropertyField(_gradationScale);
|
||||
|
||||
if ((GradationMode)_gradationMode.intValue == GradationMode.Angle
|
||||
|| (GradationMode)_gradationMode.intValue == GradationMode.AngleGradient)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_gradationRotation);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Edge Mode
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_edgeMode))
|
||||
{
|
||||
EditorGUILayout.PropertyField(_edgeWidth);
|
||||
DrawColor(_edgeColorFilter, _edgeColor, _edgeColorGlow);
|
||||
|
||||
if ((EdgeMode)_edgeMode.intValue == EdgeMode.Shiny)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_edgeShinyRate);
|
||||
EditorGUILayout.PropertyField(_edgeShinyWidth);
|
||||
EditorGUILayout.PropertyField(_edgeShinyAutoPlaySpeed);
|
||||
|
||||
if (!Mathf.Approximately(0, _edgeShinyAutoPlaySpeed.floatValue))
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
if (_transitionFilter.intValue == (int)TransitionFilter.Pattern)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_patternArea);
|
||||
}
|
||||
}
|
||||
|
||||
// Detail filter
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_detailFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
if ((DetailFilter)_detailFilter.intValue == DetailFilter.Masking)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_detailThreshold);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.PropertyField(_detailIntensity);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_detailTex);
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_detailTexScale, EditorGUIUtility.TrTempContent("Scale"));
|
||||
EditorGUILayout.PropertyField(_detailTexOffset, EditorGUIUtility.TrTempContent("Offset"));
|
||||
EditorGUILayout.PropertyField(_detailTexSpeed, EditorGUIUtility.TrTempContent("Speed"));
|
||||
if (_detailTexSpeed.vector2Value != Vector2.zero)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionRotation, EditorGUIUtility.TrTempContent("Rotation"));
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio,
|
||||
EditorGUIUtility.TrTempContent("Keep Aspect Ratio"));
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Others
|
||||
DrawSeparator();
|
||||
expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(expandOthers, "Others");
|
||||
if (expandOthers)
|
||||
@@ -475,143 +56,11 @@ namespace Coffee.UIEffects.Editors
|
||||
EditorGUILayout.PropertyField(_samplingScale);
|
||||
EditorGUILayout.PropertyField(_allowToModifyMeshShape);
|
||||
EditorGUILayout.PropertyField(_customRoot);
|
||||
EditorGUILayout.PropertyField(_flip);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawColorPickerField(string label, SerializedProperty color1, SerializedProperty color2)
|
||||
{
|
||||
var labelWidth = EditorGUIUtility.labelWidth;
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.width -= 24;
|
||||
EditorGUI.PrefixLabel(new Rect(r.x, r.y, labelWidth, r.height), EditorGUIUtility.TrTempContent(label));
|
||||
|
||||
var indentLevel = EditorGUI.indentLevel;
|
||||
EditorGUI.indentLevel = 0;
|
||||
var rPos = new Rect(r.x + labelWidth, r.y, (r.width - labelWidth) / 2, r.height);
|
||||
DrawColorPickerField(rPos, GUIContent.none, color1, true);
|
||||
|
||||
rPos.x += rPos.width;
|
||||
DrawColorPickerField(rPos, GUIContent.none, color2, true);
|
||||
|
||||
// Swap colors button
|
||||
SwapColorsButton(new Rect(r.x + r.width + 4, r.y, 20, 20), color1, color2);
|
||||
EditorGUI.indentLevel = indentLevel;
|
||||
}
|
||||
|
||||
private static void DrawColorPickerField(Rect rect, SerializedProperty color, bool showAlpha)
|
||||
{
|
||||
var label = EditorGUIUtility.TrTempContent(color.displayName);
|
||||
label.tooltip = color.tooltip;
|
||||
DrawColorPickerField(rect, label, color, showAlpha);
|
||||
}
|
||||
|
||||
private static void DrawColorPickerField(Rect rect, GUIContent label, SerializedProperty color, bool showAlpha)
|
||||
{
|
||||
var hdr = UIEffectProjectSettings.useHdrColorPicker;
|
||||
EditorGUI.showMixedValue = color.hasMultipleDifferentValues;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
var colorValue = EditorGUI.ColorField(rect, label, color.colorValue, true, showAlpha, hdr);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
color.colorValue = colorValue;
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawGradientField(SerializedProperty gradient)
|
||||
{
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
var label = EditorGUIUtility.TrTempContent(gradient.displayName);
|
||||
label.tooltip = gradient.tooltip;
|
||||
var hdr = UIEffectProjectSettings.useHdrColorPicker;
|
||||
EditorGUI.showMixedValue = gradient.hasMultipleDifferentValues;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
var gradientValue = EditorGUI.GradientField(r, label, s_GetGradient(gradient), hdr);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
s_SetGradient(gradient, gradientValue);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawColor(SerializedProperty color, ColorFilter filter, ColorFilter prevFilter,
|
||||
bool showAlpha = true)
|
||||
{
|
||||
if (filter == ColorFilter.None) return;
|
||||
|
||||
if (filter == ColorFilter.HsvModifier)
|
||||
{
|
||||
if (prevFilter != ColorFilter.HsvModifier)
|
||||
{
|
||||
color.colorValue = Color.black;
|
||||
}
|
||||
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("r"), -0.5f, 0.5f, "Hue");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("g"), -1f, 1f, "Saturation");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("b"), -1f, 1f, "Value");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("a"), 0, 1, "Alpha");
|
||||
}
|
||||
else if (filter == ColorFilter.Contrast)
|
||||
{
|
||||
if (prevFilter != ColorFilter.Contrast)
|
||||
{
|
||||
color.colorValue = Color.black;
|
||||
}
|
||||
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("r"), -1f, 1f, "Contrast");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("g"), -1f, 1f, "Brightness");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("a"), 0, 1, "Alpha");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (prevFilter == ColorFilter.HsvModifier || prevFilter == ColorFilter.Contrast)
|
||||
{
|
||||
color.colorValue = Color.white;
|
||||
}
|
||||
|
||||
DrawColorPickerField(EditorGUILayout.GetControlRect(), color, showAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawColor(SerializedProperty filter, SerializedProperty color, SerializedProperty glow,
|
||||
bool showAlpha = true)
|
||||
{
|
||||
var prevFilter = (ColorFilter)filter.intValue;
|
||||
EditorGUILayout.PropertyField(filter);
|
||||
if (filter.intValue == (int)ColorFilter.None) return;
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
DrawColor(color, (ColorFilter)filter.intValue, prevFilter, showAlpha);
|
||||
|
||||
if (glow != null)
|
||||
{
|
||||
EditorGUILayout.PropertyField(glow);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
|
||||
private static void SwapColorsButton(Rect rect, SerializedProperty color1, SerializedProperty color2)
|
||||
{
|
||||
if (GUI.Button(rect, EditorGUIUtility.IconContent("preaudioloopoff"), "iconbutton"))
|
||||
{
|
||||
(color1.colorValue, color2.colorValue) = (color2.colorValue, color1.colorValue);
|
||||
}
|
||||
}
|
||||
|
||||
private static bool DrawHeaderPopup(SerializedProperty sp)
|
||||
{
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
var pos = EditorGUI.PrefixLabel(r, EditorGUIUtility.TrTempContent(sp.displayName), EditorStyles.boldLabel);
|
||||
EditorGUI.PropertyField(pos, sp, GUIContent.none);
|
||||
return 0 < sp.intValue;
|
||||
}
|
||||
|
||||
private static void DrawSeparator()
|
||||
{
|
||||
EditorGUILayout.Space(4);
|
||||
GUILayout.Label(GUIContent.none, "sv_iconselector_sep", GUILayout.ExpandWidth(true));
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
private static void DrawPresetMenu(Object[] targets)
|
||||
@@ -665,32 +114,28 @@ namespace Coffee.UIEffects.Editors
|
||||
r.width = 55;
|
||||
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Clear"), "MiniButton"))
|
||||
{
|
||||
Undo.RecordObjects(targets, "Clear UIEffect");
|
||||
Array.ForEach(targets.OfType<UIEffect>().ToArray(), Unsupported.SmartReset);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DropDownPreset(Rect r, Predicate<(string path, bool builtin, UIEffect preset)> valid,
|
||||
Action<UIEffect> callback)
|
||||
public static void DropDownPreset(Rect r, Predicate<(string path, bool builtin, UIEffectPreset preset)> valid,
|
||||
Action<UIEffectPreset> callback)
|
||||
{
|
||||
var menu = new GenericMenu();
|
||||
var separatorAdded = false;
|
||||
foreach (var preset in UIEffectProjectSettings.LoadEditorPresets())
|
||||
foreach (var preset in UIEffectProjectSettings.LoadEditorPresetsV2())
|
||||
{
|
||||
var (path, builtin) = UIEffectProjectSettings.GetPresetPath(preset);
|
||||
if (valid != null && valid.Invoke((path, builtin, preset)) == false) continue;
|
||||
|
||||
if (builtin)
|
||||
if (builtin && !separatorAdded)
|
||||
{
|
||||
if (!separatorAdded)
|
||||
{
|
||||
separatorAdded = true;
|
||||
menu.AddSeparator(string.Empty);
|
||||
}
|
||||
|
||||
path = path.Substring(6).Replace(" - ", "/");
|
||||
separatorAdded = true;
|
||||
menu.AddSeparator(string.Empty);
|
||||
}
|
||||
|
||||
menu.AddItem(new GUIContent(path), false, x => callback(x as UIEffect), preset);
|
||||
menu.AddItem(new GUIContent(path.Replace("-", "/")), false, x => callback(x as UIEffectPreset), preset);
|
||||
}
|
||||
|
||||
menu.DropDown(r);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using UnityEditor;
|
||||
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(UIEffectPreset), true)]
|
||||
[CanEditMultipleObjects]
|
||||
public class UIEffectPresetEditor : UIEffectPropertyEditor
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 60b661e9d7501483dbd6b02ffa399405
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,8 @@
|
||||
using UnityEditor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Coffee.UIEffectInternal;
|
||||
using UnityEditorInternal;
|
||||
@@ -9,24 +13,29 @@ namespace Coffee.UIEffects.Editors
|
||||
public class UIEffectProjectSettingsEditor : Editor
|
||||
{
|
||||
private ReorderableList _reorderableList;
|
||||
private SerializedProperty _runtimePresets;
|
||||
private SerializedProperty _runtimePresetsV2;
|
||||
private SerializedProperty _useHDRColorPicker;
|
||||
private SerializedProperty _transformSensitivity;
|
||||
private bool _isInitialized;
|
||||
private ShaderVariantRegistryEditor _shaderVariantRegistryEditor;
|
||||
private UIEffect[] _legacyPresets;
|
||||
private bool _expandRuntimePresets;
|
||||
private bool _expandLegacyPrefabs;
|
||||
|
||||
private void InitializeIfNeeded()
|
||||
{
|
||||
if (_isInitialized) return;
|
||||
|
||||
_transformSensitivity = serializedObject.FindProperty("m_TransformSensitivity");
|
||||
_useHDRColorPicker = serializedObject.FindProperty("m_UseHDRColorPicker");
|
||||
var runtimePresets = serializedObject.FindProperty("m_RuntimePresets");
|
||||
_reorderableList = new ReorderableList(serializedObject, runtimePresets, true, true, true, true);
|
||||
_runtimePresets = serializedObject.FindProperty("m_RuntimePresets");
|
||||
_runtimePresetsV2 = serializedObject.FindProperty("m_RuntimePresetsV2");
|
||||
|
||||
_reorderableList = new ReorderableList(serializedObject, _runtimePresetsV2, true, true, true, true);
|
||||
_reorderableList.drawHeaderCallback = rect => EditorGUI.LabelField(rect, "Runtime Presets");
|
||||
_reorderableList.drawElementCallback = (rect, index, isActive, isFocused) =>
|
||||
{
|
||||
var element = _reorderableList.serializedProperty.GetArrayElementAtIndex(index);
|
||||
var effect = element.objectReferenceValue as UIEffect;
|
||||
var effect = element.objectReferenceValue as UIEffectPreset;
|
||||
rect.y += 2;
|
||||
rect.height = EditorGUIUtility.singleLineHeight;
|
||||
|
||||
@@ -37,13 +46,18 @@ namespace Coffee.UIEffects.Editors
|
||||
_reorderableList.onAddDropdownCallback = (rect, list) =>
|
||||
{
|
||||
UIEffectEditor.DropDownPreset(rect,
|
||||
x => !x.builtin && !UIEffectProjectSettings.instance.m_RuntimePresets.Contains(x.preset),
|
||||
x => !UIEffectProjectSettings.instance.m_RuntimePresetsV2.Contains(x.preset),
|
||||
UIEffectProjectSettings.RegisterRuntimePreset);
|
||||
};
|
||||
|
||||
_isInitialized = true;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_legacyPresets = UIEffectProjectSettings.LoadEditorPresets();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
_isInitialized = false;
|
||||
@@ -55,12 +69,12 @@ namespace Coffee.UIEffects.Editors
|
||||
InitializeIfNeeded();
|
||||
|
||||
// Settings
|
||||
// Transform sensitivity.
|
||||
EditorGUILayout.PropertyField(_transformSensitivity);
|
||||
|
||||
// Runtime Presets
|
||||
_reorderableList.DoLayoutList();
|
||||
|
||||
// Legacy Presets
|
||||
DrawLegacyPresets();
|
||||
|
||||
// Editor
|
||||
// Use HDR color pickers.
|
||||
EditorGUILayout.PropertyField(_useHDRColorPicker);
|
||||
@@ -84,5 +98,118 @@ namespace Coffee.UIEffects.Editors
|
||||
GUILayout.FlexibleSpace();
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
private void DrawLegacyPresets()
|
||||
{
|
||||
for (var i = _runtimePresets.arraySize - 1; 0 <= i; i--)
|
||||
{
|
||||
if (!_runtimePresets.GetArrayElementAtIndex(i).objectReferenceValue)
|
||||
{
|
||||
_runtimePresets.DeleteArrayElementAtIndex(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (_legacyPresets.Length == 0 && _runtimePresets.arraySize == 0) return;
|
||||
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
var title = EditorGUIUtility.TrTextContent("Legacy Presets (Obsolete)", "", "warning");
|
||||
EditorGUILayout.LabelField(title,
|
||||
EditorStyles.boldLabel);
|
||||
|
||||
_expandRuntimePresets = EditorGUILayout.Foldout(_expandRuntimePresets,
|
||||
$"Legacy Runtime Presets ({_runtimePresets.arraySize})");
|
||||
if (_expandRuntimePresets)
|
||||
{
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
for (var i = 0; i < _runtimePresets.arraySize; i++)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_runtimePresets.GetArrayElementAtIndex(i), GUIContent.none);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
||||
_expandLegacyPrefabs = EditorGUILayout.Foldout(_expandLegacyPrefabs,
|
||||
$"Legacy Preset Prefabs ({_legacyPresets.Length})");
|
||||
if (_expandLegacyPrefabs)
|
||||
{
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
foreach (var legacyPreset in _legacyPresets)
|
||||
{
|
||||
EditorGUILayout.ObjectField(legacyPreset, typeof(UIEffect), false);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
||||
EditorGUILayout.TextArea(
|
||||
"The prefab based presets system is obsolete.\n" +
|
||||
"In the new preset system, UIEffectPreset assets are used.\n" +
|
||||
"Click the button below to convert your legacy preset prefabs into UIEffectPreset assets.\n" +
|
||||
"The UIEffectPreset asset will be saved in the same directory as the prefab, using the same name.\n" +
|
||||
"You can load the new preset via the UIEffect.LoadPreset method.",
|
||||
EditorStyles.miniLabel);
|
||||
if (GUILayout.Button(EditorGUIUtility.TrTempContent("Convert All Legacy Presets in the Project")))
|
||||
{
|
||||
ConvertAllLegacyPresets();
|
||||
_runtimePresets.ClearArray();
|
||||
}
|
||||
|
||||
if (GUILayout.Button(EditorGUIUtility.TrTempContent("Delete All Legacy Presets in the Project")))
|
||||
{
|
||||
foreach (var legacyPreset in _legacyPresets)
|
||||
{
|
||||
AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(legacyPreset));
|
||||
}
|
||||
|
||||
_runtimePresets.ClearArray();
|
||||
_legacyPresets = Array.Empty<UIEffect>();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
private void ConvertAllLegacyPresets()
|
||||
{
|
||||
var length = _legacyPresets.Length;
|
||||
var converted = new HashSet<string>(UIEffectProjectSettings.LoadEditorPresetsV2()
|
||||
.Select(x => Path.ChangeExtension(AssetDatabase.GetAssetPath(x), ".prefab")));
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
var preset = _legacyPresets[i];
|
||||
var path = AssetDatabase.GetAssetPath(preset);
|
||||
if (converted.Contains(path)) continue;
|
||||
|
||||
EditorUtility.DisplayProgressBar("Convert To UIEffectPreset", path, (float)i / length);
|
||||
var newPath = Path.ChangeExtension(path, ".asset");
|
||||
newPath = AssetDatabase.GenerateUniqueAssetPath(newPath);
|
||||
var newPreset = CreateInstance<UIEffectPreset>();
|
||||
preset.SavePreset(newPreset, false);
|
||||
newPreset.hideFlags = preset.hideFlags;
|
||||
AssetDatabase.CreateAsset(newPreset, newPath);
|
||||
|
||||
var importer = AssetImporter.GetAtPath(path);
|
||||
var newImporter = AssetImporter.GetAtPath(newPath);
|
||||
newImporter.userData = importer.userData;
|
||||
newImporter.SetAssetBundleNameAndVariant(importer.assetBundleName, importer.assetBundleVariant);
|
||||
newImporter.SaveAndReimport();
|
||||
|
||||
// Remove the legacy preset from the project settings and add the new preset.
|
||||
if (UIEffectProjectSettings.instance.m_RuntimePresets.Contains(preset))
|
||||
{
|
||||
var count = _runtimePresetsV2.arraySize;
|
||||
_runtimePresetsV2.InsertArrayElementAtIndex(count);
|
||||
_runtimePresetsV2.GetArrayElementAtIndex(count).objectReferenceValue = newPreset;
|
||||
}
|
||||
}
|
||||
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,594 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
public abstract class UIEffectPropertyEditor : Editor
|
||||
{
|
||||
private static readonly PropertyInfo s_PiGradient = typeof(SerializedProperty)
|
||||
.GetProperty("gradientValue", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
private static readonly Func<SerializedProperty, Gradient> s_GetGradient =
|
||||
(Func<SerializedProperty, Gradient>)Delegate.CreateDelegate(typeof(Func<SerializedProperty, Gradient>),
|
||||
s_PiGradient.GetMethod);
|
||||
|
||||
private static readonly Action<SerializedProperty, Gradient> s_SetGradient =
|
||||
(Action<SerializedProperty, Gradient>)Delegate.CreateDelegate(typeof(Action<SerializedProperty, Gradient>),
|
||||
s_PiGradient.SetMethod);
|
||||
|
||||
private SerializedProperty _toneFilter;
|
||||
private SerializedProperty _toneIntensity;
|
||||
|
||||
private SerializedProperty _colorFilter;
|
||||
private SerializedProperty _color;
|
||||
private SerializedProperty _colorIntensity;
|
||||
private SerializedProperty _colorGlow;
|
||||
|
||||
private SerializedProperty _samplingFilter;
|
||||
private SerializedProperty _samplingIntensity;
|
||||
private SerializedProperty _samplingWidth;
|
||||
|
||||
private SerializedProperty _transitionFilter;
|
||||
private SerializedProperty _transitionRate;
|
||||
private SerializedProperty _transitionTex;
|
||||
private SerializedProperty _transitionTexScale;
|
||||
private SerializedProperty _transitionTexOffset;
|
||||
private SerializedProperty _transitionTexSpeed;
|
||||
private SerializedProperty _transitionReverse;
|
||||
private SerializedProperty _transitionRotation;
|
||||
private SerializedProperty _transitionKeepAspectRatio;
|
||||
private SerializedProperty _transitionWidth;
|
||||
private SerializedProperty _transitionSoftness;
|
||||
private SerializedProperty _transitionRange;
|
||||
private SerializedProperty _transitionColorFilter;
|
||||
private SerializedProperty _transitionColor;
|
||||
private SerializedProperty _transitionColorGlow;
|
||||
private SerializedProperty _transitionPatternReverse;
|
||||
private SerializedProperty _transitionAutoPlaySpeed;
|
||||
|
||||
private SerializedProperty _targetMode;
|
||||
private SerializedProperty _targetColor;
|
||||
private SerializedProperty _targetRange;
|
||||
private SerializedProperty _targetSoftness;
|
||||
|
||||
private SerializedProperty _blendType;
|
||||
private SerializedProperty _srcBlendMode;
|
||||
private SerializedProperty _dstBlendMode;
|
||||
|
||||
private SerializedProperty _shadowMode;
|
||||
private SerializedProperty _shadowDistance;
|
||||
private SerializedProperty _shadowDistanceX;
|
||||
private SerializedProperty _shadowDistanceY;
|
||||
private SerializedProperty _shadowIteration;
|
||||
private SerializedProperty _shadowFade;
|
||||
private SerializedProperty _shadowMirrorScale;
|
||||
private SerializedProperty _shadowBlurIntensity;
|
||||
private SerializedProperty _shadowColorFilter;
|
||||
private SerializedProperty _shadowColor;
|
||||
private SerializedProperty _shadowColorGlow;
|
||||
|
||||
private SerializedProperty _gradationMode;
|
||||
private SerializedProperty _gradationIntensity;
|
||||
private SerializedProperty _gradationColorFilter;
|
||||
private SerializedProperty _gradationColor1;
|
||||
private SerializedProperty _gradationColor2;
|
||||
private SerializedProperty _gradationColor3;
|
||||
private SerializedProperty _gradationColor4;
|
||||
private SerializedProperty _gradationGradient;
|
||||
private SerializedProperty _gradationOffset;
|
||||
private SerializedProperty _gradationScale;
|
||||
private SerializedProperty _gradationRotation;
|
||||
|
||||
private SerializedProperty _edgeMode;
|
||||
private SerializedProperty _edgeWidth;
|
||||
private SerializedProperty _edgeColorFilter;
|
||||
private SerializedProperty _edgeColor;
|
||||
private SerializedProperty _edgeColorGlow;
|
||||
private SerializedProperty _edgeShinyRate;
|
||||
private SerializedProperty _edgeShinyWidth;
|
||||
private SerializedProperty _edgeShinyAutoPlaySpeed;
|
||||
private SerializedProperty _patternArea;
|
||||
|
||||
private SerializedProperty _detailFilter;
|
||||
private SerializedProperty _detailIntensity;
|
||||
private SerializedProperty _detailColor;
|
||||
private SerializedProperty _detailThreshold;
|
||||
private SerializedProperty _detailTex;
|
||||
private SerializedProperty _detailTexScale;
|
||||
private SerializedProperty _detailTexOffset;
|
||||
private SerializedProperty _detailTexSpeed;
|
||||
|
||||
private SerializedProperty _flip;
|
||||
private static GUIContent s_RotationLabel = new GUIContent("* Rotation");
|
||||
private static GUIContent s_KeepAspectRatioLabel = new GUIContent("* Keep Aspect Ratio");
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
_toneFilter = serializedObject.FindProperty("m_ToneFilter");
|
||||
_toneIntensity = serializedObject.FindProperty("m_ToneIntensity");
|
||||
|
||||
_colorFilter = serializedObject.FindProperty("m_ColorFilter");
|
||||
_color = serializedObject.FindProperty("m_Color");
|
||||
_colorIntensity = serializedObject.FindProperty("m_ColorIntensity");
|
||||
_colorGlow = serializedObject.FindProperty("m_ColorGlow");
|
||||
|
||||
_samplingFilter = serializedObject.FindProperty("m_SamplingFilter");
|
||||
_samplingIntensity = serializedObject.FindProperty("m_SamplingIntensity");
|
||||
_samplingWidth = serializedObject.FindProperty("m_SamplingWidth");
|
||||
|
||||
_transitionFilter = serializedObject.FindProperty("m_TransitionFilter");
|
||||
_transitionRate = serializedObject.FindProperty("m_TransitionRate");
|
||||
_transitionTex = serializedObject.FindProperty("m_TransitionTex");
|
||||
_transitionTexScale = serializedObject.FindProperty("m_TransitionTexScale");
|
||||
_transitionTexOffset = serializedObject.FindProperty("m_TransitionTexOffset");
|
||||
_transitionTexSpeed = serializedObject.FindProperty("m_TransitionTexSpeed");
|
||||
_transitionReverse = serializedObject.FindProperty("m_TransitionReverse");
|
||||
_transitionRotation = serializedObject.FindProperty("m_TransitionRotation");
|
||||
_transitionKeepAspectRatio = serializedObject.FindProperty("m_TransitionKeepAspectRatio");
|
||||
_transitionWidth = serializedObject.FindProperty("m_TransitionWidth");
|
||||
_transitionSoftness = serializedObject.FindProperty("m_TransitionSoftness");
|
||||
_transitionRange = serializedObject.FindProperty("m_TransitionRange");
|
||||
_transitionColorFilter = serializedObject.FindProperty("m_TransitionColorFilter");
|
||||
_transitionColor = serializedObject.FindProperty("m_TransitionColor");
|
||||
_transitionColorGlow = serializedObject.FindProperty("m_TransitionColorGlow");
|
||||
_transitionPatternReverse = serializedObject.FindProperty("m_TransitionPatternReverse");
|
||||
_transitionAutoPlaySpeed = serializedObject.FindProperty("m_TransitionAutoPlaySpeed");
|
||||
|
||||
s_RotationLabel.tooltip = _transitionRotation.tooltip;
|
||||
s_KeepAspectRatioLabel.tooltip = _transitionKeepAspectRatio.tooltip;
|
||||
|
||||
_targetMode = serializedObject.FindProperty("m_TargetMode");
|
||||
_targetColor = serializedObject.FindProperty("m_TargetColor");
|
||||
_targetRange = serializedObject.FindProperty("m_TargetRange");
|
||||
_targetSoftness = serializedObject.FindProperty("m_TargetSoftness");
|
||||
|
||||
_blendType = serializedObject.FindProperty("m_BlendType");
|
||||
_srcBlendMode = serializedObject.FindProperty("m_SrcBlendMode");
|
||||
_dstBlendMode = serializedObject.FindProperty("m_DstBlendMode");
|
||||
|
||||
_shadowMode = serializedObject.FindProperty("m_ShadowMode");
|
||||
_shadowDistance = serializedObject.FindProperty("m_ShadowDistance");
|
||||
_shadowDistanceX = _shadowDistance.FindPropertyRelative("x");
|
||||
_shadowDistanceY = _shadowDistance.FindPropertyRelative("y");
|
||||
_shadowIteration = serializedObject.FindProperty("m_ShadowIteration");
|
||||
_shadowFade = serializedObject.FindProperty("m_ShadowFade");
|
||||
_shadowMirrorScale = serializedObject.FindProperty("m_ShadowMirrorScale");
|
||||
_shadowBlurIntensity = serializedObject.FindProperty("m_ShadowBlurIntensity");
|
||||
_shadowColorFilter = serializedObject.FindProperty("m_ShadowColorFilter");
|
||||
_shadowColor = serializedObject.FindProperty("m_ShadowColor");
|
||||
_shadowColorGlow = serializedObject.FindProperty("m_ShadowColorGlow");
|
||||
|
||||
_edgeMode = serializedObject.FindProperty("m_EdgeMode");
|
||||
_edgeWidth = serializedObject.FindProperty("m_EdgeWidth");
|
||||
_edgeColorFilter = serializedObject.FindProperty("m_EdgeColorFilter");
|
||||
_edgeColor = serializedObject.FindProperty("m_EdgeColor");
|
||||
_edgeColorGlow = serializedObject.FindProperty("m_EdgeColorGlow");
|
||||
_edgeShinyRate = serializedObject.FindProperty("m_EdgeShinyRate");
|
||||
_edgeShinyWidth = serializedObject.FindProperty("m_EdgeShinyWidth");
|
||||
_edgeShinyAutoPlaySpeed = serializedObject.FindProperty("m_EdgeShinyAutoPlaySpeed");
|
||||
_patternArea = serializedObject.FindProperty("m_PatternArea");
|
||||
|
||||
_gradationMode = serializedObject.FindProperty("m_GradationMode");
|
||||
_gradationIntensity = serializedObject.FindProperty("m_GradationIntensity");
|
||||
_gradationColorFilter = serializedObject.FindProperty("m_GradationColorFilter");
|
||||
_gradationColor1 = serializedObject.FindProperty("m_GradationColor1");
|
||||
_gradationColor2 = serializedObject.FindProperty("m_GradationColor2");
|
||||
_gradationColor3 = serializedObject.FindProperty("m_GradationColor3");
|
||||
_gradationColor4 = serializedObject.FindProperty("m_GradationColor4");
|
||||
_gradationGradient = serializedObject.FindProperty("m_GradationGradient");
|
||||
_gradationOffset = serializedObject.FindProperty("m_GradationOffset");
|
||||
_gradationScale = serializedObject.FindProperty("m_GradationScale");
|
||||
_gradationRotation = serializedObject.FindProperty("m_GradationRotation");
|
||||
|
||||
_detailFilter = serializedObject.FindProperty("m_DetailFilter");
|
||||
_detailIntensity = serializedObject.FindProperty("m_DetailIntensity");
|
||||
_detailColor = serializedObject.FindProperty("m_DetailColor");
|
||||
_detailThreshold = serializedObject.FindProperty("m_DetailThreshold");
|
||||
_detailTex = serializedObject.FindProperty("m_DetailTex");
|
||||
_detailTexScale = serializedObject.FindProperty("m_DetailTexScale");
|
||||
_detailTexOffset = serializedObject.FindProperty("m_DetailTexOffset");
|
||||
_detailTexSpeed = serializedObject.FindProperty("m_DetailTexSpeed");
|
||||
|
||||
_flip = serializedObject.FindProperty("m_Flip");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
DrawProperties();
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
public void DrawProperties()
|
||||
{
|
||||
// Tone filter
|
||||
if (DrawHeaderPopup(_toneFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_toneIntensity);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Color filter
|
||||
DrawSeparator();
|
||||
var prevColorFilter = (ColorFilter)_colorFilter.intValue;
|
||||
if (DrawHeaderPopup(_colorFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_colorIntensity);
|
||||
DrawColor(_color, (ColorFilter)_colorFilter.intValue, prevColorFilter, false);
|
||||
EditorGUILayout.PropertyField(_colorGlow);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
EditorGUI.EndChangeCheck();
|
||||
|
||||
// Sampling filter
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_samplingFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_samplingIntensity);
|
||||
if (_samplingFilter.intValue == (int)SamplingFilter.EdgeAlpha
|
||||
|| _samplingFilter.intValue == (int)SamplingFilter.EdgeLuminance)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_samplingWidth);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Transition filter
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_transitionFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_transitionRate);
|
||||
EditorGUILayout.PropertyField(_transitionTex);
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_transitionTexScale, EditorGUIUtility.TrTempContent("Scale"));
|
||||
EditorGUILayout.PropertyField(_transitionTexOffset, EditorGUIUtility.TrTempContent("Offset"));
|
||||
EditorGUILayout.PropertyField(_transitionTexSpeed, EditorGUIUtility.TrTempContent("Speed"));
|
||||
if (_transitionTexSpeed.vector2Value != Vector2.zero)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionRotation, s_RotationLabel);
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio, s_KeepAspectRatioLabel);
|
||||
EditorGUILayout.PropertyField(_transitionReverse, EditorGUIUtility.TrTempContent("Reverse"));
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
if (_transitionFilter.intValue == (int)TransitionFilter.Pattern)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_transitionWidth, EditorGUIUtility.TrTempContent("Pattern Size"));
|
||||
EditorGUILayout.PropertyField(_transitionRange, EditorGUIUtility.TrTempContent("Pattern Range"));
|
||||
EditorGUILayout.PropertyField(_transitionPatternReverse,
|
||||
EditorGUIUtility.TrTempContent("Pattern Reverse"));
|
||||
DrawColor(_transitionColorFilter, _transitionColor, null);
|
||||
}
|
||||
else if (2 < _transitionFilter.intValue)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_transitionWidth);
|
||||
EditorGUILayout.PropertyField(_transitionSoftness);
|
||||
DrawColor(_transitionColorFilter, _transitionColor, _transitionColorGlow);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionAutoPlaySpeed);
|
||||
if (0 < _transitionFilter.intValue && !Mathf.Approximately(0, _transitionAutoPlaySpeed.floatValue))
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Target
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_targetMode))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_targetColor);
|
||||
EditorGUILayout.PropertyField(_targetRange);
|
||||
EditorGUILayout.PropertyField(_targetSoftness);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Blending
|
||||
DrawSeparator();
|
||||
if (!DrawHeaderPopup(_blendType))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_srcBlendMode);
|
||||
EditorGUILayout.PropertyField(_dstBlendMode);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Shadow
|
||||
DrawSeparator();
|
||||
var prevShadowMode = (ShadowMode)_shadowMode.intValue;
|
||||
if (DrawHeaderPopup(_shadowMode))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
if ((ShadowMode)_shadowMode.intValue == ShadowMode.Mirror)
|
||||
{
|
||||
if (prevShadowMode != ShadowMode.Mirror)
|
||||
{
|
||||
_shadowDistanceX.floatValue = 0.5f;
|
||||
_shadowDistanceY.floatValue = 0f;
|
||||
}
|
||||
|
||||
EditorGUILayout.Slider(_shadowDistanceX, 0, 1, "Reflection");
|
||||
EditorGUILayout.PropertyField(_shadowDistanceY, EditorGUIUtility.TrTempContent("Offset"));
|
||||
EditorGUILayout.PropertyField(_shadowMirrorScale);
|
||||
EditorGUILayout.PropertyField(_shadowFade);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (prevShadowMode == ShadowMode.Mirror)
|
||||
{
|
||||
_shadowDistanceX.floatValue = 1f;
|
||||
_shadowDistanceY.floatValue = -1f;
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_shadowDistance);
|
||||
EditorGUILayout.PropertyField(_shadowIteration);
|
||||
DrawColor(_shadowColorFilter, _shadowColor, _shadowColorGlow, false);
|
||||
EditorGUILayout.PropertyField(_shadowFade);
|
||||
}
|
||||
|
||||
// Shadow blur intensity
|
||||
switch ((SamplingFilter)_samplingFilter.intValue)
|
||||
{
|
||||
case SamplingFilter.BlurFast:
|
||||
case SamplingFilter.BlurMedium:
|
||||
case SamplingFilter.BlurDetail:
|
||||
EditorGUILayout.PropertyField(_shadowBlurIntensity);
|
||||
break;
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Gradient
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_gradationMode))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_gradationColorFilter);
|
||||
switch ((GradationMode)_gradationMode.intValue)
|
||||
{
|
||||
case GradationMode.HorizontalGradient:
|
||||
case GradationMode.VerticalGradient:
|
||||
case GradationMode.AngleGradient:
|
||||
DrawGradientField(_gradationGradient);
|
||||
break;
|
||||
case GradationMode.Diagonal:
|
||||
DrawColorPickerField("Top", _gradationColor1, _gradationColor2);
|
||||
DrawColorPickerField("Bottom", _gradationColor3, _gradationColor4);
|
||||
break;
|
||||
default:
|
||||
DrawColorPickerField(EditorGUILayout.GetControlRect(), _gradationColor1, true);
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.width -= 24;
|
||||
DrawColorPickerField(r, _gradationColor2, true);
|
||||
|
||||
r.x += r.width + 4;
|
||||
r.width = 20;
|
||||
SwapColorsButton(r, _gradationColor1, _gradationColor2);
|
||||
break;
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_gradationIntensity);
|
||||
EditorGUILayout.PropertyField(_gradationOffset);
|
||||
EditorGUILayout.PropertyField(_gradationScale);
|
||||
|
||||
if ((GradationMode)_gradationMode.intValue == GradationMode.Angle
|
||||
|| (GradationMode)_gradationMode.intValue == GradationMode.AngleGradient)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_gradationRotation);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio, s_KeepAspectRatioLabel);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Edge Mode
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_edgeMode))
|
||||
{
|
||||
EditorGUILayout.PropertyField(_edgeWidth);
|
||||
DrawColor(_edgeColorFilter, _edgeColor, _edgeColorGlow);
|
||||
|
||||
if ((EdgeMode)_edgeMode.intValue == EdgeMode.Shiny)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_edgeShinyRate);
|
||||
EditorGUILayout.PropertyField(_edgeShinyWidth);
|
||||
EditorGUILayout.PropertyField(_edgeShinyAutoPlaySpeed);
|
||||
|
||||
if (!Mathf.Approximately(0, _edgeShinyAutoPlaySpeed.floatValue))
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
if (_transitionFilter.intValue == (int)TransitionFilter.Pattern)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_patternArea);
|
||||
}
|
||||
}
|
||||
|
||||
// Detail filter
|
||||
DrawSeparator();
|
||||
if (DrawHeaderPopup(_detailFilter))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
if ((DetailFilter)_detailFilter.intValue == DetailFilter.Masking)
|
||||
{
|
||||
EditorGUILayout.PropertyField(_detailThreshold);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.PropertyField(_detailIntensity);
|
||||
DrawColorPickerField(EditorGUILayout.GetControlRect(), _detailColor, true);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_detailTex);
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(_detailTexScale, EditorGUIUtility.TrTempContent("Scale"));
|
||||
EditorGUILayout.PropertyField(_detailTexOffset, EditorGUIUtility.TrTempContent("Offset"));
|
||||
EditorGUILayout.PropertyField(_detailTexSpeed, EditorGUIUtility.TrTempContent("Speed"));
|
||||
if (_detailTexSpeed.vector2Value != Vector2.zero)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_transitionRotation, s_RotationLabel);
|
||||
EditorGUILayout.PropertyField(_transitionKeepAspectRatio, s_KeepAspectRatioLabel);
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Flip
|
||||
DrawSeparator();
|
||||
DrawHeaderPopup(_flip);
|
||||
}
|
||||
|
||||
private static void DrawColorPickerField(string label, SerializedProperty color1, SerializedProperty color2)
|
||||
{
|
||||
var labelWidth = EditorGUIUtility.labelWidth;
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.width -= 24;
|
||||
EditorGUI.PrefixLabel(new Rect(r.x, r.y, labelWidth, r.height), EditorGUIUtility.TrTempContent(label));
|
||||
|
||||
var indentLevel = EditorGUI.indentLevel;
|
||||
EditorGUI.indentLevel = 0;
|
||||
var rPos = new Rect(r.x + labelWidth, r.y, (r.width - labelWidth) / 2, r.height);
|
||||
DrawColorPickerField(rPos, GUIContent.none, color1, true);
|
||||
|
||||
rPos.x += rPos.width;
|
||||
DrawColorPickerField(rPos, GUIContent.none, color2, true);
|
||||
|
||||
// Swap colors button
|
||||
SwapColorsButton(new Rect(r.x + r.width + 4, r.y, 20, 20), color1, color2);
|
||||
EditorGUI.indentLevel = indentLevel;
|
||||
}
|
||||
|
||||
private static void DrawColorPickerField(Rect rect, SerializedProperty color, bool showAlpha)
|
||||
{
|
||||
var label = EditorGUIUtility.TrTempContent(color.displayName);
|
||||
label.tooltip = color.tooltip;
|
||||
DrawColorPickerField(rect, label, color, showAlpha);
|
||||
}
|
||||
|
||||
private static void DrawColorPickerField(Rect rect, GUIContent label, SerializedProperty color, bool showAlpha)
|
||||
{
|
||||
var hdr = UIEffectProjectSettings.useHdrColorPicker;
|
||||
EditorGUI.showMixedValue = color.hasMultipleDifferentValues;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
var colorValue = EditorGUI.ColorField(rect, label, color.colorValue, true, showAlpha, hdr);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
color.colorValue = colorValue;
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawGradientField(SerializedProperty gradient)
|
||||
{
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
var label = EditorGUIUtility.TrTempContent(gradient.displayName);
|
||||
label.tooltip = gradient.tooltip;
|
||||
var hdr = UIEffectProjectSettings.useHdrColorPicker;
|
||||
EditorGUI.showMixedValue = gradient.hasMultipleDifferentValues;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
var gradientValue = EditorGUI.GradientField(r, label, s_GetGradient(gradient), hdr);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
s_SetGradient(gradient, gradientValue);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawColor(SerializedProperty color, ColorFilter filter, ColorFilter prevFilter,
|
||||
bool showAlpha = true)
|
||||
{
|
||||
if (filter == ColorFilter.None) return;
|
||||
|
||||
if (filter == ColorFilter.HsvModifier)
|
||||
{
|
||||
if (prevFilter != ColorFilter.HsvModifier)
|
||||
{
|
||||
color.colorValue = Color.black;
|
||||
}
|
||||
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("r"), -0.5f, 0.5f, "Hue");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("g"), -1f, 1f, "Saturation");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("b"), -1f, 1f, "Value");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("a"), 0, 1, "Alpha");
|
||||
}
|
||||
else if (filter == ColorFilter.Contrast)
|
||||
{
|
||||
if (prevFilter != ColorFilter.Contrast)
|
||||
{
|
||||
color.colorValue = Color.black;
|
||||
}
|
||||
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("r"), -1f, 1f, "Contrast");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("g"), -1f, 1f, "Brightness");
|
||||
EditorGUILayout.Slider(color.FindPropertyRelative("a"), 0, 1, "Alpha");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (prevFilter == ColorFilter.HsvModifier || prevFilter == ColorFilter.Contrast)
|
||||
{
|
||||
color.colorValue = Color.white;
|
||||
}
|
||||
|
||||
DrawColorPickerField(EditorGUILayout.GetControlRect(), color, showAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawColor(SerializedProperty filter, SerializedProperty color, SerializedProperty glow,
|
||||
bool showAlpha = true)
|
||||
{
|
||||
var prevFilter = (ColorFilter)filter.intValue;
|
||||
EditorGUILayout.PropertyField(filter);
|
||||
if (filter.intValue == (int)ColorFilter.None) return;
|
||||
|
||||
EditorGUI.indentLevel++;
|
||||
DrawColor(color, (ColorFilter)filter.intValue, prevFilter, showAlpha);
|
||||
|
||||
if (glow != null)
|
||||
{
|
||||
EditorGUILayout.PropertyField(glow);
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
private static void SwapColorsButton(Rect rect, SerializedProperty color1, SerializedProperty color2)
|
||||
{
|
||||
if (GUI.Button(rect, EditorGUIUtility.IconContent("preaudioloopoff"), "iconbutton"))
|
||||
{
|
||||
(color1.colorValue, color2.colorValue) = (color2.colorValue, color1.colorValue);
|
||||
}
|
||||
}
|
||||
|
||||
private static bool DrawHeaderPopup(SerializedProperty sp)
|
||||
{
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
var pos = EditorGUI.PrefixLabel(r, EditorGUIUtility.TrTempContent(sp.displayName), EditorStyles.boldLabel);
|
||||
EditorGUI.PropertyField(pos, sp, GUIContent.none);
|
||||
return 0 < sp.intValue;
|
||||
}
|
||||
|
||||
protected static void DrawSeparator()
|
||||
{
|
||||
EditorGUILayout.Space(4);
|
||||
GUILayout.Label(GUIContent.none, "sv_iconselector_sep", GUILayout.ExpandWidth(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b54493685c0d4cf49bbc33b1492bed5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -11,20 +11,20 @@ namespace Coffee.UIEffects.Editors
|
||||
public class UIEffectReplicaEditor : Editor
|
||||
{
|
||||
private SerializedProperty _target;
|
||||
private SerializedProperty _preset;
|
||||
private SerializedProperty _useTargetTransform;
|
||||
private SerializedProperty _samplingScale;
|
||||
private SerializedProperty _allowToModifyMeshShape;
|
||||
private SerializedProperty _flip;
|
||||
private SerializedProperty _customRoot;
|
||||
private Editor _uiEffectEditor;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_target = serializedObject.FindProperty("m_Target");
|
||||
_preset = serializedObject.FindProperty("m_Preset");
|
||||
_useTargetTransform = serializedObject.FindProperty("m_UseTargetTransform");
|
||||
_samplingScale = serializedObject.FindProperty("m_SamplingScale");
|
||||
_allowToModifyMeshShape = serializedObject.FindProperty("m_AllowToModifyMeshShape");
|
||||
_flip = serializedObject.FindProperty("m_Flip");
|
||||
_customRoot = serializedObject.FindProperty("m_CustomRoot");
|
||||
}
|
||||
|
||||
@@ -33,27 +33,42 @@ namespace Coffee.UIEffects.Editors
|
||||
serializedObject.Update();
|
||||
|
||||
var r = EditorGUILayout.GetControlRect();
|
||||
r.width -= 60;
|
||||
EditorGUI.PropertyField(r, _target);
|
||||
r.width -= 120;
|
||||
if (_preset.objectReferenceValue)
|
||||
{
|
||||
EditorGUI.PropertyField(r, _preset);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.PropertyField(r, _target);
|
||||
}
|
||||
|
||||
// Preset button.
|
||||
r.x += r.width;
|
||||
r.width = 60;
|
||||
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Preset"), "MiniPopup"))
|
||||
{
|
||||
UIEffectEditor.DropDownPreset(r, x => !x.builtin, p =>
|
||||
UIEffectEditor.DropDownPreset(r, null, p =>
|
||||
{
|
||||
_target.objectReferenceValue = p;
|
||||
_target.serializedObject.ApplyModifiedProperties();
|
||||
_target.objectReferenceValue = null;
|
||||
_preset.objectReferenceValue = p;
|
||||
_preset.serializedObject.ApplyModifiedProperties();
|
||||
});
|
||||
}
|
||||
|
||||
// Clear button.
|
||||
r.x += r.width;
|
||||
r.width = 60;
|
||||
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Clear")))
|
||||
{
|
||||
_target.objectReferenceValue = null;
|
||||
_preset.objectReferenceValue = null;
|
||||
}
|
||||
|
||||
// Preset mode warning.
|
||||
if (_target.objectReferenceValue is UIEffect targetEffect && !targetEffect.gameObject.scene.IsValid())
|
||||
{
|
||||
r = EditorGUILayout.GetControlRect();
|
||||
r.width -= EditorGUIUtility.labelWidth;
|
||||
r.x += EditorGUIUtility.labelWidth;
|
||||
EditorGUI.HelpBox(r, "The target effect is not in the scene. (Preset mode)", MessageType.Warning);
|
||||
}
|
||||
|
||||
@@ -64,14 +79,14 @@ namespace Coffee.UIEffects.Editors
|
||||
|
||||
EditorGUILayout.PropertyField(_samplingScale);
|
||||
EditorGUILayout.PropertyField(_allowToModifyMeshShape);
|
||||
EditorGUILayout.PropertyField(_flip);
|
||||
|
||||
if (_target.objectReferenceValue)
|
||||
var parent = _target.objectReferenceValue ?? _preset.objectReferenceValue;
|
||||
if (parent)
|
||||
{
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
CreateCachedEditor(_target.objectReferenceValue, null, ref _uiEffectEditor);
|
||||
CreateCachedEditor(parent, null, ref _uiEffectEditor);
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
(_uiEffectEditor as UIEffectEditor)?.DrawProperties();
|
||||
(_uiEffectEditor as UIEffectPropertyEditor)?.DrawProperties();
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
||||
+141
-90
@@ -1,11 +1,12 @@
|
||||
# <img alt="logo" height="26" src="https://github.com/user-attachments/assets/dc72baf5-eadf-463e-abc9-464477fd0b9e"/> UIEffect v5 <!-- omit in toc -->
|
||||
# <img alt="logo" height="26" src="https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-logo.png"/> UIEffect v5 <!-- omit in toc -->
|
||||
|
||||
[](https://openupm.com/packages/com.coffee.ui-effect/)
|
||||
[](https://github.com/mob-sakai/UIEffect/releases)
|
||||
[](https://github.com/mob-sakai/UIEffect/releases)
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
[](https://github.com/mob-sakai/UIEffect/blob/main/LICENSE.md)
|
||||
@@ -23,7 +24,7 @@
|
||||
UIEffect is an open-source package that allows you to intuitively apply rich Unity UI effects directly from the Inspector or via code.
|
||||
Combine various filters, such as grayscale, blur, and dissolve, to decorate your UI with a unique visual style!
|
||||
|
||||

|
||||

|
||||
|
||||
- [📌 Key Features](#-key-features)
|
||||
- [🎮 Demo](#-demo)
|
||||
@@ -37,13 +38,29 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
|
||||
- [🚀 Usage](#-usage)
|
||||
- [Getting Started](#getting-started)
|
||||
- [Component: UIEffect](#component-uieffect)
|
||||
- [Tone Filter](#tone-filter)
|
||||
- [Color Filter](#color-filter)
|
||||
- [Sampling Filter](#sampling-filter)
|
||||
- [Transition Filter](#transition-filter)
|
||||
- [Target Mode](#target-mode)
|
||||
- [Blend Type](#blend-type)
|
||||
- [Shadow Mode](#shadow-mode)
|
||||
- [Gradation Mode](#gradation-mode)
|
||||
- [Edge Mode](#edge-mode)
|
||||
- [Detail Filter](#detail-filter)
|
||||
- [Flip](#flip)
|
||||
- [Others](#others)
|
||||
- [Component: UIEffectTweener](#component-uieffecttweener)
|
||||
- [Component: UIEffectReplica](#component-uieffectreplica)
|
||||
- [Usage with TextMeshPro](#usage-with-textmeshpro)
|
||||
- [Usage with SoftMaskForUGUI](#usage-with-softmaskforugui)
|
||||
- [Usage with ShaderGraph](#usage-with-shadergraph)
|
||||
- [Runtime/Editor Preset for UIEffect](#runtimeeditor-preset-for-uieffect)
|
||||
- [Usage with Code](#usage-with-code)
|
||||
- [Project Settings](#project-settings)
|
||||
- [Settings](#settings)
|
||||
- [Editor](#editor)
|
||||
- [Shader](#shader)
|
||||
- [:warning: Limitations](#warning-limitations)
|
||||
- [🤝 Contributing](#-contributing)
|
||||
- [Issues](#issues)
|
||||
@@ -57,7 +74,7 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
|
||||
|
||||
## 📌 Key Features
|
||||
|
||||

|
||||

|
||||
|
||||
- **UIEffect is out-of-the-box!**: Easily apply effects by adjusting parameters directly in the inspector.
|
||||
- **Rich effect combinations**: Decorate your UI with a variety of effects, such as grayscale, blur, and dissolve, by combining multiple filters and parameters.
|
||||
@@ -69,15 +86,18 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
|
||||
- **UIEffectTweener Component**: A simple tweener component to play, stop, pause, and resume effects.
|
||||
- **AnimationClip support**: Allows control of effect animations using `AnimationClips`.
|
||||
- **v4 compatible components (optional)**: For easy upgrading with minimal changes, compatible v4 components are available optionally.
|
||||
- **SoftMaskForUGUI support (optional)**: Compatible with SoftMaskForUGUI for creating soft masks for UI elements. See for more details [here](#usage-with-softmaskforugui).
|
||||
- **ShaderGraph support (optional)**: Add `Canvas (UIEffect)` sub target (material) for UIEffect shaders. See for more details [here](#usage-with-shadergraph).
|
||||
|
||||
<br><br>
|
||||
|
||||
## 🎮 Demo
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||

|
||||
<img src="https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-pattern.gif" width="582"/>
|
||||

|
||||

|
||||
|
||||
[WebGL Demo](https://mob-sakai.github.io/UIEffect/)
|
||||
|
||||
@@ -97,16 +117,16 @@ _This package requires **Unity 2020.3 or later**._
|
||||
```
|
||||
- To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`:
|
||||
```
|
||||
openupm add com.coffee.ui-effect@5.6.0
|
||||
openupm add com.coffee.ui-effect@5.7.0
|
||||
```
|
||||
|
||||
### Install via UPM (with Package Manager UI)
|
||||
|
||||
- Click `Window > Package Manager` to open Package Manager UI.
|
||||
- Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIEffect.git?path=Packages/src`
|
||||

|
||||

|
||||
- To update the package, change suffix `#{version}` to the target version.
|
||||
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.6.0`
|
||||
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.7.0`
|
||||
|
||||
### Install via UPM (Manually)
|
||||
|
||||
@@ -121,14 +141,14 @@ _This package requires **Unity 2020.3 or later**._
|
||||
```
|
||||
|
||||
- To update the package, change suffix `#{version}` to the target version.
|
||||
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.6.0",`
|
||||
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.7.0",`
|
||||
|
||||
### Install as Embedded Package
|
||||
|
||||
1. Download the `Source code (zip)` file from [Releases](https://github.com/mob-sakai/UIEffect/releases) and
|
||||
extract it.
|
||||
2. Move the `<extracted_dir>/Packages/src` directory into your project's `Packages` directory.
|
||||

|
||||

|
||||
- You can rename the `src` directory if needed.
|
||||
- If you intend to fix bugs or add features, installing it as an embedded package is recommended.
|
||||
- To update the package, re-download it and replace the existing contents.
|
||||
@@ -139,6 +159,7 @@ Additional resources can be imported to extend functionality.
|
||||
|
||||
- [🔄 Upgrading from v4 to v5](#-upgrading-from-v4-to-v5)
|
||||
- [Usage with TextMeshPro](#usage-with-textmeshpro)
|
||||
- [Usage with ShaderGraph](#usage-with-shadergraph)
|
||||
|
||||
<br><br>
|
||||
|
||||
@@ -158,14 +179,13 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
||||
```
|
||||
|
||||
2. Import the `v4 Compatible Components` sample from the Package Manager window.
|
||||

|
||||
|
||||
3. All v4 components are obsolete.
|
||||
- v4 `UIEffect` component is now `UIEffectV4` component. Change the reference in the code.
|
||||
- The `effectArea` property in some components are not supported in v5.
|
||||
- `UIShadow`, `UIGradient` components are not supported in v5.
|
||||
- v4 components can be converted to v5 `UIEffect` component by selecting `Convert To UIEffect` from the context menu.
|
||||

|
||||

|
||||
|
||||
<br><br>
|
||||
|
||||
@@ -176,12 +196,15 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
||||
1. [Install the package](#-installation).
|
||||
|
||||
2. Add a `UIEffect` component to a UI element (Image, RawImage, Text, TextMeshProUGUI, etc...) from the `Add Component` in the inspector or `Component > UI > UIEffect` menu.
|
||||

|
||||

|
||||
|
||||
3. Adjust the effect filters and parameters in the inspector.
|
||||

|
||||

|
||||
|
||||
4. Enjoy!
|
||||
4. From the top menu, you can load/append preset.
|
||||

|
||||
|
||||
5. Enjoy!
|
||||
|
||||
<br><br>
|
||||
|
||||
@@ -189,7 +212,7 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
||||
|
||||
The `UIEffect` component applies visual effects to UI elements, allowing various effects to be achieved by combining multiple filters.
|
||||
|
||||

|
||||

|
||||
|
||||
> [!TIP]
|
||||
> From the top menu, you can load and save the editor presets or clear settings.
|
||||
@@ -199,20 +222,20 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
||||
|
||||
#### Tone Filter
|
||||
|
||||

|
||||

|
||||
|
||||
- **Tone Filter**: `None`, `Grayscale`, `Sepia`, `Nega`, `Retro`, `Posterize`
|
||||

|
||||

|
||||
- **Tone Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||
|
||||
<br>
|
||||
|
||||
#### Color Filter
|
||||
|
||||

|
||||

|
||||
|
||||
- **Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||

|
||||

|
||||
- **Color Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||
- **Color Glow**: Set the color to glow.
|
||||
|
||||
@@ -220,10 +243,10 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
||||
|
||||
#### Sampling Filter
|
||||
|
||||

|
||||

|
||||
|
||||
- **Sampling Filter**: `None`, `Blur Fast`, `Blur Medium`, `Blur Detail`, `Pixelation`, `Rgb Shift`, `Edge Luminescence`, `Edge Alpha`
|
||||

|
||||

|
||||
- **Sampling Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||
- **Sampling Width**: The width of the sampling effect.
|
||||
|
||||
@@ -231,19 +254,20 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
||||
|
||||
#### Transition Filter
|
||||
|
||||

|
||||

|
||||
|
||||
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Pattern`
|
||||

|
||||

|
||||
- **Transition Rate**: 0.0 (no effect) - 1.0 (full effect).
|
||||
- **Transition Tex**: The texture used for the transition filter.
|
||||
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**, **Reverse**: Additional properties for the texture.
|
||||
- NOTE: `Rotation` and `Keep Aspect Ratio` are shared with `Detail Filter`.
|
||||
- ⚠️ NOTE: `Rotation` is shared with `Transition Filter` and `Detail Filter`.
|
||||
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
|
||||
- **Transition Width**: The width where the transition color is applied.
|
||||
- **Transition Pattern Range**: The range of the pattern.
|
||||
- **Transition Pattern Reverse**: Reverse the pattern.
|
||||
- **Transition Softness**: The softness of the boundary for the transition color.
|
||||
- **Transition Color Filter**: Specifies the transition color.
|
||||
- **Transition Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||
- **Transition Color**: The color of the transition.
|
||||
- **Transition Color Glow**: Set the transition color to glow.
|
||||
- **Transition Auto Play Speed**: The speed of the transition animation (using shader side `_Time`). You can use this property to loop the `TransitionRate` without tweener or animation.
|
||||
@@ -252,16 +276,16 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
||||
> **Transition Tex** applies transitions using its alpha channel.
|
||||
> If you use `Scale`, `Offset`, or `Speed`, set `Wrap Mode = Repeat` in the texture import settings.
|
||||
> For details, refer to the textures included in the built-in presets.
|
||||
> 
|
||||
> 
|
||||
|
||||
<br>
|
||||
|
||||
#### Target Mode
|
||||
|
||||

|
||||

|
||||
|
||||
- **Target Mode**: `None`, `Hue`, `Luminance`
|
||||

|
||||

|
||||
- Restricts the effect application area based on hue or luminance.
|
||||
- **Target Range**: The range of target hue or luminance.
|
||||
- **Target Softness**: The softness of the target boundary.
|
||||
@@ -270,63 +294,61 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
||||
|
||||
#### Blend Type
|
||||
|
||||

|
||||

|
||||
|
||||
- **Blend Type**: `Alpha Blend`, `Multiply`, `Additive`, `Soft Additive`, `Multiply Additive`, `Custom`
|
||||

|
||||

|
||||
- `Custom` blend type can be set using the `SrcBlend` and `DstBlend` properties.
|
||||
|
||||
<br>
|
||||
|
||||
#### Shadow Mode
|
||||
|
||||

|
||||

|
||||
|
||||
- **Shadow Mode**: `None`, `Shadow`, `Shadow3`, `Outline`, `Outline8`, `Mirror`
|
||||

|
||||

|
||||
- **Shadow Distance**: Distance of the shadow or outline.
|
||||
- **Shadow Iteration**: Number of times the shadow or outline is applied.
|
||||
- **Shadow Color Filter**: Specifies the shadow color.
|
||||
- **Shadow Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||
- **Shadow Color**: The color of the shadow.
|
||||
- **Shadow Color Glow**: Set the shadow color to glow.
|
||||
- **Shadow Fade**: Alpha value of the shadow or outline.
|
||||
- **Shadow Blur Intensity**: Intensity of the shadow or outline blur.
|
||||
- **Mirror Reflection**: Distance of the mirrored image.
|
||||
- **Mirror Offset**: Offset for the mirrored image.
|
||||
- **Mirror Scale**: Scale of the mirrored image.
|
||||
- **Shadow Blur Intensity** (`SamplingFilter = Blur***` required): Intensity of the shadow or outline blur.
|
||||
- **Mirror Reflection** (`Mirror` only): Distance of the mirrored image.
|
||||
- **Mirror Offset** (`Mirror` only): Offset for the mirrored image.
|
||||
- **Mirror Scale** (`Mirror` only): Scale of the mirrored image.
|
||||
|
||||
<br>
|
||||
|
||||
#### Gradation Mode
|
||||
|
||||

|
||||

|
||||
|
||||
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `RadialFast`, `RadialDetail`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
|
||||

|
||||
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `Radial`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
|
||||

|
||||
- **Gradation Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`
|
||||
- **Gradation Gradient**: The gradient of the gradation.
|
||||
- `Blend` and `Fixed` modes are available.
|
||||
- **Gradation Color 1**: The first color of the gradation.
|
||||
- **Gradation Color 2**: The second color of the gradation.
|
||||
- **Gradation Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||
- **Gradation Offset**: The offset of the gradation range.
|
||||
- **Gradation Scale**: The scale of the gradation range.
|
||||
- **Gradation Rotation**: The rotation of the gradation range (`Angle` or `AngleGradient`).
|
||||
|
||||
> [!TIP]
|
||||
> `Horizontal Gradient` and `Vertical Gradient` divide the mesh horizontally or vertically and apply a gradient.
|
||||
> This is very fast but only supports Full Rect.
|
||||
> `Angle Gradient` divides the mesh at the specified angle and applies a gradient.
|
||||
> It can be applied to meshes other than Full Rect because it applies the gradient according to the original mesh shape.
|
||||
> `Gradation Gradient` has two modes, `Blend` and `Fixed`.
|
||||
- **Gradation Rotation** (`Angle` or `AngleGradient` only): The rotation of the gradation range.
|
||||
- **Keep Aspect Ratio**:
|
||||
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
|
||||
|
||||
<br>
|
||||
|
||||
#### Edge Mode
|
||||
|
||||

|
||||

|
||||
|
||||
- **Edge Mode**: `None`, `Plain`, `Shiny`
|
||||

|
||||

|
||||
- **Edge Width**: The width of the edge.
|
||||
- **Edge Color Filter**: Specifies the edge color.
|
||||
- **Edge Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||
- **Edge Color**: The color of the edge.
|
||||
- **Edge Color Glow**: Set the shadow color to glow.
|
||||
- **Edge Shiny Width**: The width of the edge shiny.
|
||||
@@ -336,44 +358,55 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
||||
|
||||
#### Detail Filter
|
||||
|
||||

|
||||

|
||||
|
||||
- **Detail Filter**: `None`, `Masking`, `Multiply`, `Additive`, `Replace`, `MuliplyAdditive`
|
||||

|
||||
- **Detail Filter**: `None`, `Masking`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `MuliplyAdditive`
|
||||

|
||||
- **Detail Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||
- **Detail Color**: The color of the detail.
|
||||
- **Detail Threshold** (`Masking` only): The minimum and maximum alpha values used for masking. The larger the gap
|
||||
between these values, the stronger the softness effect.
|
||||
- **Detail Tex**: The texture used for the transition filter.
|
||||
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**: Additional properties for the texture.
|
||||
- NOTE: `Rotation` and `Keep Aspect Ratio` are shared with `Transition Filter`.
|
||||
- ⚠️ NOTE: `Rotation` is shared with `Transition Filter` and `Detail Filter`.
|
||||
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
|
||||
|
||||
<br>
|
||||
|
||||
#### Flip
|
||||
|
||||

|
||||
|
||||
- **Flip**: Combine the following flags.
|
||||
- `Nothing`
|
||||
- `Horizontal`
|
||||
- `Vertical`
|
||||
- `Effect`: Flip with the effect.
|
||||
- `Shadow`: Flip with the shadow.
|
||||

|
||||
|
||||
<br>
|
||||
|
||||
#### Others
|
||||
|
||||

|
||||

|
||||
|
||||
- **Sampling Scale**: The referencing scale during sampling.
|
||||
- Larger values are suitable for high-resolution textures.
|
||||
- **Allow To Modify Mesh Shape**: If enabled, the mesh shape can be modified.
|
||||
- **Custom Root**: Use the custom transform for some effects.
|
||||
- **Flip**:
|
||||
- `Nothing`
|
||||
- `Horizontal`
|
||||
- `Vertical`
|
||||
- `Effect`: Flip with the effect.
|
||||
- `Shadow`: Flip with the shadow.
|
||||
|
||||
> [!TIP]
|
||||
> `Transition Filter`, `Gradation Filter`, and `Detail Filter` usually refer to their own `RectTransform` when applying effects.
|
||||
> For example, if the mesh shape exceeds the `RectTransform` boundaries, the effect may not be applied correctly.
|
||||
> By specifying `Custom Root`, you can refer to the specified transform.
|
||||
> 
|
||||
|
||||
<br><br>
|
||||
|
||||
### Component: UIEffectTweener
|
||||
|
||||

|
||||

|
||||
|
||||
The `UIEffectTweener` component animates the effect, enabling easy control over effect animations without the need for an `AnimationClip`.
|
||||
|
||||
@@ -404,7 +437,7 @@ You can preview the animation using the seek bar and play button.
|
||||
|
||||
### Component: UIEffectReplica
|
||||
|
||||

|
||||

|
||||
|
||||
The `UIEffectReplica` component applies visual effects to UI elements by replicating the settings of another `UIEffect` component. This allows the same effect to be applied across multiple UI elements simultaneously.
|
||||
|
||||
@@ -412,16 +445,10 @@ The `UIEffectReplica` component applies visual effects to UI elements by replica
|
||||
> [!TIP]
|
||||
> You can specify a preset as well as an instance as the target for `UIEffectReplica`.
|
||||
- **Use Target Transform**: Use the target's transform for some effects.
|
||||

|
||||

|
||||
- **Custom Root**: Use the custom transform for some effects.
|
||||
- **Sampling Scale**: Override the sampling scale.
|
||||
- **Allow To Modify Mesh Shape**: If enabled, the mesh shape can be modified.
|
||||
- **Flip**:
|
||||
- `Nothing`
|
||||
- `Horizontal`
|
||||
- `Vertical`
|
||||
- `Effect`: Flip the effect.
|
||||
- `Shadow`: Flip the shadow.
|
||||
- **Allow To Modify Mesh Shape**: If enabled, the mesh shape can be modified.
|
||||
|
||||
<br><br>
|
||||
|
||||
@@ -431,21 +458,20 @@ To use UIEffect with TextMeshPro, you need to import additional resources.
|
||||
When a shader included in the samples is requested, an import dialog will automatically appear.
|
||||
Click the `Import` button.
|
||||
|
||||

|
||||

|
||||
|
||||
Alternatively, you can manually import the resources by following these steps:
|
||||
|
||||
1. First, you must import [TMP Essential Resources](https://docs.unity3d.com/Packages/com.unity.textmeshpro@3.0/manual/index.html#installation) before using.
|
||||

|
||||

|
||||
|
||||
2. Open the `Package Manager` window and select the `UI Effect` package in the package list and click the `TextMeshPro Support > Import` button.
|
||||
⚠️ If you are using `Unity 2023.2/6000.0+` or `TextMeshPro 3.2/4.0+`, click the `TextMeshPro Support (Unity 6) > Import` button instead.
|
||||

|
||||
|
||||
3. The assets will be imported under `Assets/Samples/UI Effect/{version}`.
|
||||
|
||||
4. Add the `UIEffect` component to a TextMeshProUGUI element and adjust the effect settings. The `<font>` and `<sprite>` tags are also supported.
|
||||

|
||||

|
||||
|
||||
> [!TIP]
|
||||
> `TextMeshPro Support` may change with updates to the UIEffect package.
|
||||
@@ -460,24 +486,43 @@ Alternatively, you can manually import the resources by following these steps:
|
||||
|
||||
### Usage with SoftMaskForUGUI
|
||||
|
||||

|
||||

|
||||
|
||||
[SoftMaskForUGUI](https://github.com/mob-sakai/SoftMaskForUGUI) is a package that allows you to create soft masks for UI elements.
|
||||
|
||||
`SoftMaskForUGUI (v3.3.0+)` supports `UIEffect (v5.6.0+)`.
|
||||
`SoftMaskForUGUI (v3.3.0+)` supports `UIEffect (v5.7.0+)`.
|
||||
When a shader included in the samples is requested, an import dialog will automatically appear.
|
||||
Click the `Import` button.
|
||||
|
||||
<br><br>
|
||||
|
||||
### Usage with ShaderGraph
|
||||
|
||||

|
||||
|
||||
To use UIEffect with ShaderGraph, you need to import additional resources.
|
||||
|
||||
1. Open the `Package Manager` window and select the `UI Effect` package in the package list and click the `ShaderGraph Support (Unity6, BuiltIn) > Import` button.
|
||||
⚠️ If you are using Universal Render Pipeline (URP), click the `ShaderGraph Support (Unity6, URP) > Import` button.
|
||||
|
||||
2. The assets will be imported under `Assets/Samples/UI Effect/{version}`.
|
||||
|
||||
3. Change the sub target (Material) of the existing ShaderGraph file to `Canvas (UIEffect)`.
|
||||
Alternatively, create a new ShaderGraph from `Assets/Create/Shader Graph/BuiltIn/Canvas Shader Graph (UIEffect)`.
|
||||
|
||||
> [!TIP]
|
||||
> Use `(UIEffect)` in the shader name or register as an optional shader in [ProjectSettings](#project-settings).
|
||||
|
||||
<br><br>
|
||||
|
||||
### Runtime/Editor Preset for UIEffect
|
||||
|
||||

|
||||

|
||||
|
||||
You can create and use presets for `UIEffect` components.
|
||||
|
||||
- Click the `Load` button to apply an editor preset.
|
||||
> Click the `Append` button to load only non-default settings from the editor preset.
|
||||
- Click the `Append` button to load only non-default settings from the editor preset.
|
||||
- Click the `Save As New` button to save the current settings as an editor preset.
|
||||
- In the [Project Settings](#project-settings), you can register saved editor presets as runtime presets.
|
||||
- Runtime presets can be loaded using the `UIEffect.LoadPreset(presetName)` method.
|
||||
@@ -495,7 +540,7 @@ You can control the effect settings and animations via code.
|
||||
```csharp
|
||||
var effect = graphic.AddComponent<UIEffect>();
|
||||
|
||||
// Apply a preset
|
||||
// Apply a runtime preset
|
||||
effect.LoadPreset("Dissolve");
|
||||
|
||||
// Set the effect parameters
|
||||
@@ -515,16 +560,23 @@ UIEffectProjectSettings.shaderVariantCollection.WarmUp();
|
||||
|
||||
### Project Settings
|
||||
|
||||

|
||||

|
||||
|
||||
You can adjust the project-wide settings for UIEffect. (`Edit > Project Settings > UI > UIEffect`)
|
||||
|
||||
#### Settings
|
||||
|
||||
- **Transform Sensitivity**: `Low`, `Medium`, `High`
|
||||
- Set the sensitivity of the transformation when `Use Target Transform` is enabled in `UIEffectReplica` component.
|
||||
- **Runtime Presets**: A list of presets that can be loaded at runtime. Load them using `UIEffect.LoadPreset(presetName)` method.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> - The legacy prefab-based preset system is deprecated as of v5.8.0.
|
||||
> - If your project contains legacy presets, you can convert them to the new system.
|
||||
> - **Convert All Legacy Presets**: Creates new presets based on the legacy ones.
|
||||
> If the legacy presets are used as runtime presets, they will be replaced with the new ones.
|
||||
> You can load the new preset via the `UIEffect.LoadPreset` method.
|
||||
> - **Delete All Legacy Presets**: Deletes all legacy presets. If any legacy presets are assigned to `UIEffectReplica.target`, those targets will also be removed.
|
||||
> 
|
||||
|
||||
#### Editor
|
||||
|
||||
- **Use HDR Color Picker**: If enabled, the HDR color picker will be used in the inspector.
|
||||
@@ -593,7 +645,6 @@ Your support allows me to dedicate more time to development. 😊
|
||||
## License
|
||||
|
||||
* MIT
|
||||
* © UTJ/UCL
|
||||
|
||||
## Author
|
||||
|
||||
@@ -604,4 +655,4 @@ Your support allows me to dedicate more time to development. 😊
|
||||
* GitHub page : https://github.com/mob-sakai/UIEffect
|
||||
* Releases : https://github.com/mob-sakai/UIEffect/releases
|
||||
* Issue tracker : https://github.com/mob-sakai/UIEffect/issues
|
||||
* Change log : https://github.com/mob-sakai/UIEffect/blob/main/Packages/src/CHANGELOG.md
|
||||
* Change log : https://github.com/mob-sakai/UIEffect/blob/main/Packages/src/CHANGELOG.md
|
||||
@@ -26,6 +26,17 @@ namespace Coffee.UIEffects
|
||||
Contrast = 8
|
||||
}
|
||||
|
||||
public enum GradationColorFilter
|
||||
{
|
||||
None = ColorFilter.None,
|
||||
Multiply = ColorFilter.Multiply,
|
||||
Additive = ColorFilter.Additive,
|
||||
Subtractive = ColorFilter.Subtractive,
|
||||
Replace = ColorFilter.Replace,
|
||||
MultiplyLuminance = ColorFilter.MultiplyLuminance,
|
||||
MultiplyAdditive = ColorFilter.MultiplyAdditive
|
||||
}
|
||||
|
||||
public enum SamplingFilter
|
||||
{
|
||||
None = 0,
|
||||
@@ -114,6 +125,7 @@ namespace Coffee.UIEffects
|
||||
Masking = 1,
|
||||
Multiply = 2,
|
||||
Additive = 3,
|
||||
Subtractive = 6,
|
||||
Replace = 4,
|
||||
MultiplyAdditive = 5
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -110,10 +111,12 @@ namespace Coffee.UIEffectInternal
|
||||
dst.Clear();
|
||||
for (var i = 0; i < vertexCount; i++)
|
||||
{
|
||||
dst.AddVert(positions[i], colors[i], uv0[i], uv1[i], normals[i], tangents[i]);
|
||||
dst.AddVert(positions.GetOrDefault(i), colors.GetOrDefault(i), uv0.GetOrDefault(i), uv1.GetOrDefault(i),
|
||||
normals.GetOrDefault(i), tangents.GetOrDefault(i));
|
||||
}
|
||||
|
||||
for (var i = 0; i < indexCount; i += 3)
|
||||
var count = Mathf.Clamp(indexCount, 0, indices.Count);
|
||||
for (var i = 0; i < count - 2; i += 3)
|
||||
{
|
||||
dst.AddTriangle(indices[i], indices[i + 1], indices[i + 2]);
|
||||
}
|
||||
@@ -126,5 +129,12 @@ namespace Coffee.UIEffectInternal
|
||||
InternalListPool<Color32>.Return(ref colors);
|
||||
InternalListPool<int>.Return(ref indices);
|
||||
}
|
||||
|
||||
private static T GetOrDefault<T>(this List<T> self, int index)
|
||||
{
|
||||
return 0 <= index && index < self.Count
|
||||
? self[index]
|
||||
: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +271,8 @@ namespace Coffee.UIEffectInternal
|
||||
private readonly ReorderableList _rlOptionalShaders;
|
||||
private readonly ReorderableList _rlUnregisteredVariants;
|
||||
private Editor _editor;
|
||||
private bool _expand;
|
||||
private bool _expandOptionalShaders;
|
||||
private bool _expandUnregisteredVariants;
|
||||
|
||||
public ShaderVariantRegistryEditor(SerializedProperty property, string optionName, Action onFindOptions)
|
||||
{
|
||||
@@ -281,11 +282,11 @@ namespace Coffee.UIEffectInternal
|
||||
_errorOnUnregisteredVariant = property.FindPropertyRelative("m_ErrorOnUnregisteredVariant");
|
||||
_asset = property.FindPropertyRelative("m_Asset");
|
||||
|
||||
_rlOptionalShaders = new ReorderableList(so, optionalShaders, false, true, true, true);
|
||||
_rlOptionalShaders = new ReorderableList(so, optionalShaders, true, true, true, true);
|
||||
_rlOptionalShaders.drawHeaderCallback = rect =>
|
||||
{
|
||||
var rLabel = new Rect(rect.x, rect.y, rect.width - 80, rect.height);
|
||||
EditorGUI.LabelField(rLabel,
|
||||
_expandOptionalShaders = EditorGUI.Foldout(rLabel, _expandOptionalShaders,
|
||||
EditorGUIUtility.TrTextContent($"Optional Shaders {optionName}",
|
||||
"Specify optional shaders explicitly."));
|
||||
|
||||
@@ -315,16 +316,16 @@ namespace Coffee.UIEffectInternal
|
||||
var rKey = new Rect(r.x, r.y + 2, r.width, h);
|
||||
if (GUI.Button(rKey, key.stringValue, EditorStyles.popup))
|
||||
{
|
||||
ShowShaderDropdown(key, optionName, false);
|
||||
ShowShaderDropdown(key);
|
||||
}
|
||||
|
||||
var rArrow = new Rect(r.x, r.y + h + 4, 20, h);
|
||||
EditorGUI.LabelField(rArrow, "->");
|
||||
EditorGUI.LabelField(rArrow, GUIContent.none, "ArrowNavigationRight");
|
||||
|
||||
var rValue = new Rect(r.x + 20, r.y + h + 4, r.width - 20, h);
|
||||
if (GUI.Button(rValue, value.stringValue, EditorStyles.popup))
|
||||
{
|
||||
ShowShaderDropdown(value, optionName, true);
|
||||
ShowShaderDropdown(value);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -376,8 +377,8 @@ namespace Coffee.UIEffectInternal
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
_rlOptionalShaders.DoLayoutList();
|
||||
_expand = DrawRegisteredShaderVariants(_expand, _asset, ref _editor);
|
||||
DrawOptionalShaders(ref _expandOptionalShaders, _rlOptionalShaders);
|
||||
DrawRegisteredShaderVariants(ref _expandUnregisteredVariants, _asset, ref _editor);
|
||||
if (0 < _rlUnregisteredVariants.serializedProperty.arraySize)
|
||||
{
|
||||
EditorGUILayout.Space(4);
|
||||
@@ -406,20 +407,40 @@ namespace Coffee.UIEffectInternal
|
||||
EditorUtility.SetDirty(collection);
|
||||
}
|
||||
|
||||
private static bool DrawRegisteredShaderVariants(bool expand, SerializedProperty property, ref Editor editor)
|
||||
private static void DrawOptionalShaders(ref bool expand, ReorderableList list)
|
||||
{
|
||||
if (expand)
|
||||
{
|
||||
list.DoLayoutList();
|
||||
}
|
||||
else
|
||||
{
|
||||
var r = EditorGUILayout.GetControlRect(false, 20);
|
||||
var rBg = new Rect(r.x - 3, r.y, r.width + 6, r.height);
|
||||
EditorGUI.LabelField(rBg, GUIContent.none, "RL Header");
|
||||
|
||||
r.x += 3;
|
||||
r.width -= 3;
|
||||
r.y += 0;
|
||||
list.drawHeaderCallback.Invoke(r);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawRegisteredShaderVariants(ref bool expand, SerializedProperty property,
|
||||
ref Editor editor)
|
||||
{
|
||||
var collection = property.objectReferenceValue as ShaderVariantCollection;
|
||||
if (collection == null) return expand;
|
||||
if (collection == null) return;
|
||||
|
||||
EditorGUILayout.Space();
|
||||
var r = EditorGUILayout.GetControlRect(false, 20);
|
||||
var rBg = new Rect(r.x - 3, r.y, r.width + 6, r.height);
|
||||
EditorGUI.LabelField(rBg, GUIContent.none, "RL Header");
|
||||
|
||||
var rLabel = new Rect(r.x + 5, r.y, 200, r.height);
|
||||
var rLabel = new Rect(r.x + 3, r.y, 200, r.height);
|
||||
expand = EditorGUI.Foldout(rLabel, expand, "Registered Shader Variants");
|
||||
|
||||
var rButton = new Rect(r.x + r.width - 82, r.y + 1, 80, r.height - 4);
|
||||
var rButton = new Rect(r.x + r.width - 62, r.y + 1, 60, r.height - 4);
|
||||
if (GUI.Button(rButton, "Clear All", EditorStyles.miniButton))
|
||||
{
|
||||
collection.Clear();
|
||||
@@ -440,16 +461,13 @@ namespace Coffee.UIEffectInternal
|
||||
EditorGUILayout.EndVertical();
|
||||
editor.serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
return expand;
|
||||
}
|
||||
|
||||
private static void ShowShaderDropdown(SerializedProperty property, string option, bool required)
|
||||
private static void ShowShaderDropdown(SerializedProperty property)
|
||||
{
|
||||
var menu = new GenericMenu();
|
||||
var current = property.stringValue;
|
||||
var allShaderNames = ShaderUtil.GetAllShaderInfo()
|
||||
.Where(s => !required || s.name.Contains(option))
|
||||
.Select(s => s.name);
|
||||
|
||||
foreach (var shaderName in allShaderNames)
|
||||
|
||||
+598
-347
File diff suppressed because it is too large
Load Diff
@@ -23,6 +23,7 @@ namespace Coffee.UIEffects
|
||||
private Material _material;
|
||||
private UIEffectContext _context;
|
||||
private Action _onBeforeCanvasRebuild;
|
||||
private Action _onAfterCanvasRebuild;
|
||||
private bool _canModifyMesh;
|
||||
private Matrix4x4 _prevTransformHash;
|
||||
|
||||
@@ -46,18 +47,27 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public virtual RectTransform transitionRoot => transform as RectTransform;
|
||||
|
||||
public virtual Flip flip
|
||||
protected Material GetCurrentMaterial()
|
||||
{
|
||||
get => 0;
|
||||
set { }
|
||||
if (!isActiveAndEnabled) return null;
|
||||
|
||||
var g = graphic;
|
||||
if (!g) return null;
|
||||
|
||||
var canvasRenderer = g.canvasRenderer;
|
||||
if (!canvasRenderer || canvasRenderer.materialCount == 0) return null;
|
||||
|
||||
return canvasRenderer.GetMaterial();
|
||||
}
|
||||
|
||||
public virtual RectTransform transitionRoot => transform as RectTransform;
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
_onBeforeCanvasRebuild ??= OnBeforeCanvasRebuild;
|
||||
_onAfterCanvasRebuild ??= OnAfterCanvasRebuild;
|
||||
UIExtraCallbacks.onBeforeCanvasRebuild += _onBeforeCanvasRebuild;
|
||||
UIExtraCallbacks.onAfterCanvasRebuild += _onAfterCanvasRebuild;
|
||||
UpdateContext(context);
|
||||
SetMaterialDirty();
|
||||
SetVerticesDirty();
|
||||
@@ -70,6 +80,11 @@ namespace Coffee.UIEffects
|
||||
UIExtraCallbacks.onBeforeCanvasRebuild -= _onBeforeCanvasRebuild;
|
||||
}
|
||||
|
||||
if (_onAfterCanvasRebuild != null)
|
||||
{
|
||||
UIExtraCallbacks.onAfterCanvasRebuild -= _onAfterCanvasRebuild;
|
||||
}
|
||||
|
||||
MaterialRepository.Release(ref _material);
|
||||
SetMaterialDirty();
|
||||
SetVerticesDirty();
|
||||
@@ -90,6 +105,13 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnAfterCanvasRebuild()
|
||||
{
|
||||
if (!_material || !graphic || !graphic.canvas || context == null) return;
|
||||
|
||||
context.UpdateViewMatrix(GetCurrentMaterial(), transitionRoot, graphic.canvas.rootCanvas);
|
||||
}
|
||||
|
||||
public void ModifyMesh(Mesh mesh)
|
||||
{
|
||||
}
|
||||
@@ -101,7 +123,7 @@ namespace Coffee.UIEffects
|
||||
_canModifyMesh = CanModifyMesh();
|
||||
if (_canModifyMesh)
|
||||
{
|
||||
context.ModifyMesh(graphic, transitionRoot, vh, canModifyShape, flip);
|
||||
context.ModifyMesh(graphic, transitionRoot, vh, canModifyShape);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +149,8 @@ namespace Coffee.UIEffects
|
||||
|
||||
Profiler.BeginSample("(UIE)[UIEffect] GetModifiedMaterial");
|
||||
var samplingScaleId = (uint)(Mathf.InverseLerp(0.01f, 100, actualSamplingScale) * uint.MaxValue);
|
||||
var hash = new Hash128((uint)baseMaterial.GetInstanceID(), effectId, samplingScaleId, 0);
|
||||
var rootId = (uint)(transitionRoot ? transitionRoot.GetInstanceID() : 0);
|
||||
var hash = new Hash128((uint)baseMaterial.GetInstanceID(), effectId, samplingScaleId, rootId);
|
||||
if (!MaterialRepository.Valid(hash, _material))
|
||||
{
|
||||
Profiler.BeginSample("(UIE)[UIEffect] GetModifiedMaterial > Get or create material");
|
||||
@@ -198,14 +221,6 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
protected bool CheckTransformChangedWith(Transform root)
|
||||
{
|
||||
var sensitivity = UIEffectProjectSettings.transformSensitivity;
|
||||
return root
|
||||
&& root != transform
|
||||
&& transform.HasChanged(root, ref _prevTransformHash, sensitivity);
|
||||
}
|
||||
|
||||
internal void ReleaseMaterial()
|
||||
{
|
||||
MaterialRepository.Release(ref _material);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,178 @@
|
||||
using Coffee.UIEffectInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
[CreateAssetMenu]
|
||||
[ExecuteAlways]
|
||||
public class UIEffectPreset : ScriptableObject
|
||||
{
|
||||
public ToneFilter m_ToneFilter = ToneFilter.None;
|
||||
[Range(0, 1)] public float m_ToneIntensity = 1;
|
||||
|
||||
public ColorFilter m_ColorFilter = ColorFilter.None;
|
||||
[Range(0, 1)] public float m_ColorIntensity = 1;
|
||||
public Color m_Color = Color.white;
|
||||
public bool m_ColorGlow = false;
|
||||
|
||||
public SamplingFilter m_SamplingFilter = SamplingFilter.None;
|
||||
[Range(0, 1)] public float m_SamplingIntensity = 0.5f;
|
||||
[Range(0.5f, 10f)] public float m_SamplingWidth = 1;
|
||||
|
||||
public TransitionFilter m_TransitionFilter = TransitionFilter.None;
|
||||
[Range(0, 1)] public float m_TransitionRate = 0.5f;
|
||||
public bool m_TransitionReverse;
|
||||
public Texture m_TransitionTex;
|
||||
public Vector2 m_TransitionTexScale = new Vector2(1, 1);
|
||||
public Vector2 m_TransitionTexOffset = new Vector2(0, 0);
|
||||
public Vector2 m_TransitionTexSpeed = new Vector2(0, 0);
|
||||
[Range(0, 360)] public float m_TransitionRotation = 0;
|
||||
public bool m_TransitionKeepAspectRatio = true;
|
||||
[Range(0, 1)] public float m_TransitionWidth = 0.2f;
|
||||
[Range(0, 1)] public float m_TransitionSoftness = 0.2f;
|
||||
public MinMax01 m_TransitionRange = new MinMax01(0, 1);
|
||||
public ColorFilter m_TransitionColorFilter = ColorFilter.MultiplyAdditive;
|
||||
public Color m_TransitionColor = new Color(0f, 0.5f, 1.0f, 1.0f);
|
||||
public bool m_TransitionColorGlow = false;
|
||||
public bool m_TransitionPatternReverse = false;
|
||||
[Range(-5, 5)] public float m_TransitionAutoPlaySpeed = 0f;
|
||||
|
||||
public TargetMode m_TargetMode = TargetMode.None;
|
||||
public Color m_TargetColor = Color.white;
|
||||
[Range(0, 1)] public float m_TargetRange = 0.1f;
|
||||
[Range(0, 1)] public float m_TargetSoftness = 0.5f;
|
||||
|
||||
public BlendType m_BlendType = BlendType.AlphaBlend;
|
||||
public BlendMode m_SrcBlendMode = BlendMode.One;
|
||||
public BlendMode m_DstBlendMode = BlendMode.OneMinusSrcAlpha;
|
||||
|
||||
public ShadowMode m_ShadowMode = ShadowMode.None;
|
||||
public Vector2 m_ShadowDistance = new Vector2(1f, -1f);
|
||||
[Range(1, 5)] public int m_ShadowIteration = 1;
|
||||
[Range(0, 1)] public float m_ShadowFade = 0.9f;
|
||||
[Range(0, 2)] public float m_ShadowMirrorScale = 0.5f;
|
||||
[Range(0, 1)] public float m_ShadowBlurIntensity = 1;
|
||||
public ColorFilter m_ShadowColorFilter = ColorFilter.Replace;
|
||||
public Color m_ShadowColor = Color.white;
|
||||
public bool m_ShadowColorGlow = false;
|
||||
|
||||
public GradationMode m_GradationMode = GradationMode.None;
|
||||
[Range(0, 1)] public float m_GradationIntensity = 1;
|
||||
public GradationColorFilter m_GradationColorFilter = GradationColorFilter.Multiply;
|
||||
public Color m_GradationColor1 = Color.white;
|
||||
public Color m_GradationColor2 = Color.white;
|
||||
public Color m_GradationColor3 = Color.white;
|
||||
public Color m_GradationColor4 = Color.white;
|
||||
public Gradient m_GradationGradient = new Gradient();
|
||||
[Range(-1, 1)] public float m_GradationOffset = 0;
|
||||
[PowerRange(0.01f, 10, 10)] public float m_GradationScale = 1;
|
||||
[Range(0, 360)] public float m_GradationRotation = 0;
|
||||
|
||||
public EdgeMode m_EdgeMode = EdgeMode.None;
|
||||
[Range(0, 1)] public float m_EdgeWidth = 0.5f;
|
||||
public ColorFilter m_EdgeColorFilter = ColorFilter.Replace;
|
||||
public Color m_EdgeColor = Color.white;
|
||||
public bool m_EdgeColorGlow = false;
|
||||
[Range(0, 1)] public float m_EdgeShinyRate = 0.5f;
|
||||
[Range(0, 1)] public float m_EdgeShinyWidth = 0.5f;
|
||||
[Range(-5, 5)] public float m_EdgeShinyAutoPlaySpeed = 1f;
|
||||
public PatternArea m_PatternArea = PatternArea.Inner;
|
||||
|
||||
public DetailFilter m_DetailFilter = DetailFilter.None;
|
||||
[Range(0, 1)] public float m_DetailIntensity = 1;
|
||||
public Color m_DetailColor = Color.white;
|
||||
public MinMax01 m_DetailThreshold = new MinMax01(0, 1);
|
||||
public Texture m_DetailTex;
|
||||
public Vector2 m_DetailTexScale = new Vector2(1, 1);
|
||||
public Vector2 m_DetailTexOffset = new Vector2(0, 0);
|
||||
public Vector2 m_DetailTexSpeed = new Vector2(0, 0);
|
||||
|
||||
public Flip m_Flip = 0;
|
||||
|
||||
public void UpdateContext(UIEffectContext dst)
|
||||
{
|
||||
var src = this;
|
||||
dst.m_ToneFilter = src.m_ToneFilter;
|
||||
dst.m_ToneIntensity = src.m_ToneIntensity;
|
||||
|
||||
dst.m_ColorFilter = src.m_ColorFilter;
|
||||
dst.m_Color = src.m_Color;
|
||||
dst.m_ColorIntensity = src.m_ColorIntensity;
|
||||
dst.m_ColorGlow = src.m_ColorGlow;
|
||||
|
||||
dst.m_SamplingFilter = src.m_SamplingFilter;
|
||||
dst.m_SamplingIntensity = src.m_SamplingIntensity;
|
||||
dst.m_SamplingWidth = src.m_SamplingWidth;
|
||||
|
||||
dst.m_TransitionFilter = src.m_TransitionFilter;
|
||||
dst.m_TransitionRate = src.m_TransitionRate;
|
||||
dst.m_TransitionReverse = src.m_TransitionReverse;
|
||||
dst.m_TransitionTex = src.m_TransitionTex;
|
||||
dst.m_TransitionTexScale = src.m_TransitionTexScale;
|
||||
dst.m_TransitionTexOffset = src.m_TransitionTexOffset;
|
||||
dst.m_TransitionTexSpeed = src.m_TransitionTexSpeed;
|
||||
dst.m_TransitionRotation = src.m_TransitionRotation;
|
||||
dst.m_TransitionKeepAspectRatio = src.m_TransitionKeepAspectRatio;
|
||||
dst.m_TransitionWidth = src.m_TransitionWidth;
|
||||
dst.m_TransitionSoftness = src.m_TransitionSoftness;
|
||||
dst.m_TransitionRange = src.m_TransitionRange;
|
||||
dst.m_TransitionColorFilter = src.m_TransitionColorFilter;
|
||||
dst.m_TransitionColor = src.m_TransitionColor;
|
||||
dst.m_TransitionColorGlow = src.m_TransitionColorGlow;
|
||||
dst.m_TransitionPatternReverse = src.m_TransitionPatternReverse;
|
||||
dst.m_TransitionAutoPlaySpeed = src.m_TransitionAutoPlaySpeed;
|
||||
|
||||
dst.m_TargetMode = src.m_TargetMode;
|
||||
dst.m_TargetColor = src.m_TargetColor;
|
||||
dst.m_TargetRange = src.m_TargetRange;
|
||||
dst.m_TargetSoftness = src.m_TargetSoftness;
|
||||
|
||||
dst.m_SrcBlendMode = src.m_SrcBlendMode;
|
||||
dst.m_DstBlendMode = src.m_DstBlendMode;
|
||||
|
||||
dst.m_ShadowMode = src.m_ShadowMode;
|
||||
dst.m_ShadowDistance = src.m_ShadowDistance;
|
||||
dst.m_ShadowIteration = src.m_ShadowIteration;
|
||||
dst.m_ShadowFade = src.m_ShadowFade;
|
||||
dst.m_ShadowMirrorScale = src.m_ShadowMirrorScale;
|
||||
dst.m_ShadowBlurIntensity = src.m_ShadowBlurIntensity;
|
||||
dst.m_ShadowColorFilter = src.m_ShadowColorFilter;
|
||||
dst.m_ShadowColor = src.m_ShadowColor;
|
||||
dst.m_ShadowColorGlow = src.m_ShadowColorGlow;
|
||||
|
||||
dst.m_EdgeMode = src.m_EdgeMode;
|
||||
dst.m_EdgeShinyRate = src.m_EdgeShinyRate;
|
||||
dst.m_EdgeWidth = src.m_EdgeWidth;
|
||||
dst.m_EdgeColorFilter = src.m_EdgeColorFilter;
|
||||
dst.m_EdgeColor = src.m_EdgeColor;
|
||||
dst.m_EdgeColorGlow = src.m_EdgeColorGlow;
|
||||
dst.m_EdgeShinyWidth = src.m_EdgeShinyWidth;
|
||||
dst.m_EdgeShinyAutoPlaySpeed = src.m_EdgeShinyAutoPlaySpeed;
|
||||
dst.m_PatternArea = src.m_PatternArea;
|
||||
|
||||
dst.m_GradationMode = src.m_GradationMode;
|
||||
dst.m_GradationIntensity = src.m_GradationIntensity;
|
||||
dst.m_GradationColorFilter = src.m_GradationColorFilter;
|
||||
dst.m_GradationColor1 = src.m_GradationColor1;
|
||||
dst.m_GradationColor2 = src.m_GradationColor2;
|
||||
dst.m_GradationColor3 = src.m_GradationColor3;
|
||||
dst.m_GradationColor4 = src.m_GradationColor4;
|
||||
dst.m_GradationGradient = src.m_GradationGradient;
|
||||
dst.m_GradationOffset = src.m_GradationOffset;
|
||||
dst.m_GradationScale = src.m_GradationScale;
|
||||
dst.m_GradationRotation = src.m_GradationRotation;
|
||||
|
||||
dst.m_DetailFilter = src.m_DetailFilter;
|
||||
dst.m_DetailIntensity = src.m_DetailIntensity;
|
||||
dst.m_DetailColor = src.m_DetailColor;
|
||||
dst.m_DetailThreshold = src.m_DetailThreshold;
|
||||
dst.m_DetailTex = src.m_DetailTex;
|
||||
dst.m_DetailTexScale = src.m_DetailTexScale;
|
||||
dst.m_DetailTexOffset = src.m_DetailTexOffset;
|
||||
dst.m_DetailTexSpeed = src.m_DetailTexSpeed;
|
||||
|
||||
dst.m_Flip = src.m_Flip;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1b6988bc8fdf48b4896110606a86b61
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: 5b93acc4527c740459bbfbd3404191be, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -5,19 +6,19 @@ using System.Text.RegularExpressions;
|
||||
using Coffee.UIEffectInternal;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
public class UIEffectProjectSettings : PreloadedProjectSettings<UIEffectProjectSettings>
|
||||
{
|
||||
[Tooltip(
|
||||
"The sensitivity of the transformation when `Use Target Transform` is enabled in the `UIEffectReplica` component.")]
|
||||
[Header("Setting")]
|
||||
[SerializeField]
|
||||
private TransformSensitivity m_TransformSensitivity = TransformSensitivity.Medium;
|
||||
internal List<UIEffect> m_RuntimePresets = new List<UIEffect>();
|
||||
|
||||
[SerializeField]
|
||||
internal List<UIEffect> m_RuntimePresets = new List<UIEffect>();
|
||||
internal List<UIEffectPreset> m_RuntimePresetsV2 = new List<UIEffectPreset>();
|
||||
|
||||
[Header("Editor")]
|
||||
[Tooltip("Use HDR color pickers on color fields.")]
|
||||
@@ -35,29 +36,24 @@ namespace Coffee.UIEffects
|
||||
|
||||
public static ShaderVariantCollection shaderVariantCollection => shaderRegistry.shaderVariantCollection;
|
||||
|
||||
public static TransformSensitivity transformSensitivity
|
||||
{
|
||||
get => instance.m_TransformSensitivity;
|
||||
set => instance.m_TransformSensitivity = value;
|
||||
}
|
||||
|
||||
public static bool useHdrColorPicker
|
||||
{
|
||||
get => instance.m_UseHDRColorPicker;
|
||||
set => instance.m_UseHDRColorPicker = value;
|
||||
}
|
||||
|
||||
public static void RegisterRuntimePreset(UIEffect effect)
|
||||
public static void RegisterRuntimePreset(UIEffectPreset preset)
|
||||
{
|
||||
// Already registered.
|
||||
if (!effect || LoadRuntimePreset(effect.name)) return;
|
||||
if (!preset || instance.m_RuntimePresetsV2.Contains(preset)) return;
|
||||
|
||||
instance.m_RuntimePresets.Add(effect);
|
||||
instance.m_RuntimePresetsV2.Add(preset);
|
||||
#if UNITY_EDITOR
|
||||
EditorUtility.SetDirty(instance);
|
||||
#endif
|
||||
}
|
||||
|
||||
[Obsolete("LoadRuntimePreset is obsolete. Use LoadPreset instead.", false)]
|
||||
public static UIEffect LoadRuntimePreset(string presetName)
|
||||
{
|
||||
for (var i = 0; i < instance.m_RuntimePresets.Count; i++)
|
||||
@@ -72,6 +68,21 @@ namespace Coffee.UIEffects
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Object LoadPreset(string presetName)
|
||||
{
|
||||
for (var i = 0; i < instance.m_RuntimePresetsV2.Count; i++)
|
||||
{
|
||||
var preset = instance.m_RuntimePresetsV2[i];
|
||||
if (preset && preset.name == presetName)
|
||||
{
|
||||
return preset;
|
||||
}
|
||||
}
|
||||
#pragma warning disable CS0618
|
||||
return LoadRuntimePreset(presetName);
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private const string k_PresetDir = "UIEffectPresets";
|
||||
private const string k_PresetSaveDir = "Assets/ProjectSettings/" + k_PresetDir;
|
||||
@@ -82,10 +93,10 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
#if UNITY_2023_2_OR_NEWER
|
||||
const string tmpSupport = "TextMeshPro Support (Unity 6)";
|
||||
const string version = "v5.6.0 (Unity 6)";
|
||||
const string version = "v5.8.0 (Unity 6)";
|
||||
#else
|
||||
const string tmpSupport = "TextMeshPro Support";
|
||||
const string version = "v5.6.0";
|
||||
const string version = "v5.8.0";
|
||||
#endif
|
||||
ShaderSampleImporter.RegisterShaderSamples(new[]
|
||||
{
|
||||
@@ -97,7 +108,11 @@ namespace Coffee.UIEffects
|
||||
("Hidden/TextMeshPro/Bitmap (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Mobile/Bitmap (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Distance Field (UIEffect)", tmpSupport, version),
|
||||
("Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)", tmpSupport, version)
|
||||
("Hidden/TextMeshPro/Mobile/Distance Field (UIEffect)", tmpSupport, version),
|
||||
|
||||
// ShaderGraph Support
|
||||
("Shader Graphs/UISample (UIEffect)", "ShaderGraph Support (Unity 6 BuiltIn)", "v5.8.0"),
|
||||
("Shader Graphs/UISampleURP (UIEffect)", "ShaderGraph Support (Unity 6 URP)", "v5.8.0")
|
||||
});
|
||||
ShaderSampleImporter.RegisterShaderAliases(new[]
|
||||
{
|
||||
@@ -153,6 +168,30 @@ namespace Coffee.UIEffects
|
||||
c.SetEnablePreviewIfSelected(selection);
|
||||
}
|
||||
};
|
||||
|
||||
if (!Misc.isBatchOrBuilding)
|
||||
{
|
||||
// Enable the 'UIEFFECT_EDITOR' keyword only when drawing in the scene view camera.
|
||||
RenderPipelineManager.beginCameraRendering += (_, c) => EnableEditorMode(true, c);
|
||||
RenderPipelineManager.endCameraRendering += (_, c) => EnableEditorMode(false, c);
|
||||
Camera.onPreRender += c => EnableEditorMode(true, c);
|
||||
Camera.onPostRender += c => EnableEditorMode(false, c);
|
||||
|
||||
void EnableEditorMode(bool begin, Camera cam)
|
||||
{
|
||||
if (cam.cameraType == CameraType.SceneView)
|
||||
{
|
||||
if (begin)
|
||||
{
|
||||
Shader.EnableKeyword("UIEFFECT_EDITOR");
|
||||
}
|
||||
else
|
||||
{
|
||||
Shader.DisableKeyword("UIEFFECT_EDITOR");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<UIEffectBase> FindAll()
|
||||
@@ -194,11 +233,26 @@ namespace Coffee.UIEffects
|
||||
.ToArray();
|
||||
return AssetDatabase.FindAssets("t:prefab", dirs)
|
||||
.Select(AssetDatabase.GUIDToAssetPath)
|
||||
.OrderBy(x => AssetImporter.GetAtPath(x).userData)
|
||||
.Select(AssetDatabase.LoadAssetAtPath<UIEffect>)
|
||||
.Where(x => x)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
internal static UIEffectPreset[] LoadEditorPresetsV2()
|
||||
{
|
||||
var dirs = AssetDatabase.FindAssets(k_PresetDir + " t:folder")
|
||||
.Select(AssetDatabase.GUIDToAssetPath)
|
||||
.Where(x => Path.GetFileName(x) == k_PresetDir)
|
||||
.OrderBy(x => x.StartsWith("Packages/com.coffee.ui-effect/"))
|
||||
.ToArray();
|
||||
return AssetDatabase.FindAssets("t:UIEffectPreset", dirs)
|
||||
.Select(AssetDatabase.GUIDToAssetPath)
|
||||
.OrderBy(x => AssetImporter.GetAtPath(x).userData)
|
||||
.Select(AssetDatabase.LoadAssetAtPath<UIEffectPreset>)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
internal static void SaveAsNewPreset(UIEffect effect)
|
||||
{
|
||||
if (!Directory.Exists(k_PresetSaveDir))
|
||||
@@ -206,18 +260,16 @@ namespace Coffee.UIEffects
|
||||
Directory.CreateDirectory(k_PresetSaveDir);
|
||||
}
|
||||
|
||||
var prefabPath = EditorUtility.SaveFilePanel("Save Preset", k_PresetSaveDir, effect.name, "prefab");
|
||||
if (string.IsNullOrEmpty(prefabPath)) return;
|
||||
var path = EditorUtility.SaveFilePanel("Save Preset", k_PresetSaveDir, effect.name, "asset");
|
||||
if (string.IsNullOrEmpty(path)) return;
|
||||
|
||||
var prefab = new GameObject();
|
||||
prefab.SetActive(false);
|
||||
path = FileUtil.GetProjectRelativePath(path);
|
||||
path = AssetDatabase.GenerateUniqueAssetPath(path);
|
||||
|
||||
var preset = prefab.AddComponent<UIEffect>();
|
||||
preset.LoadPreset(effect);
|
||||
var prefabAsset = PrefabUtility.SaveAsPrefabAsset(prefab, prefabPath);
|
||||
|
||||
EditorGUIUtility.PingObject(prefabAsset);
|
||||
DestroyImmediate(prefab);
|
||||
var preset = CreateInstance<UIEffectPreset>();
|
||||
effect.SavePreset(preset, false);
|
||||
AssetDatabase.CreateAsset(preset, path);
|
||||
EditorGUIUtility.PingObject(preset);
|
||||
}
|
||||
|
||||
[SettingsProvider]
|
||||
@@ -226,7 +278,7 @@ namespace Coffee.UIEffects
|
||||
return new PreloadedProjectSettingsProvider("Project/UI/UI Effect");
|
||||
}
|
||||
|
||||
internal static (string path, bool builtin) GetPresetPath(UIEffect preset)
|
||||
internal static (string path, bool builtin) GetPresetPath(Object preset)
|
||||
{
|
||||
var assetPath = AssetDatabase.GetAssetPath(preset);
|
||||
var builtin = assetPath.StartsWith("Packages/com.coffee.ui-effect/");
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using Coffee.UIEffectInternal;
|
||||
using System.Linq;
|
||||
using Coffee.UIEffectInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
|
||||
public class UIEffectReplica : UIEffectBase
|
||||
public class UIEffectReplica : UIEffectBase, ISerializationCallbackReceiver
|
||||
{
|
||||
[SerializeField] private UIEffect m_Target;
|
||||
[SerializeField] private UIEffectPreset m_Preset;
|
||||
[SerializeField] private bool m_UseTargetTransform = true;
|
||||
|
||||
[PowerRange(0.01f, 100, 10f)]
|
||||
@@ -19,9 +21,6 @@ namespace Coffee.UIEffects
|
||||
[SerializeField]
|
||||
protected RectTransform m_CustomRoot = null;
|
||||
|
||||
[SerializeField]
|
||||
protected Flip m_Flip = 0;
|
||||
|
||||
private UIEffect _currentTarget;
|
||||
|
||||
public UIEffect target
|
||||
@@ -31,12 +30,26 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
if (m_Target == value) return;
|
||||
m_Target = value;
|
||||
m_Preset = null;
|
||||
RefreshTarget(m_Target);
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public UIEffectPreset preset
|
||||
{
|
||||
get => m_Preset;
|
||||
set
|
||||
{
|
||||
if (m_Preset == value) return;
|
||||
m_Preset = value;
|
||||
RefreshTarget(null);
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public bool useTargetTransform
|
||||
{
|
||||
get => m_UseTargetTransform;
|
||||
@@ -82,17 +95,6 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public override Flip flip
|
||||
{
|
||||
get => m_Flip;
|
||||
set
|
||||
{
|
||||
if (m_Flip == value) return;
|
||||
m_Flip = value;
|
||||
SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public override float actualSamplingScale => Mathf.Clamp(m_SamplingScale, 0.01f, 100);
|
||||
|
||||
public override bool canModifyShape => m_AllowToModifyMeshShape;
|
||||
@@ -103,10 +105,13 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!target) return null;
|
||||
if (!isTargetInScene) return base.context;
|
||||
// Following the preset/preset-target.
|
||||
if (preset || (target && !isTargetInScene)) return base.context;
|
||||
|
||||
return target.isActiveAndEnabled ? target.context : null;
|
||||
// Following the instantiated target.
|
||||
return target && target.isActiveAndEnabled && isTargetInScene
|
||||
? target.context
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +125,11 @@ namespace Coffee.UIEffects
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
RefreshTarget(target);
|
||||
if (!preset)
|
||||
{
|
||||
RefreshTarget(target);
|
||||
}
|
||||
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
@@ -145,8 +154,16 @@ namespace Coffee.UIEffects
|
||||
|
||||
internal override void SetEnablePreviewIfSelected(GameObject[] selection)
|
||||
{
|
||||
if (!isTargetInScene) return;
|
||||
target.SetEnablePreviewIfSelected(selection);
|
||||
// Following the instantiated target.
|
||||
if (isTargetInScene)
|
||||
{
|
||||
target.SetEnablePreviewIfSelected(selection);
|
||||
}
|
||||
// Following the preset/preset-target.
|
||||
else if (context != null)
|
||||
{
|
||||
context.SetEnablePreview(selection.Contains(gameObject), effectMaterial);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -172,30 +189,34 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnBeforeCanvasRebuild()
|
||||
internal override void UpdateContext(UIEffectContext dst)
|
||||
{
|
||||
base.OnBeforeCanvasRebuild();
|
||||
|
||||
if (useTargetTransform && isTargetInScene && CheckTransformChangedWith(target.transform))
|
||||
// Following the preset.
|
||||
if (preset)
|
||||
{
|
||||
SetVerticesDirty();
|
||||
preset.UpdateContext(dst);
|
||||
}
|
||||
}
|
||||
|
||||
internal override void UpdateContext(UIEffectContext c)
|
||||
{
|
||||
if (target && !isTargetInScene)
|
||||
// Following the preset-target.
|
||||
else if (target && !isTargetInScene)
|
||||
{
|
||||
target.UpdateContext(c);
|
||||
target.UpdateContext(dst);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ApplyContextToMaterial(Material material)
|
||||
{
|
||||
if (!isActiveAndEnabled || !target) return;
|
||||
if (isTargetInScene && !target.isActiveAndEnabled) return;
|
||||
if (!isActiveAndEnabled && !preset && !target) return;
|
||||
|
||||
base.ApplyContextToMaterial(material);
|
||||
// Following the preset/preset-target.
|
||||
if (preset || (target && !isTargetInScene))
|
||||
{
|
||||
base.ApplyContextToMaterial(material);
|
||||
}
|
||||
// Following the instantiated target.
|
||||
else if (isTargetInScene && target.isActiveAndEnabled)
|
||||
{
|
||||
base.ApplyContextToMaterial(material);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetRate(float rate, UIEffectTweener.CullingMask mask)
|
||||
@@ -208,5 +229,22 @@ namespace Coffee.UIEffects
|
||||
|
||||
return target.IsRaycastLocationValid(sp, eventCamera);
|
||||
}
|
||||
|
||||
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
if (m_Preset)
|
||||
{
|
||||
m_Target = null;
|
||||
}
|
||||
else if (m_Target)
|
||||
{
|
||||
m_Preset = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,394 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
internal static class GradientUtil
|
||||
{
|
||||
public static void DoHorizontalGradient(List<UIVertex> verts, Color a, Color b, float offset, float scale,
|
||||
Rect rect, Matrix4x4 m)
|
||||
{
|
||||
for (var i = 0; i < verts.Count; i++)
|
||||
{
|
||||
var vt = verts[i];
|
||||
var x = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(vt.position).x);
|
||||
var t = Mathf.Clamp01(offset + (x - 0.5f) * scale + 0.5f);
|
||||
vt.color *= Color.Lerp(a, b, t);
|
||||
verts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoHorizontalGradient(List<UIVertex> verts, Gradient gradient, List<float> splitTimes,
|
||||
float offset, float scale, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
var count = verts.Count;
|
||||
for (var i = 0; i < verts.Count; i += 6)
|
||||
{
|
||||
UIVertexUtil.GetQuad(verts, i, out var lb, out var lt, out var rt, out var rb);
|
||||
if (i + 5 < count)
|
||||
{
|
||||
UIVertexUtil.SplitHorizontalFast(verts, splitTimes, lb, lt, ref rb, ref rt, rect, m);
|
||||
}
|
||||
|
||||
lb.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(lb.position).x + 0.0005f, offset, scale);
|
||||
lt.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(lt.position).x + 0.0005f, offset, scale);
|
||||
rt.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(rt.position).x - 0.0005f, offset, scale);
|
||||
rb.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(rb.position).x - 0.0005f, offset, scale);
|
||||
UIVertexUtil.SetQuad(verts, i, lb, lt, rt, rb);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
static Color Evaluate(Gradient gradient, Rect rect, float t, float offset, float scale)
|
||||
{
|
||||
t = Mathf.InverseLerp(rect.xMin, rect.xMax, t); // 0-1
|
||||
t = Mathf.Repeat((t - offset * scale - (1 - scale) / 2) / scale, 1); // Revert
|
||||
return gradient.Evaluate(t);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoHorizontalGradientFixed(List<UIVertex> verts, Gradient gradient, float offset, float scale,
|
||||
Rect rect, Matrix4x4 m)
|
||||
{
|
||||
var count = verts.Count;
|
||||
for (var i = 0; i < count; i += 3)
|
||||
{
|
||||
var vt0 = verts[i + 0];
|
||||
var vt1 = verts[i + 1];
|
||||
var vt2 = verts[i + 2];
|
||||
var center = m.MultiplyPoint3x4((vt0.position + vt1.position + vt2.position) / 3).x;
|
||||
vt0.color *= Evaluate(gradient, rect, center, offset, scale);
|
||||
vt1.color *= Evaluate(gradient, rect, center, offset, scale);
|
||||
vt2.color *= Evaluate(gradient, rect, center, offset, scale);
|
||||
verts[i + 0] = vt0;
|
||||
verts[i + 1] = vt1;
|
||||
verts[i + 2] = vt2;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
static Color Evaluate(Gradient gradient, Rect rect, float t, float offset, float scale)
|
||||
{
|
||||
t = Mathf.InverseLerp(rect.xMin, rect.xMax, t); // 0-1
|
||||
t = Mathf.Repeat((t - offset * scale - (1 - scale) / 2) / scale, 1); // Revert
|
||||
return gradient.Evaluate(t);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoHorizontalGradient(List<UIVertex> verts, Gradient gradient, float offset, float scale,
|
||||
Rect rect, Matrix4x4 m)
|
||||
{
|
||||
var count = verts.Count;
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var vt = verts[i];
|
||||
vt.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(vt.position).x, offset, scale);
|
||||
verts[i] = vt;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
static Color Evaluate(Gradient gradient, Rect rect, float t, float offset, float scale)
|
||||
{
|
||||
t = Mathf.InverseLerp(rect.xMin, rect.xMax, t); // 0-1
|
||||
t = Mathf.Repeat((t - offset * scale - (1 - scale) / 2) / scale, 1); // Revert
|
||||
return gradient.Evaluate(t);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoVerticalGradient(List<UIVertex> verts, Color a, Color b, float offset, float scale,
|
||||
Rect rect, Matrix4x4 m)
|
||||
{
|
||||
for (var i = 0; i < verts.Count; i++)
|
||||
{
|
||||
var vt = verts[i];
|
||||
var y = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(vt.position).y);
|
||||
var t = Mathf.Clamp01(offset + (0.5f - y) * scale + 0.5f);
|
||||
vt.color *= Color.Lerp(a, b, t);
|
||||
verts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoVerticalGradient(List<UIVertex> verts, Gradient gradient, List<float> splitTimes,
|
||||
float offset, float scale, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
var count = verts.Count;
|
||||
for (var i = 0; i < verts.Count; i += 6)
|
||||
{
|
||||
UIVertexUtil.GetQuad(verts, i, out var lb, out var lt, out var rt, out var rb);
|
||||
if (i + 5 < count)
|
||||
{
|
||||
UIVertexUtil.SplitVerticalFast(verts, splitTimes, lb, ref lt, rb, ref rt, rect, m);
|
||||
}
|
||||
|
||||
lb.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(lb.position).y + 0.0005f, offset, scale);
|
||||
lt.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(lt.position).y - 0.0005f, offset, scale);
|
||||
rt.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(rt.position).y - 0.0005f, offset, scale);
|
||||
rb.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(rb.position).y + 0.0005f, offset, scale);
|
||||
UIVertexUtil.SetQuad(verts, i, lb, lt, rt, rb);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
static Color Evaluate(Gradient gradient, Rect rect, float t, float offset, float scale)
|
||||
{
|
||||
t = Mathf.InverseLerp(rect.yMin, rect.yMax, t); // 0-1
|
||||
t = Mathf.Repeat((t - offset * scale - (1 - scale) / 2) / scale, 1); // Revert
|
||||
return gradient.Evaluate(t);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoVerticalGradient(List<UIVertex> verts, Gradient gradient, float offset, float scale,
|
||||
Rect rect, Matrix4x4 m)
|
||||
{
|
||||
var count = verts.Count;
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var vt = verts[i];
|
||||
vt.color *= Evaluate(gradient, rect, m.MultiplyPoint3x4(vt.position).y, offset, scale);
|
||||
verts[i] = vt;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
static Color Evaluate(Gradient gradient, Rect rect, float t, float offset, float scale)
|
||||
{
|
||||
t = Mathf.InverseLerp(rect.yMin, rect.yMax, t); // 0-1
|
||||
t = Mathf.Repeat((t - offset * scale - (1 - scale) / 2) / scale, 1); // Revert
|
||||
return gradient.Evaluate(t);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoDiagonal(List<UIVertex> verts, Color a, Color b, Color c, Color d, float offset,
|
||||
float scale, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
for (var i = 0; i < verts.Count; i++)
|
||||
{
|
||||
var vt = verts[i];
|
||||
var x = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(vt.position).x);
|
||||
var y = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(vt.position).y);
|
||||
var tx = Mathf.Clamp01(offset + (x - 0.5f) * scale + 0.5f);
|
||||
var ty = Mathf.Clamp01(offset + (0.5f - y) * scale + 0.5f);
|
||||
vt.color *= Color.Lerp(Color.Lerp(a, b, tx), Color.Lerp(c, d, tx), ty);
|
||||
verts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoDiagonalGradientToRightBottom(List<UIVertex> verts, Color a, Color b, float offset,
|
||||
float scale, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
for (var i = 0; i < verts.Count; i++)
|
||||
{
|
||||
var vt = verts[i];
|
||||
var x = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(vt.position).x);
|
||||
var y = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(vt.position).y);
|
||||
var t = Mathf.Clamp01(0.5f * scale + 0.5f + offset - (1 - x + y) * scale / 2);
|
||||
vt.color *= Color.Lerp(a, b, t);
|
||||
verts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoDiagonalGradientToLeftBottom(List<UIVertex> verts, Color a, Color b, float offset,
|
||||
float scale, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
for (var i = 0; i < verts.Count; i++)
|
||||
{
|
||||
var vt = verts[i];
|
||||
var x = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(vt.position).x);
|
||||
var y = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(vt.position).y);
|
||||
var t = Mathf.Clamp01(0.5f * scale + 0.5f + offset - (x + y) * scale / 2);
|
||||
vt.color *= Color.Lerp(a, b, t);
|
||||
verts[i] = vt;
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoRadialGradient(List<UIVertex> verts, Color a, Color b, float offset, float scale,
|
||||
Rect rect, Matrix4x4 m, int divide)
|
||||
{
|
||||
var count = verts.Count;
|
||||
for (var i = 0; i < count; i += 6)
|
||||
{
|
||||
UIVertexUtil.GetQuad(verts, i, out var lb, out var lt, out var rt, out var rb);
|
||||
for (var j = 1; j < divide; j++)
|
||||
{
|
||||
var min = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(lb.position).x);
|
||||
var max = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(rt.position).x);
|
||||
var time = 1f - (float)j / divide;
|
||||
if (time <= min || max <= time) continue;
|
||||
|
||||
UIVertexUtil.SplitHorizontal(verts, lb, lt, ref rb, ref rt, Mathf.InverseLerp(min, max, time));
|
||||
}
|
||||
|
||||
UIVertexUtil.SetQuad(verts, i, lb, lt, rt, rb);
|
||||
}
|
||||
|
||||
count = verts.Count;
|
||||
for (var i = 0; i < verts.Count; i += 6)
|
||||
{
|
||||
UIVertexUtil.GetQuad(verts, i, out var lb, out var lt, out var rt, out var rb);
|
||||
|
||||
if (i + 5 < count)
|
||||
{
|
||||
for (var j = 1; j < divide; j++)
|
||||
{
|
||||
var min = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(lb.position).y);
|
||||
var max = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(rt.position).y);
|
||||
var time = 1f - (float)j / divide;
|
||||
if (time <= min || max <= time) continue;
|
||||
|
||||
UIVertexUtil.SplitVertical(verts, lb, ref lt, rb, ref rt, Mathf.InverseLerp(min, max, time));
|
||||
}
|
||||
}
|
||||
|
||||
lb.color *= DoGradient(lb, a, b, rect, m, offset, scale);
|
||||
lt.color *= DoGradient(lt, a, b, rect, m, offset, scale);
|
||||
rt.color *= DoGradient(rt, a, b, rect, m, offset, scale);
|
||||
rb.color *= DoGradient(rb, a, b, rect, m, offset, scale);
|
||||
UIVertexUtil.SetQuad(verts, i, lb, lt, rt, rb);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
static Color DoGradient(UIVertex vt, Color a, Color b, Rect rect, Matrix4x4 m, float offset, float scale)
|
||||
{
|
||||
var x = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(vt.position).x) - 0.5f;
|
||||
var y = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(vt.position).y) - 0.5f;
|
||||
var t = Mathf.Clamp01(offset + Mathf.Sqrt(x * x + y * y) * 2 * scale);
|
||||
return Color.Lerp(a, b, t);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DoAngleGradient(List<UIVertex> verts, Gradient gradient, List<float> splitTimes,
|
||||
float offset, float scale, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
UIVertexUtil.SplitAngle(verts, splitTimes, rect, m);
|
||||
if (gradient.mode == GradientMode.Fixed)
|
||||
{
|
||||
DoHorizontalGradientFixed(verts, gradient, offset, scale, rect, m);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoHorizontalGradient(verts, gradient, offset, scale, rect, m);
|
||||
}
|
||||
}
|
||||
|
||||
public static void GetKeyTimes(Gradient gradient, List<float> results)
|
||||
{
|
||||
results.Clear();
|
||||
var colors = gradient.colorKeys;
|
||||
for (var i = 0; i < colors.Length; i++)
|
||||
{
|
||||
AddKeyTime(results, colors[i].time);
|
||||
}
|
||||
|
||||
var alphas = gradient.alphaKeys;
|
||||
for (var i = 0; i < alphas.Length; i++)
|
||||
{
|
||||
AddKeyTime(results, alphas[i].time);
|
||||
}
|
||||
|
||||
AddKeyTime(results, 0);
|
||||
AddKeyTime(results, 1);
|
||||
results.Sort((a, b) => b.CompareTo(a));
|
||||
|
||||
return;
|
||||
|
||||
static void AddKeyTime(List<float> results, float time)
|
||||
{
|
||||
if (!Contains(results, time))
|
||||
{
|
||||
results.Add(time);
|
||||
}
|
||||
}
|
||||
|
||||
static bool Contains(List<float> list, float v)
|
||||
{
|
||||
for (var i = 0; i < list.Count; i++)
|
||||
{
|
||||
if (Mathf.Abs(list[i] - v) < 0.001f) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void SplitKeyTimes(List<float> keyTimes, List<float> results, float offset, float scale)
|
||||
{
|
||||
results.Clear();
|
||||
for (var i = 0; i < keyTimes.Count; i++)
|
||||
{
|
||||
AddSplitTime(results, keyTimes[i], offset, scale);
|
||||
}
|
||||
|
||||
results.Sort((a, b) => b.CompareTo(a));
|
||||
|
||||
return;
|
||||
|
||||
static void AddSplitTime(List<float> results, float time, float offset, float scale)
|
||||
{
|
||||
time = time * scale + offset * scale + (1 - scale) / 2;
|
||||
|
||||
while (0 < time)
|
||||
{
|
||||
time -= scale;
|
||||
}
|
||||
|
||||
while (time <= 1f)
|
||||
{
|
||||
if (0 <= time && !Contains(results, time))
|
||||
{
|
||||
results.Add(time);
|
||||
}
|
||||
|
||||
time += scale;
|
||||
}
|
||||
}
|
||||
|
||||
static bool Contains(List<float> list, float v)
|
||||
{
|
||||
for (var i = 0; i < list.Count; i++)
|
||||
{
|
||||
if (Mathf.Abs(list[i] - v) < 0.001f) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static Rect RotateRectAsNormalized(Rect rect, float rot)
|
||||
{
|
||||
var rad = -rot * Mathf.Deg2Rad;
|
||||
var cos = Mathf.Cos(rad);
|
||||
var sin = Mathf.Sin(rad);
|
||||
var dir = new Vector2(cos, sin);
|
||||
var center = rect.center;
|
||||
|
||||
if (Mathf.Abs(dir.x) < 0.0001f)
|
||||
{
|
||||
rect.width = rect.height;
|
||||
}
|
||||
else if (Mathf.Abs(dir.y) < 0.0001f)
|
||||
{
|
||||
rect.height = rect.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
var d0 = GetPointToLineDistance(new Vector2(rect.xMin, rect.yMax), center, dir, out var p0);
|
||||
var d1 = GetPointToLineDistance(new Vector2(rect.xMin, rect.yMin), center, dir, out var p1);
|
||||
var closest = d0 < d1 ? p0 : p1;
|
||||
rect.width = rect.height = Vector2.Distance(center, closest) * 2;
|
||||
}
|
||||
|
||||
rect.center = new Vector2(Vector2.Dot(center, dir), 0);
|
||||
return rect;
|
||||
}
|
||||
|
||||
private static float GetPointToLineDistance(Vector2 point, Vector2 origin, Vector2 dir, out Vector2 closest)
|
||||
{
|
||||
var dirNormalized = dir.normalized;
|
||||
var time = Vector2.Dot(point - origin, dirNormalized);
|
||||
closest = origin + time * dirNormalized;
|
||||
return Vector2.Distance(point, closest);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,27 +72,24 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
}
|
||||
|
||||
public virtual Vector4 ModifyExpandSize(Graphic graphic, Vector2 expandSize)
|
||||
public virtual Vector4 ModifyExpandSize(Graphic graphic, Vector4 expandSize)
|
||||
{
|
||||
return new Vector4(expandSize.x, expandSize.y, expandSize.x, expandSize.y);
|
||||
return expandSize;
|
||||
}
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex, UIVertex, float, UIVertex> s_OnLerpVertex =
|
||||
null;
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
|
||||
vt =>
|
||||
private static readonly Func<UIVertex, float, UIVertex> s_OnMarkAsShadow =
|
||||
(vt, s) =>
|
||||
{
|
||||
vt.uv0.z -= 8;
|
||||
vt.uv0.w -= 8;
|
||||
vt.uv1.x -= s;
|
||||
return vt;
|
||||
};
|
||||
|
||||
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
|
||||
(vt, uvMask, normalizedX, normalizedY) =>
|
||||
private static readonly Func<UIVertex, Rect, UIVertex> s_OnModifyVertex =
|
||||
(vt, uvMask) =>
|
||||
{
|
||||
vt.uv0.z = normalizedX;
|
||||
vt.uv0.w = normalizedY;
|
||||
vt.uv1 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
|
||||
return vt;
|
||||
};
|
||||
|
||||
@@ -33,25 +33,22 @@ namespace Coffee.UIEffects
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Vector4 ModifyExpandSize(Graphic graphic, Vector2 expandSize)
|
||||
public override Vector4 ModifyExpandSize(Graphic graphic, Vector4 expandSize)
|
||||
{
|
||||
var image = graphic as Image;
|
||||
var ret = new Vector4(expandSize.x, expandSize.y, expandSize.x, expandSize.y);
|
||||
|
||||
if (image
|
||||
if (graphic is Image image
|
||||
&& image.type == Image.Type.Filled
|
||||
&& image.fillMethod == Image.FillMethod.Radial360
|
||||
&& image.fillAmount <= 0.5f)
|
||||
{
|
||||
ret[(image.fillOrigin + (image.fillClockwise ? 2 : 0)) % 4] = 0;
|
||||
expandSize[(image.fillOrigin + (image.fillClockwise ? 2 : 0)) % 4] = 0;
|
||||
|
||||
if (image.fillAmount <= 0.25f)
|
||||
{
|
||||
ret[(image.fillOrigin + 3) % 4] = 0;
|
||||
expandSize[(image.fillOrigin + 3) % 4] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
return expandSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
public static class ShadowUtil
|
||||
{
|
||||
public static Func<UIVertex, UIVertex> onMarkAsShadow;
|
||||
public static Func<UIVertex, float, UIVertex> onMarkAsShadow;
|
||||
|
||||
public static void DoShadow(List<UIVertex> verts, Vector2[] vectors, Vector2 distance, int iteration,
|
||||
float fade)
|
||||
@@ -30,14 +30,7 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
if (onMarkAsShadow != null)
|
||||
{
|
||||
verts[i] = onMarkAsShadow(verts[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
var vt = verts[i];
|
||||
vt.uv0.z -= 8;
|
||||
vt.uv0.w -= 8;
|
||||
verts[i] = vt;
|
||||
verts[i] = onMarkAsShadow(verts[i], 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,6 +47,15 @@ namespace Coffee.UIEffects
|
||||
var offset = distance.y - (scale + 1) * pivot * height;
|
||||
var range = new Vector2(rect2.yMin, rect2.yMax);
|
||||
ApplyMirror(verts, count, rate, range, scale, offset, fade);
|
||||
|
||||
// Mark as shadow vertices.
|
||||
for (var i = 0; i < verts.Count - count; i++)
|
||||
{
|
||||
if (onMarkAsShadow != null)
|
||||
{
|
||||
verts[i] = onMarkAsShadow(verts[i], 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void ApplyMirror(List<UIVertex> verts, int count, float rate, Vector2 range, float scale,
|
||||
|
||||
@@ -91,19 +91,16 @@ namespace Coffee.UIEffects
|
||||
};
|
||||
#endif
|
||||
|
||||
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
|
||||
vt =>
|
||||
private static readonly Func<UIVertex, float, UIVertex> s_OnMarkAsShadow =
|
||||
(vt, s) =>
|
||||
{
|
||||
vt.uv1.z -= 8;
|
||||
vt.uv1.w -= 8;
|
||||
vt.uv2.x -= s;
|
||||
return vt;
|
||||
};
|
||||
|
||||
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
|
||||
(vt, uvMask, normalizedX, normalizedY) =>
|
||||
private static readonly Func<UIVertex, Rect, UIVertex> s_OnModifyVertex =
|
||||
(vt, uvMask) =>
|
||||
{
|
||||
vt.uv1.z = normalizedX;
|
||||
vt.uv1.w = normalizedY;
|
||||
vt.uv2 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
|
||||
return vt;
|
||||
};
|
||||
@@ -257,14 +254,13 @@ namespace Coffee.UIEffects
|
||||
replica.target = pEffect;
|
||||
replica.useTargetTransform = true;
|
||||
replica.customRoot = null;
|
||||
replica.flip = pEffect.flip;
|
||||
}
|
||||
else if (effect is UIEffectReplica pReplica && pReplica.isActiveAndEnabled)
|
||||
{
|
||||
replica.target = pReplica.target;
|
||||
replica.preset = pReplica.preset;
|
||||
replica.useTargetTransform = pReplica.useTargetTransform;
|
||||
replica.customRoot = pReplica.customRoot;
|
||||
replica.flip = pReplica.flip;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Coffee.UIEffectInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -160,175 +159,5 @@ namespace Coffee.UIEffects
|
||||
if (max.y < value.y) max.y = value.y; // Top
|
||||
}
|
||||
}
|
||||
|
||||
public static void GetQuad(List<UIVertex> verts, int i, out UIVertex lb, out UIVertex lt, out UIVertex rt,
|
||||
out UIVertex rb)
|
||||
{
|
||||
lb = verts[i];
|
||||
lt = verts[i + 1];
|
||||
rt = verts[i + 2];
|
||||
rb = verts[i + 4];
|
||||
}
|
||||
|
||||
public static void SetQuad(List<UIVertex> verts, int i, UIVertex lb, UIVertex lt, UIVertex rt, UIVertex rb)
|
||||
{
|
||||
verts[i] = verts[i + 5] = lb;
|
||||
verts[i + 1] = lt;
|
||||
verts[i + 2] = verts[i + 3] = rt;
|
||||
verts[i + 4] = rb;
|
||||
}
|
||||
|
||||
public static void SplitHorizontalFast(List<UIVertex> verts, List<float> times, UIVertex lb, UIVertex lt,
|
||||
ref UIVertex rb, ref UIVertex rt, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
if (times == null || times.Count == 0) return;
|
||||
|
||||
var min = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(lb.position).x);
|
||||
for (var i = 0; i < times.Count; i++)
|
||||
{
|
||||
var time = times[i];
|
||||
if (time <= 0 || 1 <= time) continue;
|
||||
|
||||
var max = Mathf.InverseLerp(rect.xMin, rect.xMax, m.MultiplyPoint3x4(rt.position).x);
|
||||
if (time <= min || max <= time) continue;
|
||||
|
||||
SplitHorizontal(verts, lb, lt, ref rb, ref rt, Mathf.InverseLerp(min, max, time));
|
||||
}
|
||||
}
|
||||
|
||||
public static void SplitHorizontal(List<UIVertex> verts, UIVertex lb, UIVertex lt, ref UIVertex rb,
|
||||
ref UIVertex rt, float time)
|
||||
{
|
||||
var mb = VertexLerp(lb, rb, time);
|
||||
var mt = VertexLerp(lt, rt, time);
|
||||
verts.Add(mb);
|
||||
verts.Add(mt);
|
||||
verts.Add(rt);
|
||||
verts.Add(rt);
|
||||
verts.Add(rb);
|
||||
verts.Add(mb);
|
||||
rt = mt;
|
||||
rb = mb;
|
||||
}
|
||||
|
||||
public static void SplitVerticalFast(List<UIVertex> verts, List<float> times, UIVertex lb, ref UIVertex lt,
|
||||
UIVertex rb, ref UIVertex rt, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
if (times == null || times.Count == 0) return;
|
||||
|
||||
var min = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(lb.position).y);
|
||||
for (var i = 0; i < times.Count; i++)
|
||||
{
|
||||
var time = times[i];
|
||||
var max = Mathf.InverseLerp(rect.yMin, rect.yMax, m.MultiplyPoint3x4(rt.position).y);
|
||||
if (time <= min || max <= time) continue;
|
||||
|
||||
SplitVertical(verts, lb, ref lt, rb, ref rt, Mathf.InverseLerp(min, max, time));
|
||||
}
|
||||
}
|
||||
|
||||
public static void SplitVertical(List<UIVertex> verts, UIVertex lb, ref UIVertex lt, UIVertex rb,
|
||||
ref UIVertex rt, float time)
|
||||
{
|
||||
var lm = VertexLerp(lb, lt, time);
|
||||
var rm = VertexLerp(rb, rt, time);
|
||||
verts.Add(lm);
|
||||
verts.Add(lt);
|
||||
verts.Add(rt);
|
||||
verts.Add(rt);
|
||||
verts.Add(rm);
|
||||
verts.Add(lm);
|
||||
lt = lm;
|
||||
rt = rm;
|
||||
}
|
||||
|
||||
public static void SplitAngle(List<UIVertex> verts, List<float> times, Rect rect, Matrix4x4 m)
|
||||
{
|
||||
if (times == null || times.Count == 0) return;
|
||||
|
||||
for (var i = 0; i < times.Count; i++)
|
||||
{
|
||||
var x = Mathf.Lerp(rect.xMin, rect.xMax, times[i]);
|
||||
Split(verts, new Vector2(x, 0), new Vector2(0, 1), m);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
static void Split(List<UIVertex> verts, Vector2 p, Vector2 dir, Matrix4x4 m)
|
||||
{
|
||||
// Each triangle
|
||||
var intersections = InternalListPool<UIVertex>.Rent();
|
||||
var count = verts.Count;
|
||||
for (var i = 0; i < count; i += 3)
|
||||
{
|
||||
intersections.Clear();
|
||||
var n = -1;
|
||||
// Each edge
|
||||
for (var j = 0; j < 3; j++)
|
||||
{
|
||||
var start = verts[i + j];
|
||||
var end = verts[i + (j + 1) % 3];
|
||||
|
||||
if (DoesIntersect(start, end, p, dir, m, out var intersection))
|
||||
{
|
||||
intersections.Add(intersection);
|
||||
}
|
||||
else
|
||||
{
|
||||
n = j;
|
||||
}
|
||||
}
|
||||
|
||||
if (intersections.Count == 2)
|
||||
{
|
||||
var vt0 = verts[i + (n + 2) % 3];
|
||||
var vt1 = verts[i + (n + 0) % 3];
|
||||
var vt2 = verts[i + (n + 1) % 3];
|
||||
var it0 = intersections[0];
|
||||
var it1 = intersections[1];
|
||||
var it2 = intersections[(n + 1) % 2];
|
||||
verts[i + 0] = vt0;
|
||||
verts[i + 1] = it0;
|
||||
verts[i + 2] = it1;
|
||||
verts.Add(it2);
|
||||
verts.Add(vt1);
|
||||
verts.Add(vt2);
|
||||
verts.Add(vt2);
|
||||
verts.Add(it0);
|
||||
verts.Add(it1);
|
||||
}
|
||||
}
|
||||
|
||||
InternalListPool<UIVertex>.Return(ref intersections);
|
||||
}
|
||||
|
||||
static bool DoesIntersect(UIVertex start, UIVertex end, Vector2 p, Vector2 dir, Matrix4x4 m,
|
||||
out UIVertex intersection)
|
||||
{
|
||||
intersection = default;
|
||||
var startPosition = (Vector2)m.MultiplyPoint3x4(start.position);
|
||||
var endPosition = (Vector2)m.MultiplyPoint3x4(end.position);
|
||||
var segDir = endPosition - startPosition;
|
||||
var cross = Vector3.Cross(segDir, dir);
|
||||
|
||||
// Parallel.
|
||||
if (cross.magnitude < Mathf.Epsilon)
|
||||
{
|
||||
return false; // 線と線分が平行
|
||||
}
|
||||
|
||||
var diff = p - startPosition;
|
||||
var determinant = Vector3.Dot(cross, cross);
|
||||
var t = Vector3.Dot(Vector3.Cross(diff, dir), cross) / determinant;
|
||||
|
||||
if (0 <= t && t <= 1)
|
||||
{
|
||||
intersection = VertexLerp(start, end, t);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ SpriteAtlas:
|
||||
m_CrunchedCompression: 0
|
||||
m_AllowsAlphaSplitting: 0
|
||||
m_Overridden: 0
|
||||
m_IgnorePlatformSupport: 0
|
||||
m_AndroidETC2FallbackOverride: 0
|
||||
m_ForceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
packingSettings:
|
||||
@@ -48,6 +49,14 @@ SpriteAtlas:
|
||||
bindAsDefault: 1
|
||||
isAtlasV2: 0
|
||||
cachedData: {fileID: 0}
|
||||
packedSpriteRenderDataKeys:
|
||||
- 2ee815c0807434e9091770d1c6cdc70b: 21300000
|
||||
- 098475820cf634867a339bb9af940722: 21300000
|
||||
- 03b5a015427324a419a5ddbd5d5a6551: 21300000
|
||||
- e822d767ed19641dcaf9831e1c8a742a: 21300000
|
||||
- 9617fea85692e4f5fb65fb2ddd4496ce: 21300000
|
||||
- 1851730bef7524e58b285a364983e21e: 21300000
|
||||
- be1fa55f69843fb4aaf4d0ff56004fba: 21300000
|
||||
m_MasterAtlas: {fileID: 0}
|
||||
m_PackedSprites:
|
||||
- {fileID: 21300000, guid: 2ee815c0807434e9091770d1c6cdc70b, type: 3}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5411,7 +5411,7 @@ MonoBehaviour:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1887047859}
|
||||
m_Enabled: 0
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
|
||||
m_Name:
|
||||
|
||||
@@ -295,7 +295,6 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 0
|
||||
m_ToneIntensity: 1
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 0.344
|
||||
m_Color: {r: 0, g: 1.7098039, b: 4, a: 1}
|
||||
@@ -340,6 +339,8 @@ MonoBehaviour:
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationIntensity: 1
|
||||
m_GradationColorFilter: 1
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -382,11 +383,23 @@ MonoBehaviour:
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeColorGlow: 0
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
m_DetailFilter: 0
|
||||
m_DetailIntensity: 1
|
||||
m_DetailThreshold:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_DetailColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_DetailTex: {fileID: 0}
|
||||
m_DetailTexScale: {x: 1, y: 1}
|
||||
m_DetailTexOffset: {x: 0, y: 0}
|
||||
m_DetailTexSpeed: {x: 0, y: 0}
|
||||
m_CustomRoot: {fileID: 0}
|
||||
m_Flip: 0
|
||||
--- !u!1 &973375176
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -592,7 +605,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 189, y: -165}
|
||||
m_AnchoredPosition: {x: 189, y: -117}
|
||||
m_SizeDelta: {x: 415.4, y: 111.41}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1421004028
|
||||
@@ -609,7 +622,6 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 0
|
||||
m_ToneIntensity: 1
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 0
|
||||
m_ColorIntensity: 1
|
||||
m_Color: {r: 0.7454045, g: 0.18447503, b: 0.000303527, a: 1}
|
||||
@@ -654,6 +666,8 @@ MonoBehaviour:
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationIntensity: 1
|
||||
m_GradationColorFilter: 1
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -696,11 +710,23 @@ MonoBehaviour:
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeColorGlow: 0
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
m_DetailFilter: 0
|
||||
m_DetailIntensity: 1
|
||||
m_DetailThreshold:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_DetailColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_DetailTex: {fileID: 0}
|
||||
m_DetailTexScale: {x: 1, y: 1}
|
||||
m_DetailTexOffset: {x: 0, y: 0}
|
||||
m_DetailTexSpeed: {x: 0, y: 0}
|
||||
m_CustomRoot: {fileID: 0}
|
||||
m_Flip: 0
|
||||
--- !u!114 &1421004029
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -853,7 +879,6 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_ToneFilter: 1
|
||||
m_ToneIntensity: 0.75
|
||||
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ColorFilter: 6
|
||||
m_ColorIntensity: 0.6
|
||||
m_Color: {r: 0.16862746, g: 0, b: 0.12038653, a: 1}
|
||||
@@ -898,6 +923,8 @@ MonoBehaviour:
|
||||
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_ShadowColorGlow: 0
|
||||
m_GradationMode: 0
|
||||
m_GradationIntensity: 1
|
||||
m_GradationColorFilter: 1
|
||||
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -940,11 +967,23 @@ MonoBehaviour:
|
||||
m_EdgeWidth: 0.5
|
||||
m_EdgeColorFilter: 4
|
||||
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_EdgeColorGlow: 0
|
||||
m_EdgeShinyRate: 0.5
|
||||
m_EdgeShinyWidth: 0.5
|
||||
m_EdgeShinyAutoPlaySpeed: 1
|
||||
m_PatternArea: 1
|
||||
m_DetailFilter: 0
|
||||
m_DetailIntensity: 1
|
||||
m_DetailThreshold:
|
||||
m_Min: 0
|
||||
m_Max: 1
|
||||
m_DetailColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_DetailTex: {fileID: 0}
|
||||
m_DetailTexScale: {x: 1, y: 1}
|
||||
m_DetailTexOffset: {x: 0, y: 0}
|
||||
m_DetailTexSpeed: {x: 0, y: 0}
|
||||
m_CustomRoot: {fileID: 0}
|
||||
m_Flip: 0
|
||||
--- !u!114 &1567169364
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEditor.ShaderGraph;
|
||||
using UnityEngine;
|
||||
using BlendMode = UnityEngine.Rendering.BlendMode;
|
||||
|
||||
namespace UnityEditor.Rendering.BuiltIn.ShaderGraph
|
||||
{
|
||||
internal class BuiltInUIEffectSubTarget : BuiltInCanvasSubTarget
|
||||
{
|
||||
// UIEffectForShaderGraph.hlsl
|
||||
internal static string s_UIEffectHlsl => AssetDatabase.GUIDToAssetPath("5109b2ad9b8be459592190a5678464e3");
|
||||
|
||||
public BuiltInUIEffectSubTarget() { displayName = "Canvas (UIEffect)"; }
|
||||
|
||||
[MenuItem("Assets/Create/Shader Graph/BuiltIn/Canvas Shader Graph (UIEffect)", priority = 1000)]
|
||||
private static void CreateUnlitGraph()
|
||||
{
|
||||
var target = (BuiltInTarget)Activator.CreateInstance(typeof(BuiltInTarget));
|
||||
target.TrySetActiveSubTarget(typeof(BuiltInUIEffectSubTarget));
|
||||
target.CreateGraphAsset();
|
||||
}
|
||||
|
||||
protected override IncludeCollection postgraphIncludes => base.postgraphIncludes
|
||||
.Add(s_UIEffectHlsl, IncludeLocation.Postgraph); // Include UIEffectForShaderGraph.hlsl on postgraph
|
||||
|
||||
/// <summary>
|
||||
/// Modify pass descriptor for UIEffect.
|
||||
/// </summary>
|
||||
public static PassDescriptor ModifyUIPassDescriptor(PassDescriptor descriptor)
|
||||
{
|
||||
descriptor.keywords
|
||||
.AddKeywordForUIEffect("TONE", "s_ToneKeywords") // add tone keywords
|
||||
.AddKeywordForUIEffect("COLOR_FILTER") // add color filter keywords
|
||||
.AddKeywordForUIEffect("SAMPLING", "s_SamplingKeywords") // add sampling keywords
|
||||
.AddKeywordForUIEffect("TRANSITION", "s_TransitionKeywords") // add transition keywords
|
||||
.AddKeywordForUIEffect("EDGE", "s_EdgeKeywords") // add edge keywords
|
||||
.AddKeywordForUIEffect("DETAIL", "s_DetailKeywords") // add detail keywords
|
||||
.AddKeywordForUIEffect("TARGET", "s_TargetKeywords") // add target keywords
|
||||
.AddKeywordForUIEffect("GRADATION", "s_GradationKeywords") // add gradation keywords
|
||||
.AddKeywordForUIEffect("UIEFFECT_EDITOR", KeywordScope.Global) // add UIEffect editor keywords
|
||||
.AddKeywordForUIEffect("SOFTMASK_EDITOR", KeywordScope.Global) // add softmask editor keywords
|
||||
.AddKeywordForUIEffect("SOFTMASKABLE"); // add softmaskable keywords
|
||||
|
||||
descriptor.requiredFields
|
||||
.Add(StructFields.Varyings.texCoord2); // add texCoord2 for UIEffect (uvMask)
|
||||
|
||||
descriptor.renderStates = descriptor.renderStates
|
||||
.RemoveIf(x => x.descriptor.type == RenderStateType.Blend) // remove default blend state
|
||||
.Add(RenderState.Blend("Blend [_SrcBlend] [_DstBlend]")); // add custom blend state
|
||||
|
||||
descriptor.pragmas = descriptor.pragmas
|
||||
.RemoveIf(x =>
|
||||
x.value.Contains(" vertex ") || x.value.Contains(" fragment ")) // remove default vertex/fragment
|
||||
.Add(Pragma.Vertex("vert_override")) // add custom vertex function
|
||||
.Add(Pragma.Fragment("frag_override")); // add custom fragment function
|
||||
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modify shader properties for UIEffect.
|
||||
/// </summary>
|
||||
public static void ModifyShaderProperties(PropertyCollector collector)
|
||||
{
|
||||
collector.AddFloatProperty("_SrcBlend", (int)BlendMode.One);
|
||||
collector.AddFloatProperty("_DstBlend", (int)BlendMode.OneMinusSrcAlpha);
|
||||
}
|
||||
|
||||
public override PassDescriptor GenerateUIPassDescriptor(bool isSRP)
|
||||
{
|
||||
return ModifyUIPassDescriptor(base.GenerateUIPassDescriptor(isSRP));
|
||||
}
|
||||
|
||||
public override void CollectShaderProperties(PropertyCollector collector, GenerationMode generationMode)
|
||||
{
|
||||
base.CollectShaderProperties(collector, generationMode);
|
||||
ModifyShaderProperties(collector);
|
||||
}
|
||||
}
|
||||
|
||||
internal static class ShaderGraphExtensions
|
||||
{
|
||||
public static RenderStateCollection RemoveIf(this RenderStateCollection self,
|
||||
Predicate<RenderStateCollection.Item> predicate)
|
||||
{
|
||||
var result = new RenderStateCollection();
|
||||
foreach (var item in self.Where(x => !predicate(x)))
|
||||
{
|
||||
result.Add(item.descriptor, item.fieldConditions);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static PragmaCollection RemoveIf(this PragmaCollection self,
|
||||
Predicate<PragmaCollection.Item> predicate)
|
||||
{
|
||||
var result = new PragmaCollection();
|
||||
foreach (var item in self.Where(x => !predicate(x)))
|
||||
{
|
||||
result.Add(item.descriptor, item.fieldConditions);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a boolean type keyword descriptor.
|
||||
/// </summary>
|
||||
public static KeywordCollection AddKeywordForUIEffect(this KeywordCollection self,
|
||||
string name, KeywordScope scope = KeywordScope.Local)
|
||||
{
|
||||
return self.Add(new KeywordDescriptor()
|
||||
{
|
||||
displayName = name,
|
||||
referenceName = name,
|
||||
type = KeywordType.Boolean,
|
||||
definition = KeywordDefinition.ShaderFeature,
|
||||
stages = KeywordShaderStage.Fragment,
|
||||
scope = scope
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an enum type keyword descriptor based on the fields of the UIEffectContext class.
|
||||
/// </summary>
|
||||
public static KeywordCollection AddKeywordForUIEffect(this KeywordCollection self,
|
||||
string name, string fieldName, KeywordScope scope = KeywordScope.Local)
|
||||
{
|
||||
var prefix = name + "_";
|
||||
var keywords = Type.GetType("Coffee.UIEffects.UIEffectContext, Coffee.UIEffect")
|
||||
.GetField(fieldName, BindingFlags.Static | BindingFlags.NonPublic)
|
||||
.GetValue(null) as string[];
|
||||
|
||||
return self.Add(new KeywordDescriptor()
|
||||
{
|
||||
displayName = name,
|
||||
referenceName = name,
|
||||
type = KeywordType.Enum,
|
||||
definition = KeywordDefinition.ShaderFeature,
|
||||
stages = KeywordShaderStage.Fragment,
|
||||
scope = scope,
|
||||
entries = keywords
|
||||
.Select(x => x.Replace(prefix, ""))
|
||||
.Select(x => new KeywordEntry(x, x))
|
||||
.ToArray()
|
||||
});
|
||||
}
|
||||
|
||||
public static void CreateGraphAsset(this Target self)
|
||||
{
|
||||
var name = $"New Shader Graph (UIEffect).{ShaderGraphImporter.Extension}";
|
||||
var graphItem = ScriptableObject.CreateInstance<NewGraphAction>();
|
||||
graphItem.targets = new[] { self };
|
||||
graphItem.blocks = new[]
|
||||
{
|
||||
BlockFields.SurfaceDescription.BaseColor,
|
||||
BlockFields.SurfaceDescription.Emission,
|
||||
BlockFields.SurfaceDescription.Alpha,
|
||||
BlockFields.SurfaceDescription.AlphaClipThreshold
|
||||
};
|
||||
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, graphItem, name, null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16d72000cb574468dbfa703ce763ab81
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
// ==== UIEFFECT START ====
|
||||
SurfaceDescriptionInputs _fragInput;
|
||||
half4 uieffect_frag(float2 uv)
|
||||
{
|
||||
float2 prevUv = _fragInput.uv0.xy;
|
||||
_fragInput.uv0.xy = uv;
|
||||
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(_fragInput);
|
||||
_fragInput.uv0.xy = prevUv;
|
||||
|
||||
half alpha = surfaceDescription.Alpha;
|
||||
return half4(surfaceDescription.BaseColor * alpha + surfaceDescription.Emission, alpha);
|
||||
}
|
||||
|
||||
#include "Packages/com.coffee.ui-effect/Shaders/UIEffect.cginc"
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
|
||||
PackedVaryings vert_override(Attributes input)
|
||||
{
|
||||
Varyings output = BuildVaryings(input);
|
||||
output.texCoord2 = input.uv1;
|
||||
PackedVaryings packedOutput = PackVaryings(output);
|
||||
return packedOutput;
|
||||
}
|
||||
|
||||
half4 frag_override(PackedVaryings packedInput) : SV_TARGET
|
||||
{
|
||||
Varyings unpacked = UnpackVaryings(packedInput);
|
||||
UNITY_SETUP_INSTANCE_ID(unpacked);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(unpacked);
|
||||
SurfaceDescriptionInputs surfaceDescriptionInputs = BuildSurfaceDescriptionInputs(unpacked);
|
||||
SurfaceDescription surfaceDescription = SurfaceDescriptionFunction(surfaceDescriptionInputs);
|
||||
|
||||
_fragInput = surfaceDescriptionInputs;
|
||||
const half4 origin = uieffect_frag(_fragInput.uv0.xy);
|
||||
half4 color = uieffect(origin, _fragInput.uv0.xy, unpacked.texCoord2, float4(unpacked.positionWS, 1));
|
||||
|
||||
//Round up the alpha color coming from the interpolator (to 1.0/256.0 steps)
|
||||
//The incoming alpha could have numerical instability, which makes it very sensible to
|
||||
//HDR color transparency blend, when it blends with the world's texture.
|
||||
const half alphaPrecision = half(0xff);
|
||||
const half invAlphaPrecision = half(1.0/alphaPrecision);
|
||||
unpacked.color.a = round(unpacked.color.a * alphaPrecision)*invAlphaPrecision;
|
||||
|
||||
#if !defined(HAVE_VFX_MODIFICATION) && !defined(_DISABLE_COLOR_TINT)
|
||||
color.rgb *= unpacked.color.rgb;
|
||||
color *= unpacked.color.a;
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
//mask = Uv2
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(unpacked.texCoord1.xy)) * unpacked.texCoord1.zw);
|
||||
color *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASKABLE
|
||||
color *= SoftMask(unpacked.positionCS, unpacked.positionWS, color.a);
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
|
||||
#if defined(_ALPHATEST_ON) || defined(_BUILTIN_ALPHATEST_ON)
|
||||
clip(color.a - surfaceDescription.AlphaClipThreshold);
|
||||
#endif
|
||||
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
clip(color.a - 0.001);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5109b2ad9b8be459592190a5678464e3
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
+169
@@ -0,0 +1,169 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4d5ba59106dc45b38c6ccdbff19e895
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 2
|
||||
wrapV: 2
|
||||
wrapW: 2
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+28601
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f02363c499e3488da5755c9b528ab9f
|
||||
PrefabImporter:
|
||||
guid: c31b8bd7d68a64b23b8c505bd7871154
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
+682
@@ -0,0 +1,682 @@
|
||||
{
|
||||
"m_SGVersion": 3,
|
||||
"m_Type": "UnityEditor.ShaderGraph.GraphData",
|
||||
"m_ObjectId": "59df17a6c3174a02826ef2b2f0b22bba",
|
||||
"m_Properties": [
|
||||
{
|
||||
"m_Id": "0edd83ed2c624ec1806581cf049b4102"
|
||||
}
|
||||
],
|
||||
"m_Keywords": [],
|
||||
"m_Dropdowns": [],
|
||||
"m_CategoryData": [
|
||||
{
|
||||
"m_Id": "8c8215c5d9714514b592e36aad9c148a"
|
||||
}
|
||||
],
|
||||
"m_Nodes": [
|
||||
{
|
||||
"m_Id": "f3b826553df24fdb9d14e4f1ef5504c8"
|
||||
},
|
||||
{
|
||||
"m_Id": "d326ef5f90af4c7996e7e0c915e57983"
|
||||
},
|
||||
{
|
||||
"m_Id": "7952abbfa5764abbae262f142a3a064b"
|
||||
},
|
||||
{
|
||||
"m_Id": "867db961355a4c1ea898b69d9e6549b0"
|
||||
},
|
||||
{
|
||||
"m_Id": "a76cdcf36ae243e5a5ea033c7d40d34f"
|
||||
},
|
||||
{
|
||||
"m_Id": "23e0b7c820e7452ab73c3bec44cf0e48"
|
||||
}
|
||||
],
|
||||
"m_GroupDatas": [],
|
||||
"m_StickyNoteDatas": [],
|
||||
"m_Edges": [
|
||||
{
|
||||
"m_OutputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "7952abbfa5764abbae262f142a3a064b"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
},
|
||||
"m_InputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "f3b826553df24fdb9d14e4f1ef5504c8"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"m_OutputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "7952abbfa5764abbae262f142a3a064b"
|
||||
},
|
||||
"m_SlotId": 7
|
||||
},
|
||||
"m_InputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "d326ef5f90af4c7996e7e0c915e57983"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"m_OutputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "867db961355a4c1ea898b69d9e6549b0"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
},
|
||||
"m_InputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "7952abbfa5764abbae262f142a3a064b"
|
||||
},
|
||||
"m_SlotId": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"m_VertexContext": {
|
||||
"m_Position": {
|
||||
"x": -0.000025510787963867188,
|
||||
"y": 82.99999237060547
|
||||
},
|
||||
"m_Blocks": []
|
||||
},
|
||||
"m_FragmentContext": {
|
||||
"m_Position": {
|
||||
"x": 0.0,
|
||||
"y": 200.0
|
||||
},
|
||||
"m_Blocks": [
|
||||
{
|
||||
"m_Id": "f3b826553df24fdb9d14e4f1ef5504c8"
|
||||
},
|
||||
{
|
||||
"m_Id": "d326ef5f90af4c7996e7e0c915e57983"
|
||||
},
|
||||
{
|
||||
"m_Id": "a76cdcf36ae243e5a5ea033c7d40d34f"
|
||||
},
|
||||
{
|
||||
"m_Id": "23e0b7c820e7452ab73c3bec44cf0e48"
|
||||
}
|
||||
]
|
||||
},
|
||||
"m_PreviewData": {
|
||||
"serializedMesh": {
|
||||
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"preventRotation": false
|
||||
},
|
||||
"m_Path": "Shader Graphs",
|
||||
"m_GraphPrecision": 1,
|
||||
"m_PreviewMode": 2,
|
||||
"m_OutputNode": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_SubDatas": [],
|
||||
"m_ActiveTargets": [
|
||||
{
|
||||
"m_Id": "1a195cdf4382437789224a92fedff5b1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty",
|
||||
"m_ObjectId": "0edd83ed2c624ec1806581cf049b4102",
|
||||
"m_Guid": {
|
||||
"m_GuidSerialized": "732edd04-59f7-47df-9432-7fe06165e57a"
|
||||
},
|
||||
"m_Name": "_MainTex",
|
||||
"m_DefaultRefNameVersion": 1,
|
||||
"m_RefNameGeneratedByDisplayName": "_MainTex",
|
||||
"m_DefaultReferenceName": "_MainTex",
|
||||
"m_OverrideReferenceName": "",
|
||||
"m_GeneratePropertyBlock": true,
|
||||
"m_UseCustomSlotLabel": false,
|
||||
"m_CustomSlotLabel": "",
|
||||
"m_DismissedVersion": 0,
|
||||
"m_Precision": 0,
|
||||
"overrideHLSLDeclaration": false,
|
||||
"hlslDeclarationOverride": 0,
|
||||
"m_Hidden": false,
|
||||
"m_Value": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"isMainTexture": false,
|
||||
"useTilingAndOffset": false,
|
||||
"m_Modifiable": true,
|
||||
"m_DefaultType": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 2,
|
||||
"m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInTarget",
|
||||
"m_ObjectId": "1a195cdf4382437789224a92fedff5b1",
|
||||
"m_Datas": [
|
||||
{
|
||||
"m_Id": "eeebd3b9f4ac47059504bc3a1119b400"
|
||||
}
|
||||
],
|
||||
"m_ActiveSubTarget": {
|
||||
"m_Id": "7ead57ce3c34462b9abc55f1c840545b"
|
||||
},
|
||||
"m_AllowMaterialOverride": false,
|
||||
"m_SurfaceType": 0,
|
||||
"m_ZWriteControl": 0,
|
||||
"m_ZTestMode": 4,
|
||||
"m_AlphaMode": 0,
|
||||
"m_RenderFace": 2,
|
||||
"m_AlphaClip": true,
|
||||
"m_CustomEditorGUI": ""
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "23e0b7c820e7452ab73c3bec44cf0e48",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.AlphaClipThreshold",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "3c6f2af22741431faed8a2606630029a"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "3c6f2af22741431faed8a2606630029a",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Alpha Clip Threshold",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "AlphaClipThreshold",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.009999999776482582,
|
||||
"m_DefaultValue": 0.5,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
|
||||
"m_ObjectId": "5891f1777feb46cdbd85b489f87bfc69",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Emission",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Emission",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_Labels": [],
|
||||
"m_ColorMode": 1,
|
||||
"m_DefaultColor": {
|
||||
"r": 0.0,
|
||||
"g": 0.0,
|
||||
"b": 0.0,
|
||||
"a": 1.0
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot",
|
||||
"m_ObjectId": "5b370c6775e1485c8289267723a78b11",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "_MainTex",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Out",
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "68a8b951fcb8489891abfbfcc34a120e",
|
||||
"m_Id": 4,
|
||||
"m_DisplayName": "R",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "R",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot",
|
||||
"m_ObjectId": "7639b4a17a334399a9f421cd50b7cfdb",
|
||||
"m_Id": 2,
|
||||
"m_DisplayName": "UV",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "UV",
|
||||
"m_StageCapability": 3,
|
||||
"m_Value": {
|
||||
"x": 0.0,
|
||||
"y": 0.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.0,
|
||||
"y": 0.0
|
||||
},
|
||||
"m_Labels": [],
|
||||
"m_Channel": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
|
||||
"m_ObjectId": "78db00f49dfe4fa2b4369e32ebf28ec5",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "RGBA",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "RGBA",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"w": 0.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"w": 0.0
|
||||
},
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode",
|
||||
"m_ObjectId": "7952abbfa5764abbae262f142a3a064b",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "Sample Texture 2D",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": -274.0000305175781,
|
||||
"y": 160.99998474121095,
|
||||
"width": 183.00001525878907,
|
||||
"height": 250.99998474121095
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "78db00f49dfe4fa2b4369e32ebf28ec5"
|
||||
},
|
||||
{
|
||||
"m_Id": "68a8b951fcb8489891abfbfcc34a120e"
|
||||
},
|
||||
{
|
||||
"m_Id": "a35c97e796354191a56cab4ebc1b0c97"
|
||||
},
|
||||
{
|
||||
"m_Id": "9015c4f761784b57a17877f114771c6d"
|
||||
},
|
||||
{
|
||||
"m_Id": "efc06576e366411a9dbb3c5e5c3e6dc1"
|
||||
},
|
||||
{
|
||||
"m_Id": "d54d1ad0bcdf4b60a51da4f977c899e2"
|
||||
},
|
||||
{
|
||||
"m_Id": "7639b4a17a334399a9f421cd50b7cfdb"
|
||||
},
|
||||
{
|
||||
"m_Id": "e9a96a370b654f49bdaede33b9c5364c"
|
||||
}
|
||||
],
|
||||
"synonyms": [
|
||||
"tex2d"
|
||||
],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": false,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_TextureType": 0,
|
||||
"m_NormalMapSpace": 0,
|
||||
"m_EnableGlobalMipBias": true,
|
||||
"m_MipSamplingMode": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInUIEffectSubTarget",
|
||||
"m_ObjectId": "7ead57ce3c34462b9abc55f1c840545b"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
|
||||
"m_ObjectId": "867db961355a4c1ea898b69d9e6549b0",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "Property",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": -418.0,
|
||||
"y": 183.0,
|
||||
"width": 132.0,
|
||||
"height": 33.99998474121094
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "5b370c6775e1485c8289267723a78b11"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_Property": {
|
||||
"m_Id": "0edd83ed2c624ec1806581cf049b4102"
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
|
||||
"m_ObjectId": "8c8215c5d9714514b592e36aad9c148a",
|
||||
"m_Name": "",
|
||||
"m_ChildObjectList": [
|
||||
{
|
||||
"m_Id": "0edd83ed2c624ec1806581cf049b4102"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "9015c4f761784b57a17877f114771c6d",
|
||||
"m_Id": 6,
|
||||
"m_DisplayName": "B",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "B",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "92eee3a578d042e1b3d5449bc1deba68",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Alpha",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Alpha",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 1.0,
|
||||
"m_DefaultValue": 1.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "a35c97e796354191a56cab4ebc1b0c97",
|
||||
"m_Id": 5,
|
||||
"m_DisplayName": "G",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "G",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "a76cdcf36ae243e5a5ea033c7d40d34f",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Emission",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "5891f1777feb46cdbd85b489f87bfc69"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Emission"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
|
||||
"m_ObjectId": "bba29a5fc85343b2964b3e4b5a62d0bf",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Base Color",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "BaseColor",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": {
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 0.5
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 0.5
|
||||
},
|
||||
"m_Labels": [],
|
||||
"m_ColorMode": 0,
|
||||
"m_DefaultColor": {
|
||||
"r": 0.5,
|
||||
"g": 0.5,
|
||||
"b": 0.5,
|
||||
"a": 1.0
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "d326ef5f90af4c7996e7e0c915e57983",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Alpha",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 12.99997329711914,
|
||||
"y": 270.0,
|
||||
"width": 200.00001525878907,
|
||||
"height": 41.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "92eee3a578d042e1b3d5449bc1deba68"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Alpha"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot",
|
||||
"m_ObjectId": "d54d1ad0bcdf4b60a51da4f977c899e2",
|
||||
"m_Id": 1,
|
||||
"m_DisplayName": "Texture",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Texture",
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot",
|
||||
"m_ObjectId": "e9a96a370b654f49bdaede33b9c5364c",
|
||||
"m_Id": 3,
|
||||
"m_DisplayName": "Sampler",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Sampler",
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.Canvas.ShaderGraph.CanvasData",
|
||||
"m_ObjectId": "eeebd3b9f4ac47059504bc3a1119b400",
|
||||
"m_Version": 0,
|
||||
"m_AlphaClip": false,
|
||||
"m_DisableTint": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "efc06576e366411a9dbb3c5e5c3e6dc1",
|
||||
"m_Id": 7,
|
||||
"m_DisplayName": "A",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "A",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "f3b826553df24fdb9d14e4f1ef5504c8",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.BaseColor",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "bba29a5fc85343b2964b3e4b5a62d0bf"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.BaseColor"
|
||||
}
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5b632cdcfc38478ebc1424ae9371f99
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData: v5.8.0
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"reference": "GUID:be0903cd8e1546f498710afdc59db5eb"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f789ebf4d79649a99ce55c22b322e8b
|
||||
AssemblyDefinitionReferenceImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
+169
@@ -0,0 +1,169 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f1058d436da64dd790d7c6db345a6b8
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 2
|
||||
wrapV: 2
|
||||
wrapW: 2
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+28547
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b09ad143990c4c8795c6e93760e132a
|
||||
PrefabImporter:
|
||||
guid: 9d5fb70c6201e408ebe2e8941a0e5944
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
+729
@@ -0,0 +1,729 @@
|
||||
{
|
||||
"m_SGVersion": 3,
|
||||
"m_Type": "UnityEditor.ShaderGraph.GraphData",
|
||||
"m_ObjectId": "59df17a6c3174a02826ef2b2f0b22bba",
|
||||
"m_Properties": [
|
||||
{
|
||||
"m_Id": "0edd83ed2c624ec1806581cf049b4102"
|
||||
}
|
||||
],
|
||||
"m_Keywords": [],
|
||||
"m_Dropdowns": [],
|
||||
"m_CategoryData": [
|
||||
{
|
||||
"m_Id": "8c8215c5d9714514b592e36aad9c148a"
|
||||
}
|
||||
],
|
||||
"m_Nodes": [
|
||||
{
|
||||
"m_Id": "f3b826553df24fdb9d14e4f1ef5504c8"
|
||||
},
|
||||
{
|
||||
"m_Id": "c2a8615bb6ed48bfa85d0d3671740b5e"
|
||||
},
|
||||
{
|
||||
"m_Id": "d326ef5f90af4c7996e7e0c915e57983"
|
||||
},
|
||||
{
|
||||
"m_Id": "18361f77ae274f2598be88dcaae100de"
|
||||
},
|
||||
{
|
||||
"m_Id": "7952abbfa5764abbae262f142a3a064b"
|
||||
},
|
||||
{
|
||||
"m_Id": "867db961355a4c1ea898b69d9e6549b0"
|
||||
}
|
||||
],
|
||||
"m_GroupDatas": [],
|
||||
"m_StickyNoteDatas": [],
|
||||
"m_Edges": [
|
||||
{
|
||||
"m_OutputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "7952abbfa5764abbae262f142a3a064b"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
},
|
||||
"m_InputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "f3b826553df24fdb9d14e4f1ef5504c8"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"m_OutputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "7952abbfa5764abbae262f142a3a064b"
|
||||
},
|
||||
"m_SlotId": 7
|
||||
},
|
||||
"m_InputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "d326ef5f90af4c7996e7e0c915e57983"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"m_OutputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "867db961355a4c1ea898b69d9e6549b0"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
},
|
||||
"m_InputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "7952abbfa5764abbae262f142a3a064b"
|
||||
},
|
||||
"m_SlotId": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"m_VertexContext": {
|
||||
"m_Position": {
|
||||
"x": -0.000025510787963867188,
|
||||
"y": 82.99999237060547
|
||||
},
|
||||
"m_Blocks": []
|
||||
},
|
||||
"m_FragmentContext": {
|
||||
"m_Position": {
|
||||
"x": 0.0,
|
||||
"y": 200.0
|
||||
},
|
||||
"m_Blocks": [
|
||||
{
|
||||
"m_Id": "f3b826553df24fdb9d14e4f1ef5504c8"
|
||||
},
|
||||
{
|
||||
"m_Id": "d326ef5f90af4c7996e7e0c915e57983"
|
||||
},
|
||||
{
|
||||
"m_Id": "c2a8615bb6ed48bfa85d0d3671740b5e"
|
||||
},
|
||||
{
|
||||
"m_Id": "18361f77ae274f2598be88dcaae100de"
|
||||
}
|
||||
]
|
||||
},
|
||||
"m_PreviewData": {
|
||||
"serializedMesh": {
|
||||
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"preventRotation": false
|
||||
},
|
||||
"m_Path": "Shader Graphs",
|
||||
"m_GraphPrecision": 1,
|
||||
"m_PreviewMode": 2,
|
||||
"m_OutputNode": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_SubDatas": [],
|
||||
"m_ActiveTargets": [
|
||||
{
|
||||
"m_Id": "1a195cdf4382437789224a92fedff5b1"
|
||||
},
|
||||
{
|
||||
"m_Id": "22af5ae5df2343a48eab120f592090a0"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty",
|
||||
"m_ObjectId": "0edd83ed2c624ec1806581cf049b4102",
|
||||
"m_Guid": {
|
||||
"m_GuidSerialized": "732edd04-59f7-47df-9432-7fe06165e57a"
|
||||
},
|
||||
"m_Name": "_MainTex",
|
||||
"m_DefaultRefNameVersion": 1,
|
||||
"m_RefNameGeneratedByDisplayName": "_MainTex",
|
||||
"m_DefaultReferenceName": "_MainTex",
|
||||
"m_OverrideReferenceName": "",
|
||||
"m_GeneratePropertyBlock": true,
|
||||
"m_UseCustomSlotLabel": false,
|
||||
"m_CustomSlotLabel": "",
|
||||
"m_DismissedVersion": 0,
|
||||
"m_Precision": 0,
|
||||
"overrideHLSLDeclaration": false,
|
||||
"hlslDeclarationOverride": 0,
|
||||
"m_Hidden": false,
|
||||
"m_Value": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"isMainTexture": false,
|
||||
"useTilingAndOffset": false,
|
||||
"m_Modifiable": true,
|
||||
"m_DefaultType": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "18361f77ae274f2598be88dcaae100de",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.AlphaClipThreshold",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "4ae12b62cdd7491ea48ecd15c123692d"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 2,
|
||||
"m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInTarget",
|
||||
"m_ObjectId": "1a195cdf4382437789224a92fedff5b1",
|
||||
"m_Datas": [
|
||||
{
|
||||
"m_Id": "f39f3f444a8a4c7593cfa9d3958d6adb"
|
||||
}
|
||||
],
|
||||
"m_ActiveSubTarget": {
|
||||
"m_Id": "80f8f8e7c44e42c8b6eca7510eeee828"
|
||||
},
|
||||
"m_AllowMaterialOverride": false,
|
||||
"m_SurfaceType": 0,
|
||||
"m_ZWriteControl": 0,
|
||||
"m_ZTestMode": 4,
|
||||
"m_AlphaMode": 0,
|
||||
"m_RenderFace": 2,
|
||||
"m_AlphaClip": true,
|
||||
"m_CustomEditorGUI": ""
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 1,
|
||||
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget",
|
||||
"m_ObjectId": "22af5ae5df2343a48eab120f592090a0",
|
||||
"m_Datas": [
|
||||
{
|
||||
"m_Id": "e8d949ab75d949a48b225e87bac14000"
|
||||
}
|
||||
],
|
||||
"m_ActiveSubTarget": {
|
||||
"m_Id": "ccc35450f1194a7794f124787f7223de"
|
||||
},
|
||||
"m_AllowMaterialOverride": false,
|
||||
"m_SurfaceType": 0,
|
||||
"m_ZTestMode": 4,
|
||||
"m_ZWriteControl": 0,
|
||||
"m_AlphaMode": 0,
|
||||
"m_RenderFace": 2,
|
||||
"m_AlphaClip": false,
|
||||
"m_CastShadows": true,
|
||||
"m_ReceiveShadows": true,
|
||||
"m_DisableTint": false,
|
||||
"m_AdditionalMotionVectorMode": 0,
|
||||
"m_AlembicMotionVectors": false,
|
||||
"m_SupportsLODCrossFade": false,
|
||||
"m_CustomEditorGUI": "",
|
||||
"m_SupportVFX": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "4ae12b62cdd7491ea48ecd15c123692d",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Alpha Clip Threshold",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "AlphaClipThreshold",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.009999999776482582,
|
||||
"m_DefaultValue": 0.5,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot",
|
||||
"m_ObjectId": "5b370c6775e1485c8289267723a78b11",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "_MainTex",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Out",
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "68a8b951fcb8489891abfbfcc34a120e",
|
||||
"m_Id": 4,
|
||||
"m_DisplayName": "R",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "R",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot",
|
||||
"m_ObjectId": "7639b4a17a334399a9f421cd50b7cfdb",
|
||||
"m_Id": 2,
|
||||
"m_DisplayName": "UV",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "UV",
|
||||
"m_StageCapability": 3,
|
||||
"m_Value": {
|
||||
"x": 0.0,
|
||||
"y": 0.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.0,
|
||||
"y": 0.0
|
||||
},
|
||||
"m_Labels": [],
|
||||
"m_Channel": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
|
||||
"m_ObjectId": "78db00f49dfe4fa2b4369e32ebf28ec5",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "RGBA",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "RGBA",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"w": 0.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"w": 0.0
|
||||
},
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode",
|
||||
"m_ObjectId": "7952abbfa5764abbae262f142a3a064b",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "Sample Texture 2D",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": -274.0000305175781,
|
||||
"y": 160.99998474121095,
|
||||
"width": 183.00001525878907,
|
||||
"height": 250.99998474121095
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "78db00f49dfe4fa2b4369e32ebf28ec5"
|
||||
},
|
||||
{
|
||||
"m_Id": "68a8b951fcb8489891abfbfcc34a120e"
|
||||
},
|
||||
{
|
||||
"m_Id": "a35c97e796354191a56cab4ebc1b0c97"
|
||||
},
|
||||
{
|
||||
"m_Id": "9015c4f761784b57a17877f114771c6d"
|
||||
},
|
||||
{
|
||||
"m_Id": "efc06576e366411a9dbb3c5e5c3e6dc1"
|
||||
},
|
||||
{
|
||||
"m_Id": "d54d1ad0bcdf4b60a51da4f977c899e2"
|
||||
},
|
||||
{
|
||||
"m_Id": "7639b4a17a334399a9f421cd50b7cfdb"
|
||||
},
|
||||
{
|
||||
"m_Id": "e9a96a370b654f49bdaede33b9c5364c"
|
||||
}
|
||||
],
|
||||
"synonyms": [
|
||||
"tex2d"
|
||||
],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": false,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_TextureType": 0,
|
||||
"m_NormalMapSpace": 0,
|
||||
"m_EnableGlobalMipBias": true,
|
||||
"m_MipSamplingMode": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInUIEffectSubTarget",
|
||||
"m_ObjectId": "80f8f8e7c44e42c8b6eca7510eeee828"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
|
||||
"m_ObjectId": "867db961355a4c1ea898b69d9e6549b0",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "Property",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": -418.0,
|
||||
"y": 183.0,
|
||||
"width": 132.0,
|
||||
"height": 33.99998474121094
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "5b370c6775e1485c8289267723a78b11"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_Property": {
|
||||
"m_Id": "0edd83ed2c624ec1806581cf049b4102"
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
|
||||
"m_ObjectId": "8c8215c5d9714514b592e36aad9c148a",
|
||||
"m_Name": "",
|
||||
"m_ChildObjectList": [
|
||||
{
|
||||
"m_Id": "0edd83ed2c624ec1806581cf049b4102"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "9015c4f761784b57a17877f114771c6d",
|
||||
"m_Id": 6,
|
||||
"m_DisplayName": "B",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "B",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "92eee3a578d042e1b3d5449bc1deba68",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Alpha",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Alpha",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 1.0,
|
||||
"m_DefaultValue": 1.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "a35c97e796354191a56cab4ebc1b0c97",
|
||||
"m_Id": 5,
|
||||
"m_DisplayName": "G",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "G",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
|
||||
"m_ObjectId": "bba29a5fc85343b2964b3e4b5a62d0bf",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Base Color",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "BaseColor",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": {
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 0.5
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 0.5
|
||||
},
|
||||
"m_Labels": [],
|
||||
"m_ColorMode": 0,
|
||||
"m_DefaultColor": {
|
||||
"r": 0.5,
|
||||
"g": 0.5,
|
||||
"b": 0.5,
|
||||
"a": 1.0
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "c2a8615bb6ed48bfa85d0d3671740b5e",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Emission",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "f9b4659b58e548b795c4f84d6c2d0e37"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Emission"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUIEffectSubTarget",
|
||||
"m_ObjectId": "ccc35450f1194a7794f124787f7223de"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "d326ef5f90af4c7996e7e0c915e57983",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Alpha",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 12.99997329711914,
|
||||
"y": 270.0,
|
||||
"width": 200.00001525878907,
|
||||
"height": 41.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "92eee3a578d042e1b3d5449bc1deba68"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Alpha"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot",
|
||||
"m_ObjectId": "d54d1ad0bcdf4b60a51da4f977c899e2",
|
||||
"m_Id": 1,
|
||||
"m_DisplayName": "Texture",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Texture",
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false,
|
||||
"m_Texture": {
|
||||
"m_SerializedTexture": "",
|
||||
"m_Guid": ""
|
||||
},
|
||||
"m_DefaultType": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.Canvas.ShaderGraph.CanvasData",
|
||||
"m_ObjectId": "e8d949ab75d949a48b225e87bac14000",
|
||||
"m_Version": 0,
|
||||
"m_AlphaClip": true,
|
||||
"m_DisableTint": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot",
|
||||
"m_ObjectId": "e9a96a370b654f49bdaede33b9c5364c",
|
||||
"m_Id": 3,
|
||||
"m_DisplayName": "Sampler",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Sampler",
|
||||
"m_StageCapability": 3,
|
||||
"m_BareResource": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "efc06576e366411a9dbb3c5e5c3e6dc1",
|
||||
"m_Id": 7,
|
||||
"m_DisplayName": "A",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "A",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.Canvas.ShaderGraph.CanvasData",
|
||||
"m_ObjectId": "f39f3f444a8a4c7593cfa9d3958d6adb",
|
||||
"m_Version": 0,
|
||||
"m_AlphaClip": false,
|
||||
"m_DisableTint": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "f3b826553df24fdb9d14e4f1ef5504c8",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.BaseColor",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "bba29a5fc85343b2964b3e4b5a62d0bf"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.BaseColor"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
|
||||
"m_ObjectId": "f9b4659b58e548b795c4f84d6c2d0e37",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Emission",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Emission",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_Labels": [],
|
||||
"m_ColorMode": 1,
|
||||
"m_DefaultColor": {
|
||||
"r": 0.0,
|
||||
"g": 0.0,
|
||||
"b": 0.0,
|
||||
"a": 1.0
|
||||
}
|
||||
}
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4b99d7494b704b7c885015e0153163b
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData: v5.8.0
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"reference": "GUID:c579267770062bf448e75eb160330b7f"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b7a7eb5bb5ed49dcaf7965481fa019d
|
||||
AssemblyDefinitionReferenceImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using UnityEditor.Rendering.BuiltIn.ShaderGraph;
|
||||
using UnityEditor.ShaderGraph;
|
||||
|
||||
namespace UnityEditor.Rendering.Universal.ShaderGraph
|
||||
{
|
||||
internal class UniversalUIEffectSubTarget : UniversalCanvasSubTarget
|
||||
{
|
||||
[MenuItem("Assets/Create/Shader Graph/URP/Canvas Shader Graph (UIEffect)", priority = 1000)]
|
||||
private static void CreateUnlitGraph()
|
||||
{
|
||||
var target = (UniversalTarget)Activator.CreateInstance(typeof(UniversalTarget));
|
||||
target.TrySetActiveSubTarget(typeof(BuiltInUIEffectSubTarget));
|
||||
target.TrySetActiveSubTarget(typeof(UniversalUIEffectSubTarget));
|
||||
target.CreateGraphAsset();
|
||||
}
|
||||
|
||||
public UniversalUIEffectSubTarget() { displayName = "Canvas (UIEffect)"; }
|
||||
|
||||
protected override IncludeCollection postgraphIncludes => base.postgraphIncludes
|
||||
.Add(BuiltInUIEffectSubTarget.s_UIEffectHlsl, IncludeLocation.Postgraph);
|
||||
|
||||
public override PassDescriptor GenerateUIPassDescriptor(bool isSRP)
|
||||
{
|
||||
return BuiltInUIEffectSubTarget.ModifyUIPassDescriptor(base.GenerateUIPassDescriptor(isSRP));
|
||||
}
|
||||
|
||||
public override void CollectShaderProperties(PropertyCollector collector, GenerationMode generationMode)
|
||||
{
|
||||
base.CollectShaderProperties(collector, generationMode);
|
||||
BuiltInUIEffectSubTarget.ModifyShaderProperties(collector);
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e428a82723f244e77b64d08fd256159d
|
||||
+11
-21
@@ -59,19 +59,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -87,7 +86,7 @@ SubShader {
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -100,13 +99,8 @@ SubShader {
|
||||
float4 mask : TEXCOORD2;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD3;
|
||||
float2 uvLocal : TEXCOORD4;
|
||||
float4 worldPosition : TEXCOORD4;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD5;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
@@ -149,14 +143,9 @@ SubShader {
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
OUT.uvLocal = v.texcoord1.zw;
|
||||
OUT.uvMask = v.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
OUT.worldPosition = v.vertex;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return OUT;
|
||||
}
|
||||
@@ -167,7 +156,7 @@ SubShader {
|
||||
{
|
||||
v2f IN = _fragInput;
|
||||
float2 uvMove = uv - IN.texcoord0;
|
||||
fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0 + uvMove).a);
|
||||
fixed4 color = fixed4(IN.color.rgb, tex2D(_MainTex, IN.texcoord0 + uvMove).a);
|
||||
color.rgb *= color.a;
|
||||
return color;
|
||||
}
|
||||
@@ -178,7 +167,8 @@ SubShader {
|
||||
fixed4 frag (v2f IN) : COLOR
|
||||
{
|
||||
_fragInput = IN;
|
||||
half4 color = uieffect(_fragInput.texcoord0, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
half4 color = uieffect(IN.texcoord0, IN.uvMask, IN.worldPosition);
|
||||
color *= IN.color.a;
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0 (Unity 6)
|
||||
userData: v5.8.0 (Unity 6)
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
+11
-21
@@ -58,19 +58,18 @@ SubShader{
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -86,7 +85,7 @@ SubShader{
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -100,13 +99,8 @@ SubShader{
|
||||
float4 mask : TEXCOORD2;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD3;
|
||||
float2 uvLocal : TEXCOORD4;
|
||||
float4 worldPosition : TEXCOORD4;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD5;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
uniform sampler2D _MainTex;
|
||||
@@ -154,14 +148,9 @@ SubShader{
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
OUT.uvLocal = v.texcoord1.zw;
|
||||
OUT.uvMask = v.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
OUT.worldPosition = v.vertex;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return OUT;
|
||||
}
|
||||
@@ -173,7 +162,7 @@ SubShader{
|
||||
v2f IN = _fragInput;
|
||||
float2 uvMove = uv - IN.texcoord0;
|
||||
fixed4 color = tex2D(_MainTex, IN.texcoord0 + uvMove);
|
||||
color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a);
|
||||
color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, color.a);
|
||||
color.rgb *= color.a;
|
||||
return color;
|
||||
}
|
||||
@@ -184,7 +173,8 @@ SubShader{
|
||||
fixed4 frag (v2f IN) : SV_Target
|
||||
{
|
||||
_fragInput = IN;
|
||||
half4 color = uieffect(_fragInput.texcoord0, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
half4 color = uieffect(IN.texcoord0, IN.uvMask, IN.worldPosition);
|
||||
color *= IN.color.a;
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0 (Unity 6)
|
||||
userData: v5.8.0 (Unity 6)
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
+11
-21
@@ -128,19 +128,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -160,7 +159,7 @@ SubShader {
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -183,13 +182,8 @@ SubShader {
|
||||
float4 textures : TEXCOORD5;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD6;
|
||||
float2 uvLocal : TEXCOORD7;
|
||||
float4 worldPosition : TEXCOORD7;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD8;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
// Used by Unity internally to handle Texture Tiling and Offset.
|
||||
@@ -276,14 +270,9 @@ SubShader {
|
||||
output.textures = float4(faceUV, outlineUV);
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
output.uvLocal = input.texcoord1.zw;
|
||||
output.uvMask = input.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
output.worldPosition = input.position;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -352,7 +341,7 @@ SubShader {
|
||||
faceColor.rgb += glowColor.rgb * glowColor.a;
|
||||
#endif
|
||||
|
||||
return faceColor * input.color.a;
|
||||
return faceColor;
|
||||
}
|
||||
|
||||
#define UIEFFECT_TEXTMESHPRO 1
|
||||
@@ -363,7 +352,8 @@ SubShader {
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
_fragInput = input;
|
||||
half4 faceColor = uieffect(_fragInput.atlas, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
half4 faceColor = uieffect(input.atlas, input.uvMask, input.worldPosition);
|
||||
faceColor *= input.color.a;
|
||||
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0 (Unity 6)
|
||||
userData: v5.8.0 (Unity 6)
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
+11
-21
@@ -129,19 +129,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -161,7 +160,7 @@ SubShader {
|
||||
float4 color : COLOR;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -185,13 +184,8 @@ SubShader {
|
||||
float4 textures : TEXCOORD5;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD6;
|
||||
float2 uvLocal : TEXCOORD7;
|
||||
float4 worldPosition : TEXCOORD7;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD8;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
// Used by Unity internally to handle Texture Tiling and Offset.
|
||||
@@ -265,14 +259,9 @@ SubShader {
|
||||
output.textures = float4(faceUV, outlineUV);
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
output.uvLocal = input.texcoord1.zw;
|
||||
output.uvMask = input.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
output.worldPosition = input.position;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -346,7 +335,7 @@ SubShader {
|
||||
faceColor.rgb += glowColor.rgb * glowColor.a;
|
||||
#endif
|
||||
|
||||
return faceColor * input.color.a;
|
||||
return faceColor;
|
||||
}
|
||||
|
||||
|
||||
@@ -358,7 +347,8 @@ SubShader {
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
_fragInput = input;
|
||||
half4 faceColor = uieffect(_fragInput.atlas, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
half4 faceColor = uieffect(input.atlas, input.uvMask, input.worldPosition);
|
||||
faceColor *= input.color.a;
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0 (Unity 6)
|
||||
userData: v5.8.0 (Unity 6)
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
+16
-24
@@ -90,19 +90,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -121,7 +120,7 @@ SubShader {
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -143,13 +142,9 @@ SubShader {
|
||||
#endif
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD5;
|
||||
float2 uvLocal : TEXCOORD6;
|
||||
float4 worldPosition : TEXCOORD6;
|
||||
fixed alpha : TEXCOORD7;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD7;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
float _UIMaskSoftnessX;
|
||||
@@ -192,17 +187,17 @@ SubShader {
|
||||
{
|
||||
input.color.rgb = UIGammaToLinear(input.color.rgb);
|
||||
}
|
||||
float opacity = input.color.a;
|
||||
float opacity = 1;
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
opacity = 1.0;
|
||||
#endif
|
||||
|
||||
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
|
||||
// faceColor.rgb *= faceColor.a;
|
||||
faceColor.rgb *= faceColor.a;
|
||||
|
||||
fixed4 outlineColor = _OutlineColor;
|
||||
outlineColor.a *= opacity;
|
||||
// outlineColor.rgb *= outlineColor.a;
|
||||
outlineColor.rgb *= outlineColor.a;
|
||||
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
@@ -227,19 +222,15 @@ SubShader {
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
|
||||
output.texcoord1 = float4(input.texcoord0 + layerOffset, 1, 0);
|
||||
output.underlayParam = half2(layerScale, layerBias);
|
||||
#endif
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
output.uvLocal = input.texcoord1.zw;
|
||||
output.uvMask = input.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
output.worldPosition = input.vertex;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
output.alpha = input.color.a;
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -284,7 +275,8 @@ SubShader {
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
_fragInput = input;
|
||||
half4 c = uieffect(_fragInput.texcoord0.xy, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
half4 c = uieffect(input.texcoord0.xy, input.uvMask, input.worldPosition);
|
||||
c *= input.alpha;
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0 (Unity 6)
|
||||
userData: v5.8.0 (Unity 6)
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
+14
-22
@@ -93,19 +93,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -123,7 +122,7 @@ SubShader {
|
||||
float4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -143,13 +142,9 @@ SubShader {
|
||||
#endif
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD4;
|
||||
float2 uvLocal : TEXCOORD5;
|
||||
float4 worldPosition : TEXCOORD5;
|
||||
fixed alpha : TEXCOORD6;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD6;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
float _UIMaskSoftnessX;
|
||||
@@ -188,7 +183,7 @@ SubShader {
|
||||
color = SRGBToLinear(input.color);
|
||||
#endif
|
||||
|
||||
float opacity = color.a;
|
||||
float opacity = 1;
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
opacity = 1.0;
|
||||
#endif
|
||||
@@ -219,19 +214,15 @@ SubShader {
|
||||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
|
||||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
|
||||
|
||||
output.texcoord2 = float4(input.texcoord0 + float2(x, y), input.color.a, 0);
|
||||
output.texcoord2 = float4(input.texcoord0 + float2(x, y), 1, 0);
|
||||
output.underlayColor = underlayColor;
|
||||
#endif
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
output.uvLocal = input.texcoord1.zw;
|
||||
output.uvMask = input.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
output.worldPosition = input.position;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
output.alpha = input.color.a;
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -298,7 +289,8 @@ SubShader {
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
_fragInput = input;
|
||||
half4 faceColor = uieffect(_fragInput.texcoord0, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
half4 faceColor = uieffect(input.texcoord0, input.uvMask, input.worldPosition);
|
||||
faceColor *= input.alpha;
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0 (Unity 6)
|
||||
userData: v5.8.0 (Unity 6)
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
+17
-25
@@ -91,19 +91,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -121,7 +120,7 @@ SubShader {
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -141,13 +140,9 @@ SubShader {
|
||||
#endif
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD5;
|
||||
float2 uvLocal : TEXCOORD6;
|
||||
float4 worldPosition : TEXCOORD6;
|
||||
fixed alpha : TEXCOORD7;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD7;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
float _UIMaskSoftnessX;
|
||||
@@ -190,17 +185,17 @@ SubShader {
|
||||
{
|
||||
input.color.rgb = UIGammaToLinear(input.color.rgb);
|
||||
}
|
||||
float opacity = input.color.a;
|
||||
float opacity = 1;
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
opacity = 1.0;
|
||||
#endif
|
||||
|
||||
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
|
||||
//faceColor.rgb *= faceColor.a;
|
||||
faceColor.rgb *= faceColor.a;
|
||||
|
||||
fixed4 outlineColor = _OutlineColor;
|
||||
outlineColor.a *= opacity;
|
||||
//outlineColor.rgb *= outlineColor.a;
|
||||
outlineColor.rgb *= outlineColor.a;
|
||||
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
@@ -226,19 +221,15 @@ SubShader {
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
|
||||
output.texcoord1 = float4(input.texcoord0 + layerOffset, 1, 0);
|
||||
output.underlayParam = half2(layerScale, layerBias);
|
||||
#endif
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
output.uvLocal = input.texcoord1.zw;
|
||||
output.uvMask = input.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
output.worldPosition = input.vertex;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
output.alpha = input.color.a;
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -285,8 +276,9 @@ SubShader {
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
_fragInput = input;
|
||||
half4 c = uieffect(_fragInput.texcoord0.xy, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
|
||||
half4 c = uieffect(input.texcoord0.xy, input.uvMask, input.worldPosition);
|
||||
c *= input.alpha;
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0 (Unity 6)
|
||||
userData: v5.8.0 (Unity 6)
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
+12
-22
@@ -128,19 +128,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -160,7 +159,7 @@ SubShader {
|
||||
fixed4 color : COLOR;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -184,13 +183,8 @@ SubShader {
|
||||
float4 textures : TEXCOORD5;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD6;
|
||||
float2 uvLocal : TEXCOORD7;
|
||||
float4 worldPosition : TEXCOORD7;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD8;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
// Used by Unity internally to handle Texture Tiling and Offset.
|
||||
@@ -277,14 +271,9 @@ SubShader {
|
||||
output.textures = float4(faceUV, outlineUV);
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
output.uvLocal = input.texcoord1.zw;
|
||||
output.uvMask = input.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
output.worldPosition = input.position;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -354,7 +343,7 @@ SubShader {
|
||||
faceColor.rgb += glowColor.rgb * glowColor.a;
|
||||
#endif
|
||||
|
||||
return faceColor * input.color.a;
|
||||
return faceColor;
|
||||
}
|
||||
#define UIEFFECT_TEXTMESHPRO 1
|
||||
#include "Packages/com.coffee.ui-effect/Shaders/UIEffect.cginc"
|
||||
@@ -364,8 +353,9 @@ SubShader {
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
_fragInput = input;
|
||||
half4 faceColor = uieffect(_fragInput.atlas, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
|
||||
half4 faceColor = uieffect(input.atlas, input.uvMask, input.worldPosition);
|
||||
faceColor *= input.color.a;
|
||||
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||
faceColor *= m.x * m.y;
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0 (Unity 6)
|
||||
userData: v5.8.0 (Unity 6)
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
+11
-21
@@ -59,19 +59,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -85,7 +84,7 @@ SubShader {
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -97,13 +96,8 @@ SubShader {
|
||||
float4 mask : TEXCOORD2;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD3;
|
||||
float2 uvLocal : TEXCOORD4;
|
||||
float4 worldPosition : TEXCOORD4;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD5;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
@@ -142,14 +136,9 @@ SubShader {
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
OUT.uvLocal = v.texcoord1.zw;
|
||||
OUT.uvMask = v.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
OUT.worldPosition = v.vertex;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return OUT;
|
||||
}
|
||||
@@ -160,7 +149,7 @@ SubShader {
|
||||
{
|
||||
v2f IN = _fragInput;
|
||||
float2 uvMove = uv - IN.texcoord0;
|
||||
fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0 + uvMove).a);
|
||||
fixed4 color = fixed4(IN.color.rgb, tex2D(_MainTex, IN.texcoord0 + uvMove).a);
|
||||
color.rgb *= color.a;
|
||||
return color;
|
||||
}
|
||||
@@ -172,7 +161,8 @@ SubShader {
|
||||
fixed4 frag (v2f IN) : COLOR
|
||||
{
|
||||
_fragInput = IN;
|
||||
fixed4 color = uieffect(_fragInput.texcoord0, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
fixed4 color = uieffect(IN.texcoord0, IN.uvMask, IN.worldPosition);
|
||||
color *= IN.color.a;
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0
|
||||
userData: v5.8.0
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -58,19 +58,18 @@ SubShader{
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -84,7 +83,7 @@ SubShader{
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -97,13 +96,8 @@ SubShader{
|
||||
float4 mask : TEXCOORD2;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD3;
|
||||
float2 uvLocal : TEXCOORD4;
|
||||
float4 worldPosition : TEXCOORD4;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD5;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
uniform sampler2D _MainTex;
|
||||
@@ -155,14 +149,9 @@ SubShader{
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
OUT.uvLocal = v.texcoord1.zw;
|
||||
OUT.uvMask = v.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
OUT.worldPosition = v.vertex;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return OUT;
|
||||
}
|
||||
@@ -174,7 +163,7 @@ SubShader{
|
||||
v2f IN = _fragInput;
|
||||
float2 uvMove = uv - IN.texcoord0;
|
||||
fixed4 color = tex2D(_MainTex, IN.texcoord0 + uvMove);
|
||||
color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a);
|
||||
color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, color.a);
|
||||
color.rgb *= color.a;
|
||||
return color;
|
||||
}
|
||||
@@ -186,7 +175,8 @@ SubShader{
|
||||
fixed4 frag (v2f IN) : SV_Target
|
||||
{
|
||||
_fragInput = IN;
|
||||
fixed4 color = uieffect(_fragInput.texcoord0, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
fixed4 color = uieffect(IN.texcoord0, IN.uvMask, IN.worldPosition);
|
||||
color *= IN.color.a;
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
|
||||
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0
|
||||
userData: v5.8.0
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -128,19 +128,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -159,7 +158,7 @@ SubShader {
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -182,13 +181,8 @@ SubShader {
|
||||
float4 textures : TEXCOORD5;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD6;
|
||||
float2 uvLocal : TEXCOORD7;
|
||||
float4 worldPosition : TEXCOORD7;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD8;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
// Used by Unity internally to handle Texture Tiling and Offset.
|
||||
@@ -270,14 +264,9 @@ SubShader {
|
||||
output.textures = float4(faceUV, outlineUV);
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
output.uvLocal = input.texcoord1.zw;
|
||||
output.uvMask = input.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
output.worldPosition = input.position;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -346,7 +335,7 @@ SubShader {
|
||||
faceColor.rgb += glowColor.rgb * glowColor.a;
|
||||
#endif
|
||||
|
||||
return faceColor * input.color.a;
|
||||
return faceColor;
|
||||
}
|
||||
|
||||
#define UIEFFECT_TEXTMESHPRO 1
|
||||
@@ -357,7 +346,8 @@ SubShader {
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
_fragInput = input;
|
||||
half4 faceColor = uieffect(_fragInput.atlas, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
half4 faceColor = uieffect(input.atlas, input.uvMask, input.worldPosition);
|
||||
faceColor *= input.color.a;
|
||||
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData: v5.6.0
|
||||
userData: v5.8.0
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -128,19 +128,18 @@ SubShader {
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
|
||||
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ COLOR_FILTER
|
||||
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
|
||||
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
|
||||
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ DETAIL_MASKING DETAIL_MULTIPLY DETAIL_ADDITIVE DETAIL_SUBTRACTIVE DETAIL_REPLACE DETAIL_MULTIPLY_ADDITIVE
|
||||
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
|
||||
#pragma shader_feature_local_fragment _ GRADATION_GRADIENT GRADATION_RADIAL GRADATION_COLOR2 GRADATION_COLOR4
|
||||
#pragma shader_feature_fragment _ UIEFFECT_EDITOR
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#pragma shader_feature _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_fragment _ SOFTMASK_EDITOR
|
||||
#pragma shader_feature_local_fragment _ SOFTMASKABLE
|
||||
#if SOFTMASKABLE
|
||||
#include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc"
|
||||
@@ -159,7 +158,7 @@ SubShader {
|
||||
float4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 texcoord1 : TEXCOORD1;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
float4 texcoord2 : TEXCOORD2;
|
||||
// ==== UIEFFECT END ====
|
||||
};
|
||||
@@ -182,13 +181,8 @@ SubShader {
|
||||
float4 textures : TEXCOORD5;
|
||||
// ==== UIEFFECT START ====
|
||||
float4 uvMask : TEXCOORD6;
|
||||
float2 uvLocal : TEXCOORD7;
|
||||
float4 worldPosition : TEXCOORD7;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
float4 worldPosition : TEXCOORD8;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
};
|
||||
|
||||
// Used by Unity internally to handle Texture Tiling and Offset.
|
||||
@@ -256,14 +250,9 @@ SubShader {
|
||||
output.textures = float4(faceUV, outlineUV);
|
||||
|
||||
// ==== UIEFFECT START ====
|
||||
output.uvLocal = input.texcoord1.zw;
|
||||
output.uvMask = input.texcoord2;
|
||||
// ==== UIEFFECT END ====
|
||||
// ==== SOFTMASKABLE START ====
|
||||
#if SOFTMASK_EDITOR
|
||||
output.worldPosition = input.position;
|
||||
#endif
|
||||
// ==== SOFTMASKABLE END ====
|
||||
// ==== UIEFFECT END ====
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -337,7 +326,7 @@ SubShader {
|
||||
faceColor.rgb += glowColor.rgb * glowColor.a;
|
||||
#endif
|
||||
|
||||
return faceColor * input.color.a;
|
||||
return faceColor;
|
||||
}
|
||||
|
||||
#define UIEFFECT_TEXTMESHPRO 1
|
||||
@@ -348,7 +337,8 @@ SubShader {
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
_fragInput = input;
|
||||
half4 faceColor = uieffect(_fragInput.atlas, _fragInput.uvMask, _fragInput.uvLocal);
|
||||
half4 faceColor = uieffect(input.atlas, input.uvMask, input.worldPosition);
|
||||
faceColor *= input.color.a;
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user