├── README.md ├── Assets ├── Samples ├── Scripts │ ├── Tests │ │ ├── Tests.asmdef │ │ ├── Tests.asmdef.meta │ │ ├── NewTestScript.cs.meta │ │ └── NewTestScript.cs │ └── Tests.meta ├── Demos │ ├── Readme │ │ ├── CarterOne-Regular.ttf │ │ ├── Arrow.prefab.meta │ │ ├── Content.prefab.meta │ │ ├── EffectBase.prefab.meta │ │ ├── ConpositeCanvasRenderer_Readme.unity.meta │ │ ├── UI-Wave-Fill-Additive.mat.meta │ │ ├── CarterOne-Regular.ttf.meta │ │ └── UI-Wave-Fill-Additive.mat │ ├── AllocTest │ │ ├── AllocTest.unity.meta │ │ ├── AllocTest.cs.meta │ │ └── AllocTest.cs │ ├── Noise.meta │ ├── Readme.meta │ ├── AllocTest.meta │ └── Noise │ │ ├── UI-CompositeCanvasRenderer-DigitalNoise.mat.meta │ │ ├── UI-CompositeCanvasRenderer-AnalogNoise.mat.meta │ │ ├── UI-CompositeCanvasRenderer-AnalogNoise.shader.meta │ │ ├── UI-CompositeCanvasRenderer-DigitalNoise.shader.meta │ │ ├── UI-CompositeCanvasRenderer-DigitalNoise.mat │ │ └── UI-CompositeCanvasRenderer-AnalogNoise.mat ├── Demos.meta ├── Samples.meta ├── Scripts.meta ├── ProjectSettings.meta └── ProjectSettings │ ├── NanoMonitor.asset.meta │ ├── CompositeCanvasRenderer.asset.meta │ ├── SimpleSceneNavigator.asset.meta │ ├── CompositeCanvasRenderer.asset │ ├── SimpleSceneNavigator.asset │ └── NanoMonitor.asset ├── Documentation ├── src │ ├── manual │ │ ├── Glow.md │ │ ├── Bloom.md │ │ ├── Mirror.md │ │ ├── Shadow.md │ │ ├── Usage.md │ │ ├── Outline.md │ │ ├── Installation.md │ │ ├── How_To_Customize_Effects.md │ │ ├── index.md │ │ └── toc.yml │ ├── index.md │ ├── license │ │ ├── LICENSE.md │ │ └── toc.yml │ ├── changelog │ │ ├── CHANGELOG.md │ │ └── toc.yml │ └── toc.yml ├── .gitignore ├── resources │ ├── logo.png │ └── favicon.ico ├── custom │ ├── styles │ │ ├── main.css │ │ ├── collapsible.css │ │ ├── version-selector.js │ │ ├── collapsible.js │ │ └── version-selector.css │ └── partials │ │ ├── scripts.tmpl.partial │ │ └── breadcrumb.tmpl.partial ├── filterConfig.yml ├── metadata.json └── docfx.json ├── Packages ├── src │ ├── .coffee.internal.sed │ ├── Runtime │ │ ├── Enums.meta │ │ ├── Properties.meta │ │ ├── Enums │ │ │ ├── OutlinePattern.cs │ │ │ ├── TransformSensitivity.cs │ │ │ ├── BlendType.cs.meta │ │ │ ├── ColorMode.cs.meta │ │ │ ├── ViewType.cs.meta │ │ │ ├── BakingTrigger.cs.meta │ │ │ ├── OutlinePattern.cs.meta │ │ │ ├── DownSamplingRate.cs.meta │ │ │ ├── TransformSensitivity.cs.meta │ │ │ ├── ColorMode.cs │ │ │ ├── BlendType.cs │ │ │ ├── DownSamplingRate.cs │ │ │ ├── ViewType.cs │ │ │ └── BakingTrigger.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── AssemblyInfo.cs.meta │ │ ├── Effects.meta │ │ ├── Internal.meta │ │ ├── Utilities.meta │ │ ├── Internal │ │ │ ├── Utilities.meta │ │ │ ├── Extensions.meta │ │ │ ├── ProjectSettings.meta │ │ │ ├── Utilities │ │ │ │ ├── Misc.cs.meta │ │ │ │ ├── FastAction.cs.meta │ │ │ │ ├── FrameCache.cs.meta │ │ │ │ ├── Logging.cs.meta │ │ │ │ ├── ObjectPool.cs.meta │ │ │ │ ├── ObjectRepository.cs.meta │ │ │ │ ├── UIExtraCallbacks.cs.meta │ │ │ │ ├── MaterialRepository.cs.meta │ │ │ │ ├── AlwaysIncludedShadersProxy.cs.meta │ │ │ │ ├── RenderTextureRepository.cs.meta │ │ │ │ ├── Misc.cs │ │ │ │ ├── FastAction.cs │ │ │ │ ├── AlwaysIncludedShadersProxy.cs │ │ │ │ ├── FrameCache.cs │ │ │ │ ├── MaterialRepository.cs │ │ │ │ └── UIExtraCallbacks.cs │ │ │ ├── Extensions │ │ │ │ ├── ListExtensions.cs.meta │ │ │ │ ├── CanvasExtensions.cs.meta │ │ │ │ ├── Color32Extensions.cs.meta │ │ │ │ ├── ComponentExtensions.cs.meta │ │ │ │ ├── GraphicExtensions.cs.meta │ │ │ │ ├── SpriteExtensions.cs.meta │ │ │ │ ├── TransformExtensions.cs.meta │ │ │ │ ├── Vector3Extensions.cs.meta │ │ │ │ ├── ListExtensions.cs │ │ │ │ ├── Vector3Extensions.cs │ │ │ │ ├── SpriteExtensions.cs │ │ │ │ └── Color32Extensions.cs │ │ │ └── ProjectSettings │ │ │ │ └── PreloadedProjectSettings.cs.meta │ │ ├── ProjectSettings.meta │ │ ├── Coffee.CompositeCanvas.asmdef.meta │ │ ├── Utilities │ │ │ └── Utils.cs.meta │ │ ├── CompositeCanvasProcess.cs.meta │ │ ├── CompositeCanvasRenderer.cs.meta │ │ ├── CompositeCanvasSource.cs.meta │ │ ├── Effects │ │ │ ├── CompositeCanvasBloom.cs.meta │ │ │ ├── CompositeCanvasBlur.cs.meta │ │ │ ├── CompositeCanvasGlow.cs.meta │ │ │ ├── CompositeCanvasMirror.cs.meta │ │ │ ├── CompositeCanvasOutline.cs.meta │ │ │ ├── CompositeCanvasShadow.cs.meta │ │ │ ├── CompositeCanvasEffectBase.cs.meta │ │ │ ├── CompositeCanvasBloom.cs │ │ │ ├── CompositeCanvasGlow.cs │ │ │ ├── CompositeCanvasOutline.cs │ │ │ └── CompositeCanvasEffectBase.cs │ │ ├── ProjectSettings │ │ │ └── CompositeCanvasRendererProjectSettings.cs.meta │ │ └── Coffee.CompositeCanvas.asmdef │ ├── Editor │ │ ├── CompositeCanvasRendererIcon.png │ │ ├── Internal.meta │ │ ├── Coffee.CompositeCanvas.Editor.asmdef.meta │ │ ├── Internal │ │ │ └── AssetModification.meta │ │ ├── CompositeCanvasRendererEditor.cs.meta │ │ ├── Coffee.CompositeCanvas.Editor.asmdef │ │ └── CompositeCanvasRendererIcon.png.meta │ ├── Samples~ │ │ ├── Demo │ │ │ ├── Textures │ │ │ │ ├── Light_Frame.png │ │ │ │ ├── Unity-chan.png │ │ │ │ ├── CompositeCanvasRenderer_Demo_Arrow.png │ │ │ │ ├── CompositeCanvasRenderer_Demo.spriteatlas.meta │ │ │ │ ├── CompositeCanvasRenderer_Demo.spriteatlas │ │ │ │ ├── Light_Frame.png.meta │ │ │ │ ├── Unity-chan.png.meta │ │ │ │ └── CompositeCanvasRenderer_Demo_Arrow.png.meta │ │ │ ├── Materials │ │ │ │ ├── SeamlessPattern_1.png │ │ │ │ ├── SeamlessPattern_2.png │ │ │ │ ├── UI-Fill.mat.meta │ │ │ │ ├── UI-Wave.mat.meta │ │ │ │ ├── UI-Masked.mat.meta │ │ │ │ ├── UI-Multiply.mat.meta │ │ │ │ ├── UI-Wave-Fill.mat.meta │ │ │ │ ├── UI-AnimatedGrow.mat.meta │ │ │ │ ├── SeamlessPattern_1.png.meta │ │ │ │ ├── SeamlessPattern_2.png.meta │ │ │ │ ├── UI-Wave.mat │ │ │ │ ├── UI-AnimatedGrow.mat │ │ │ │ ├── UI-Wave-Fill.mat │ │ │ │ ├── UI-Multiply.mat │ │ │ │ ├── UI-Fill.mat │ │ │ │ └── UI-Masked.mat │ │ │ ├── Contents.prefab.meta │ │ │ ├── Scripts.meta │ │ │ ├── Materials.meta │ │ │ ├── Textures.meta │ │ │ ├── CompositeCanvasRenderer_Demo.unity.meta │ │ │ └── Scripts │ │ │ │ ├── Coffee.CompositeCanvas.Demo.asmdef.meta │ │ │ │ ├── CompositeCanvasRenderer_Demo.cs.meta │ │ │ │ ├── CompositeCanvasRenderer_Demo_Enum.cs.meta │ │ │ │ ├── CompositeCanvasRenderer_Demo_Signal.cs.meta │ │ │ │ ├── CompositeCanvasRenderer_Demo_Animation.cs.meta │ │ │ │ ├── CompositeCanvasRenderer_Demo_BufferImage.cs.meta │ │ │ │ ├── CompositeCanvasRenderer_Demo_SharingGroup.cs.meta │ │ │ │ ├── Coffee.CompositeCanvas.Demo.asmdef │ │ │ │ ├── CompositeCanvasRenderer_Demo_SharingGroup.cs │ │ │ │ ├── CompositeCanvasRenderer_Demo_BufferImage.cs │ │ │ │ ├── CompositeCanvasRenderer_Demo_Animation.cs │ │ │ │ └── CompositeCanvasRenderer_Demo_Signal.cs │ │ └── Demo.meta │ ├── README.md.meta │ ├── CHANGELOG.md.meta │ ├── LICENSE.md.meta │ ├── package.json.meta │ ├── Editor.meta │ ├── Runtime.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── UI-CompositeCanvasRenderer.shader.meta │ │ ├── Hidden-UI-CompositeCanvasRenderer-Blur.shader.meta │ │ └── Hidden-UI-CompositeCanvasRenderer-Blur.shader │ ├── .releaserc.json │ ├── LICENSE.md │ └── package.json ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── ProjectVersion.txt ├── XRPackageSettings.asset ├── ClusterInputManager.asset ├── PresetManager.asset ├── XRSettings.asset ├── VersionControlSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── EditorBuildSettings.asset ├── UnityConnectSettings.asset ├── PackageManagerSettings.asset ├── EditorSettings.asset ├── DynamicsManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset └── SceneTemplateSettings.json ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── question.md │ ├── feature_request.md │ └── bug_report.md ├── FUNDING.yml ├── pull_request_template.md └── workflows │ ├── release.yml │ ├── build_demo_player.yml │ ├── deploy.yml │ └── build_documentation.yml ├── .gitignore ├── LICENSE.md └── CONTRIBUTING.md /README.md: -------------------------------------------------------------------------------- 1 | Packages/src/README.md -------------------------------------------------------------------------------- /Assets/Samples: -------------------------------------------------------------------------------- 1 | ../Packages/src/Samples~ -------------------------------------------------------------------------------- /Documentation/src/manual/Glow.md: -------------------------------------------------------------------------------- 1 | # Glow 2 | -------------------------------------------------------------------------------- /Documentation/.gitignore: -------------------------------------------------------------------------------- 1 | src/api/ 2 | _site/ 3 | -------------------------------------------------------------------------------- /Documentation/src/manual/Bloom.md: -------------------------------------------------------------------------------- 1 | # Bloom 2 | -------------------------------------------------------------------------------- /Documentation/src/manual/Mirror.md: -------------------------------------------------------------------------------- 1 | # Mirror 2 | -------------------------------------------------------------------------------- /Documentation/src/manual/Shadow.md: -------------------------------------------------------------------------------- 1 | # Shadow 2 | -------------------------------------------------------------------------------- /Documentation/src/manual/Usage.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | -------------------------------------------------------------------------------- /Documentation/src/manual/Outline.md: -------------------------------------------------------------------------------- 1 | # Outline 2 | -------------------------------------------------------------------------------- /Documentation/src/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | redirect_url: manual/ 3 | --- -------------------------------------------------------------------------------- /Documentation/src/manual/Installation.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | -------------------------------------------------------------------------------- /Documentation/src/license/LICENSE.md: -------------------------------------------------------------------------------- 1 | ../../../Packages/src/LICENSE.md -------------------------------------------------------------------------------- /Documentation/src/license/toc.yml: -------------------------------------------------------------------------------- 1 | - name: License 2 | href: LICENSE.md -------------------------------------------------------------------------------- /Documentation/src/changelog/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ../../../Packages/src/CHANGELOG.md -------------------------------------------------------------------------------- /Documentation/src/manual/How_To_Customize_Effects.md: -------------------------------------------------------------------------------- 1 | # How To Customize Effects 2 | -------------------------------------------------------------------------------- /Packages/src/.coffee.internal.sed: -------------------------------------------------------------------------------- 1 | s/Coffee.Internal/Coffee.CompositeCanvasRendererInternal/g 2 | -------------------------------------------------------------------------------- /Documentation/src/changelog/toc.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:TableOfContent 2 | - name: Changes 3 | href: CHANGELOG.md -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 583cb7fd99f849de87f4cf8ae4f611b5 3 | timeCreated: 1699939578 -------------------------------------------------------------------------------- /Documentation/src/manual/index.md: -------------------------------------------------------------------------------- 1 | # CompositeCanvasRenderer 2 | 3 | README: https://github.com/mob-sakai/CompositeCanvasRenderer -------------------------------------------------------------------------------- /Packages/src/Runtime/Properties.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea4fa761e9b84b71ac092b4dbf828d9f 3 | timeCreated: 1699939977 -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.3.62f1 2 | m_EditorVersionWithRevision: 2022.3.62f1 (4af31df58517) 3 | -------------------------------------------------------------------------------- /ProjectSettings/XRPackageSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_Settings": [ 3 | "RemoveLegacyInputHelpersForReload" 4 | ] 5 | } -------------------------------------------------------------------------------- /Documentation/resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/CompositeCanvasRenderer/HEAD/Documentation/resources/logo.png -------------------------------------------------------------------------------- /Documentation/resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/CompositeCanvasRenderer/HEAD/Documentation/resources/favicon.ico -------------------------------------------------------------------------------- /Assets/Scripts/Tests/Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Tests", 3 | "optionalUnityReferences": [ 4 | "TestAssemblies" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /Assets/Demos/Readme/CarterOne-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/CompositeCanvasRenderer/HEAD/Assets/Demos/Readme/CarterOne-Regular.ttf -------------------------------------------------------------------------------- /Packages/src/Editor/CompositeCanvasRendererIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/CompositeCanvasRenderer/HEAD/Packages/src/Editor/CompositeCanvasRendererIcon.png -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Textures/Light_Frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/CompositeCanvasRenderer/HEAD/Packages/src/Samples~/Demo/Textures/Light_Frame.png -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Textures/Unity-chan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/CompositeCanvasRenderer/HEAD/Packages/src/Samples~/Demo/Textures/Unity-chan.png -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: [] 7 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/SeamlessPattern_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/CompositeCanvasRenderer/HEAD/Packages/src/Samples~/Demo/Materials/SeamlessPattern_1.png -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/SeamlessPattern_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/CompositeCanvasRenderer/HEAD/Packages/src/Samples~/Demo/Materials/SeamlessPattern_2.png -------------------------------------------------------------------------------- /Packages/src/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2305955285d14b4881fc8d0cc4c68e0 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2dc080d5914c140cb8fc8f5f199073f2 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af3eff62664f24f6093cfea907a8f496 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Textures/CompositeCanvasRenderer_Demo_Arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mob-sakai/CompositeCanvasRenderer/HEAD/Packages/src/Samples~/Demo/Textures/CompositeCanvasRenderer_Demo_Arrow.png -------------------------------------------------------------------------------- /Assets/Demos.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4a4ee9098ef6491dbe6b8d2d23dd4c9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demos/Readme/Arrow.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1071d44cdaf214a24b03765881634e74 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demos/Readme/Content.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95fbf783609f447f8aeb4da4a9e4a5ca 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73f266620642e49fe8a4a8f31b57f9f1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cac92bad82654de78c5bf0886d76b93 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/OutlinePattern.cs: -------------------------------------------------------------------------------- 1 | namespace CompositeCanvas.Enums 2 | { 3 | public enum OutlinePattern 4 | { 5 | x0, 6 | x1, 7 | x4, 8 | x8 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/TransformSensitivity.cs: -------------------------------------------------------------------------------- 1 | namespace CompositeCanvas.Enums 2 | { 3 | public enum TransformSensitivity 4 | { 5 | Low, 6 | Medium, 7 | High 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Packages/src/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46cfb1a4f277441939eb2a8004693fbc 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demos/AllocTest/AllocTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 697c10275ee424dfabb93a2bb1449a8e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demos/Noise.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6273eb1df4cd44eebac6c999e7fb38a2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demos/Readme.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d4046beef5864ff880612017b648231 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demos/Readme/EffectBase.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84a59a5c6f26a41289e3142c2ee2e129 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ae4ec8265a324c8793ae5cc6cf7165e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demos/AllocTest.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59b60fcc862e94710a0b58788762c66e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4466487aa9c544e2eb08d330e95ff50c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7562dca72b99487a8be6e848606f3b5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Tests/Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbf69a8dcb9c4474bab723d6864f7cb1 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 902d894b8734b4378982017ce1808983 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("Coffee.CompositeCanvas.Demo")] 4 | [assembly: InternalsVisibleTo("Coffee.CompositeCanvas.Editor")] 5 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Contents.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc5bc4d504d0041ed8203eb70db2b22a 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fe2f3f642402495abb5c731d074ce14 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Editor/Internal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b79046a3ff392410292615581e55b099 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e41a6a2a065f14a29a82a36a47c57aa8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd928dc8c3f6a432eab8dce1d05ea9d9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26abda1ec55af483eb5e5013264e94b6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Packages/src/Runtime/Utilities.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb85ee58b0dce4312a6e18cf47f7209f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09cc103f19eaa4edbb352355bdda45c8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demos/Readme/ConpositeCanvasRenderer_Readme.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbb064c0668954f3996b0e2916c70253 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f33faed2b8340475eb5da9e2593573aa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Runtime/ProjectSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed2c6a1d668fd43259653e1e36d86f43 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c646380aa7a7b408c82922d8f343420f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d658442ee78046f9a241f3ecf02634a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Coffee.CompositeCanvas.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c395afef9f97d4b19bfc6a5f8b0b2a98 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2110bf8b142348fba3f89bbe36754a2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/CompositeCanvasRenderer_Demo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3f626a1c148b4a7583a647fe9d5413d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/Editor/Coffee.CompositeCanvas.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1442b5765d58c4a19804a9ebef4a7d42 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/src/Editor/Internal/AssetModification.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 452c56abaab104840b64e1c524cd409b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/ProjectSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d6ecd37c6948446a8b2e5ce5e90c16d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectSettings/NanoMonitor.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 580e3f49cc7954e56a9467cc356a1f73 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/Coffee.CompositeCanvas.Demo.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4027df1ab8e2e4914a9c302135c16847 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /Assets/Demos/Readme/UI-Wave-Fill-Additive.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fab97af5ccbdc4e62a25b0be2f8b448b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Fill.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 264ff013c74fb4b9290ccf370abb6278 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Wave.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cba613c7659b544bfabe298b8cc33a6f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectSettings/CompositeCanvasRenderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b5d6722a91c6470f8391d113351b220 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectSettings/SimpleSceneNavigator.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 187ecc32ad1d0400898f8498399157df 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Masked.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f624a1b0db6e4dd6a45c81146574138 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Multiply.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8eeba77257fb347a9bd3978d7e66c5f4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Wave-Fill.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6554e74050634b35ac7e42b3c804d6b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demos/Noise/UI-CompositeCanvasRenderer-DigitalNoise.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b074be530850a4f68bf243b567826879 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-AnimatedGrow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2c4662e0bb564d48a4d6dafc58563a4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Demos/Noise/UI-CompositeCanvasRenderer-AnalogNoise.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7153957217d9442058b844299dfcacd7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Documentation/src/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Manual 2 | href: manual/ 3 | - name: Scripting API 4 | href: api/ 5 | - name: Changelog 6 | href: changelog/ 7 | - name: License 8 | href: license/ 9 | - name: GitHub 10 | href: https://github.com/mob-sakai/CompositeCanvasRenderer 11 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # This is a comment. 2 | # Each line is a file pattern followed by one or more owners. 3 | # https://docs.github.com/ja/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners 4 | 5 | # Default owners 6 | * @mob-sakai 7 | -------------------------------------------------------------------------------- /Documentation/custom/styles/main.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | font-family: 'Roboto', sans-serif; 4 | } 5 | 6 | .navbar-brand > img { 7 | height: fit-content; 8 | } 9 | 10 | .toc a, 11 | a.xref { 12 | font-weight: 500; 13 | } 14 | 15 | .container { 16 | width: 95%; 17 | } -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Textures/CompositeCanvasRenderer_Demo.spriteatlas.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a0f886ceb445472187baccf4606e393 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/src/Shaders/UI-CompositeCanvasRenderer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0bf655e949c44179be80f397d04532d 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demos/Noise/UI-CompositeCanvasRenderer-AnalogNoise.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 765aa7a2601724e7f80322534c123d8e 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/src/Shaders/Hidden-UI-CompositeCanvasRenderer-Blur.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a9c5583f6b4e48608974061880dfa13 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Demos/AllocTest/AllocTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76141ad9004e2436ab3c9aface3463f3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Tests/NewTestScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6e80358a8c454fc9b547f7f73423875 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/BlendType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a73699b0513c47eab0c96b4ef2510db 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/ColorMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1380d8fc6f3544a0a9f17350ca035625 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/ViewType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d450abe016dc404c820b35d65aecc78 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Utilities/Utils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc119c98252ee476a80986b51f5554a9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/BakingTrigger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 331cb7cc76d6946cd98c862aa85ad78a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/OutlinePattern.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14a0f7e72eb224890a43559dac0bdff6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Demos/Noise/UI-CompositeCanvasRenderer-DigitalNoise.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcd72f6ffd25c462ba7224612e23da75 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Packages/src/Runtime/CompositeCanvasProcess.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 155ea8c09b3d64d6a8b8e95568ce31a6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/CompositeCanvasRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2486e2152d7a549d29e76a3b065de84a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/CompositeCanvasSource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27f356e7b69ea4e13bd71a24d5c5fe3a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/DownSamplingRate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea75f24adaee64c448212003e38db961 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/Misc.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc174d64e95e14d0a98af7d2ff47f0fc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Properties/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f70b9a0337ea8469588a250ae6304bcd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Editor/CompositeCanvasRendererEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7f03fc79e8ed49e4af32f318990f1eb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasBloom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd6511d20413a46908451ea97280b359 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasBlur.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc6e0799055824aff8d0cade369fa23d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasGlow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a516ed55d40f4585948376bf3935606 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasMirror.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38dff0746b03d42a8b432bfb8f23861b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasOutline.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8849a9fede8b43439ce53196e55ab99 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasShadow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6cfeb4696a7c477e9ec6dae014c1b28 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/TransformSensitivity.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac023d23e22a447c08424d0d82991908 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/FastAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3cccaceaf5f5463b9601222729813fa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/FrameCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 551e8494a26834952a83ef5bbd3ee796 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/Logging.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c32b7096e87c34f77ac27ecbbe17bc61 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/ObjectPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdab6016a82d44989b3daa178d43ef74 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasEffectBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69d3a9d92167a45a1933b7e643a3fad6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/ListExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 770dfa948a31a49f8b3eb31d9d951c93 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/ObjectRepository.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4379c6f1d9b7449f0aa6c159cc2541c8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/UIExtraCallbacks.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6091db571e82c4bd69f2a1665938b431 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/CanvasExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd12b732af67c4017b0b7a8352cfd659 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/Color32Extensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac3db0633665d4694a36a2cf3fac8261 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/ComponentExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c17f93a80cfc49b08c08c85bae13676 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/GraphicExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eecf0612b519d484ebccaead3b02c5fc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/SpriteExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6648b74858d1452d933268fce056682 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/TransformExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 406eeda46227b4b68966427a6977ba41 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/Vector3Extensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6282fc42e0e048288dee5766b06429a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/MaterialRepository.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 051b5f25a7c024ef680e5bdfe12af97f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/ColorMode.cs: -------------------------------------------------------------------------------- 1 | namespace CompositeCanvas.Enums 2 | { 3 | /// 4 | /// Color mode for rendering. 5 | /// This is used when material is not set. 6 | /// 7 | public enum ColorMode 8 | { 9 | Multiply, 10 | Additive, 11 | Subtract, 12 | Fill 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/AlwaysIncludedShadersProxy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17b57c391e8154c78b820f83083e95ed 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/RenderTextureRepository.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba2b664eec4a243d6877c903c4b317fe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02e4c5387b52649f993a2b304019b5c4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/ProjectSettings/PreloadedProjectSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf3b06ccd2caa4533ad90e5e812614e9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo_Enum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c34eeb9f64fc94ced9f1a1b1d2d09a66 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo_Signal.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7739eb40c1fe34ad8862333d8f921f16 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/BlendType.cs: -------------------------------------------------------------------------------- 1 | namespace CompositeCanvas.Enums 2 | { 3 | /// 4 | /// Blend type for rendering. 5 | /// This is used when material is not set. 6 | /// 7 | public enum BlendType 8 | { 9 | Custom, 10 | AlphaBlend, 11 | Additive, 12 | MultiplyAdditive 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Packages/src/Runtime/ProjectSettings/CompositeCanvasRendererProjectSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b894cfc7d9884b4d9a048119fbfde1e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo_Animation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cc891b3eefe74b0281c2875c844b0b2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo_BufferImage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efd3de019952245168efa62c3d52dfb1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo_SharingGroup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e33d058db2ef7485d82462d7afc18b6c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/DownSamplingRate.cs: -------------------------------------------------------------------------------- 1 | namespace CompositeCanvas.Enums 2 | { 3 | /// 4 | /// Down sampling rate for baking. 5 | /// The higher this value, the lower the resolution of the bake, but the performance will improve. 6 | /// 7 | public enum DownSamplingRate 8 | { 9 | None = 0, 10 | x1 = 1, 11 | x2 = 2, 12 | x4 = 4, 13 | x8 = 8 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.coffee.development": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/Development", 4 | "com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor", 5 | "com.unity.ide.rider": "3.0.36", 6 | "com.unity.ide.visualstudio": "2.0.22", 7 | "com.unity.test-framework": "1.3.9", 8 | "com.unity.textmeshpro": "3.0.6" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a question about this project 4 | title: '' 5 | labels: question 6 | assignees: mob-sakai 7 | 8 | --- 9 | 10 | NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one. 11 | 12 | **Describe what help do you need** 13 | A description of the question. 14 | 15 | **Additional context** 16 | Add any other context or screenshots about the question here. 17 | -------------------------------------------------------------------------------- /Documentation/filterConfig.yml: -------------------------------------------------------------------------------- 1 | apiRules: 2 | - exclude: 3 | uidRegex: ^System\.Object 4 | type: Type 5 | - exclude: 6 | uidRegex: ^UnityEngine\.Object\..*(Find|Instantiate|Destroy|Equals) 7 | type: Member 8 | - exclude: 9 | uidRegex: ^UnityEngine\.Component\..*(Message|Component) 10 | type: Member 11 | - exclude: 12 | uidRegex: ^UnityEngine\.MonoBehaviour\..*(Coroutine|Invok|print|destroyCancellationToken|useGUILayout|runInEditMode) 13 | type: Member -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/Coffee.CompositeCanvas.Demo.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Coffee.CompositeCanvas.Demo", 3 | "references": [ 4 | "Coffee.CompositeCanvas" 5 | ], 6 | "includePlatforms": [], 7 | "excludePlatforms": [], 8 | "allowUnsafeCode": false, 9 | "overrideReferences": false, 10 | "precompiledReferences": [], 11 | "autoReferenced": true, 12 | "defineConstraints": [], 13 | "versionDefines": [], 14 | "noEngineReferences": false 15 | } 16 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/ViewType.cs: -------------------------------------------------------------------------------- 1 | namespace CompositeCanvas.Enums 2 | { 3 | /// 4 | /// View type to bake. 5 | /// 6 | /// Automatic: Use orthographic space to bake if possible. 7 | /// 8 | /// Orthographic: Use orthographic space to bake. 9 | /// 10 | /// Perspective: Use perspective space to bake. 11 | /// 12 | public enum ViewType 13 | { 14 | Automatic, 15 | Orthographic, 16 | Perspective 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Packages/src/Editor/Coffee.CompositeCanvas.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Coffee.CompositeCanvas.Editor", 3 | "references": [ 4 | "GUID:c395afef9f97d4b19bfc6a5f8b0b2a98" 5 | ], 6 | "includePlatforms": [ 7 | "Editor" 8 | ], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": false, 14 | "defineConstraints": [], 15 | "versionDefines": [], 16 | "noEngineReferences": false 17 | } 18 | -------------------------------------------------------------------------------- /Documentation/src/manual/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Overview 2 | href: index.md 3 | - name: How to use 4 | items: 5 | - name: Installation 6 | href: Installation.md 7 | - name: Usage 8 | href: Usage.md 9 | - name: Built-in Effects 10 | items: 11 | - name: Shadow 12 | href: Shadow.md 13 | - name: Outline 14 | href: Outline.md 15 | - name: Glow 16 | href: Glow.md 17 | - name: Bloom 18 | href: Bloom.md 19 | - name: Mirror 20 | href: Mirror.md 21 | - name: How To Customize Effects 22 | href: How_To_Customize_Effects.md -------------------------------------------------------------------------------- /Packages/src/.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "branches": [ 3 | "v+([0-9])?(.{+([0-9]),x}).x", 4 | "main", 5 | { 6 | "name": "preview", 7 | "prerelease": true 8 | } 9 | ], 10 | "tagFormat": "${version}", 11 | "plugins": [ 12 | "@semantic-release/commit-analyzer", 13 | "@semantic-release/release-notes-generator", 14 | "@semantic-release/changelog", 15 | [ 16 | "@semantic-release/npm", 17 | { 18 | "npmPublish": false 19 | } 20 | ], 21 | "@semantic-release/git", 22 | "@semantic-release/github" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/ListExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Coffee.CompositeCanvasRendererInternal 4 | { 5 | /// 6 | /// Extension methods for Component class. 7 | /// 8 | internal static class ListExtensions 9 | { 10 | public static void RemoveAtFast(this List self, int index) 11 | { 12 | if (self == null) return; 13 | 14 | var lastIndex = self.Count - 1; 15 | self[index] = self[lastIndex]; 16 | self.RemoveAt(lastIndex); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/Demos/Readme/CarterOne-Regular.ttf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbc6efaaec483437d9970e3a79bf8961 3 | TrueTypeFontImporter: 4 | externalObjects: {} 5 | serializedVersion: 4 6 | fontSize: 32 7 | forceTextureCase: -2 8 | characterSpacing: 0 9 | characterPadding: 1 10 | includeFontData: 1 11 | fontName: Carter One 12 | fontNames: 13 | - Carter One 14 | fallbackFontReferences: [] 15 | customCharacters: 16 | fontRenderingMode: 0 17 | ascentCalculationMode: 1 18 | useLegacyBoundsCalculation: 0 19 | shouldRoundAdvanceValue: 1 20 | userData: 21 | assetBundleName: 22 | assetBundleVariant: 23 | -------------------------------------------------------------------------------- /Assets/ProjectSettings/CompositeCanvasRenderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 8b894cfc7d9884b4d9a048119fbfde1e, type: 3} 13 | m_Name: CompositeCanvasRenderer 14 | m_EditorClassIdentifier: 15 | m_TransformSensitivity: 1 16 | m_EnableCullingInPlayMode: 1 17 | m_EnableCullingInEditMode: 1 18 | m_AutoIncludeShaders: 1 19 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Enums/BakingTrigger.cs: -------------------------------------------------------------------------------- 1 | namespace CompositeCanvas.Enums 2 | { 3 | /// 4 | /// Baking trigger mode. 5 | /// 6 | /// Automatic: Baking is performed automatically when the transform of the source graphic changes. 7 | /// 8 | /// Manually: Baking is performed manually by calling SetDirty(). 9 | /// 10 | /// Always: Baking is performed every frame. 11 | /// 12 | /// OnEnable: Baking is performed once when enabled. 13 | /// 14 | public enum BakingTrigger 15 | { 16 | Automatic, 17 | Manually, 18 | Always, 19 | OnEnable 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Documentation/custom/partials/scripts.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Assets/ProjectSettings/SimpleSceneNavigator.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 94e8c16a26d334eafa227ee444387432, type: 3} 13 | m_Name: SimpleSceneNavigator 14 | m_EditorClassIdentifier: 15 | m_NavigatorEnabled: 1 16 | m_EnabledInEditor: 1 17 | m_AlwaysIncludeAssembly: 1 18 | m_InstantiateOnLoad: 1 19 | m_Prefab: {fileID: 7211429669315726685, guid: 6f0b6bea013794ed6aa04b543da369dd, 20 | type: 3} 21 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Samples/Demo/CompositeCanvasRenderer_Demo.unity 10 | guid: f3f626a1c148b4a7583a647fe9d5413d 11 | - enabled: 1 12 | path: Assets/Demos/Readme/ConpositeCanvasRenderer_Readme.unity 13 | guid: bbb064c0668954f3996b0e2916c70253 14 | m_configObjects: 15 | com.unity.xr.management.loader_settings: {fileID: 11400000, guid: 314dc4887c5db44d0b8af67c7c5f31bb, 16 | type: 2} 17 | xr.sdk.mock-hmd.settings: {fileID: 11400000, guid: 31cb53668588e42ddbb61d74bb933196, 18 | type: 2} 19 | -------------------------------------------------------------------------------- /Documentation/custom/styles/collapsible.css: -------------------------------------------------------------------------------- 1 | .collapsible { 2 | cursor: pointer; 3 | } 4 | 5 | .collapsible div { 6 | padding: 0 18px; 7 | display: block; 8 | overflow: hidden; 9 | } 10 | 11 | .collapsible.closed div { 12 | display: none; 13 | } 14 | 15 | .initial { 16 | display: block !important; 17 | } 18 | 19 | .collapsible.closed h5::before { 20 | content: "+ "; 21 | font-size: 1.2em; 22 | } 23 | 24 | .collapsible h5::before { 25 | content: "- "; 26 | font-size: 1.2em; 27 | } 28 | 29 | .collapsible.closed::after { 30 | content: " ... "; 31 | font-size: 1.5em; 32 | } 33 | 34 | .show-bottom .level0.initial:after { 35 | content: "\A ..." !important; 36 | white-space: pre; 37 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | /[Bb]uilds/ 6 | Build_*/ 7 | /Assets/AssetStoreTools* 8 | 9 | # Autogenerated VS/MD solution and project files 10 | ExportedObj/ 11 | *.csproj 12 | *.unityproj 13 | *.sln 14 | *.suo 15 | *.tmp 16 | *.user 17 | *.userprefs 18 | *.pidb 19 | *.booproj 20 | *.svd 21 | 22 | 23 | # Unity3D generated meta files 24 | *.pidb.meta 25 | 26 | # Unity3D Generated File On Crash Reports 27 | sysinfo.txt 28 | 29 | # Mac 30 | *.DS_Store 31 | 32 | # Builds 33 | *.apk 34 | 35 | # Packages 36 | build.app 37 | unity.log 38 | 39 | .vs/ 40 | .idea/ 41 | Assets/Plugins.meta 42 | Assets/Plugins 43 | Assets/TextMesh Pro* 44 | UserSettings/ 45 | Logs/ 46 | CodeCoverage/ 47 | Assets/JMO Assets/ 48 | Assets/JMO Assets.meta 49 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: mob-sakai # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: mob_sakai # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /Documentation/custom/partials/breadcrumb.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}} 2 | 3 | 21 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Coffee.CompositeCanvas.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Coffee.CompositeCanvas", 3 | "rootNamespace": "", 4 | "references": [ 5 | "Unity.TextMeshPro" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [ 15 | { 16 | "name": "com.unity.textmeshpro", 17 | "expression": "1.0.0", 18 | "define": "TMP_ENABLE" 19 | }, 20 | { 21 | "name": "com.unity.ugui", 22 | "expression": "2.0.0", 23 | "define": "TMP_ENABLE" 24 | } 25 | ], 26 | "noEngineReferences": false 27 | } -------------------------------------------------------------------------------- /Assets/Scripts/Tests/NewTestScript.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using NUnit.Framework; 3 | using UnityEngine.TestTools; 4 | 5 | namespace Tests 6 | { 7 | public class NewTestScript 8 | { 9 | // A Test behaves as an ordinary method 10 | [Test] 11 | public void NewTestScriptSimplePasses() 12 | { 13 | // Use the Assert class to test conditions 14 | } 15 | 16 | // A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use 17 | // `yield return null;` to skip a frame. 18 | [UnityTest] 19 | public IEnumerator NewTestScriptWithEnumeratorPasses() 20 | { 21 | // Use the Assert class to test conditions. 22 | // Use yield to skip a frame. 23 | yield return null; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: mob-sakai 7 | 8 | --- 9 | 10 | NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one. 11 | 12 | **Is your feature request related to a problem? Please describe.** 13 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 14 | 15 | **Describe the solution you'd like** 16 | A clear and concise description of what you want to happen. 17 | 18 | **Describe alternatives you've considered** 19 | A clear and concise description of any alternative solutions or features you've considered. 20 | 21 | **Additional context** 22 | Add any other context or screenshots about the feature request here. 23 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasBloom.cs: -------------------------------------------------------------------------------- 1 | using Coffee.CompositeCanvasRendererInternal; 2 | using CompositeCanvas.Enums; 3 | using UnityEngine; 4 | 5 | namespace CompositeCanvas.Effects 6 | { 7 | [Icon("Packages/com.coffee.composite-canvas-renderer/Editor/CompositeCanvasRendererIcon.png")] 8 | public class CompositeCanvasBloom : CompositeCanvasBlur 9 | { 10 | public override void Reset() 11 | { 12 | if (!compositeCanvasRenderer) return; 13 | 14 | compositeCanvasRenderer.colorMode = ColorMode.Multiply; 15 | compositeCanvasRenderer.blendType = BlendType.MultiplyAdditive; 16 | compositeCanvasRenderer.foreground = true; 17 | compositeCanvasRenderer.showSourceGraphics = true; 18 | compositeCanvasRenderer.color = new Color(1, 1, 1, 0.5f); 19 | blur = 1f; 20 | iteration = 10; 21 | power = 2f; 22 | multiplier = 1.5f; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Documentation/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadataUrl": "https://mob-sakai.github.io/CompositeCanvasRenderer/metadata.json", 3 | "versions": [ 4 | { 5 | "ref": "develop", 6 | "version": "1.1.0", 7 | "unity": "2019.4", 8 | "dest": "_site", 9 | "appTitle": "Composite Canvas Renderer 1.1.0", 10 | "url": "https://mob-sakai.github.io/CompositeCanvasRenderer" 11 | }, 12 | { 13 | "ref": "1.0.0", 14 | "version": "1.0.0", 15 | "unity": "2019.4", 16 | "dest": "_site/1.0.0", 17 | "appTitle": "Composite Canvas Renderer 1.0.0", 18 | "url": "https://mob-sakai.github.io/CompositeCanvasRenderer/1.0.0" 19 | }, 20 | { 21 | "ref": "1.0.0-preview.2", 22 | "version": "1.0.0-preview.2", 23 | "unity": "2019.4", 24 | "dest": "_site/1.0.0-preview.2", 25 | "appTitle": "Composite Canvas Renderer 1.0.0-preview.2", 26 | "url": "https://mob-sakai.github.io/CompositeCanvasRenderer/1.0.0-preview.2" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_ScopedRegistriesSettingsExpanded: 1 16 | oneTimeWarningShown: 0 17 | m_Registries: 18 | - m_Id: main 19 | m_Name: 20 | m_Url: https://packages.unity.com 21 | m_Scopes: [] 22 | m_IsDefault: 1 23 | m_UserSelectedRegistryName: 24 | m_UserAddingNewScopedRegistry: 0 25 | m_RegistryInfoDraft: 26 | m_ErrorMessage: 27 | m_Original: 28 | m_Id: 29 | m_Name: 30 | m_Url: 31 | m_Scopes: [] 32 | m_IsDefault: 0 33 | m_Modified: 0 34 | m_Name: 35 | m_Url: 36 | m_Scopes: 37 | - 38 | m_SelectedScopeIndex: 0 39 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo_SharingGroup.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace CompositeCanvas.Demos 5 | { 6 | public class CompositeCanvasRenderer_Demo_SharingGroup : MonoBehaviour 7 | { 8 | [SerializeField] private int m_Count; 9 | [SerializeField] private GameObject m_Origin; 10 | private readonly List _renderers = new List(); 11 | 12 | private void Start() 13 | { 14 | _renderers.Add(m_Origin.GetComponentInChildren()); 15 | 16 | for (var i = 0; i < m_Count; i++) 17 | { 18 | var go = Instantiate(m_Origin, transform, false); 19 | _renderers.Add(go.GetComponentInChildren()); 20 | } 21 | } 22 | 23 | public void EnableSharingGroup(bool flag) 24 | { 25 | _renderers.ForEach(r => r.sharingGroupId = flag ? 10 : 0); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: mob-sakai 7 | 8 | --- 9 | 10 | NOTE: Your issue may already be reported! Please search on the [issue tracker](../) before creating one. 11 | 12 | **Describe the bug** 13 | A clear and concise description of what the bug is. 14 | 15 | **To Reproduce** 16 | Steps to reproduce the behavior: 17 | 1. Go to '...' 18 | 2. Click on '....' 19 | 3. Scroll down to '....' 20 | 4. See error 21 | 22 | **Expected behavior** 23 | A clear and concise description of what you expected to happen. 24 | 25 | **Screenshots** 26 | If applicable, add screenshots to help explain your problem. 27 | 28 | **Environment (please complete the following information):** 29 | - Version [e.g. 1.0.0] 30 | - Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL] 31 | - Unity version: [e.g. 2018.2.8f1] 32 | - Build options: [e.g. IL2CPP, .Net 4.x, LWRP] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2023 mob-sakai 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 4 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 6 | persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 9 | Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 12 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 13 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 14 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Packages/src/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2023 mob-sakai 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 4 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 6 | persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 9 | Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 12 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 13 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 14 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Packages/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.coffee.composite-canvas-renderer", 3 | "displayName": "Composite Canvas Renderer", 4 | "description": "", 5 | "version": "2.0.0", 6 | "unity": "2022.3", 7 | "license": "MIT", 8 | "documentationUrl": "https://mob-sakai.github.io/CompositeCanvasRenderer", 9 | "licensesUrl": "https://mob-sakai.github.io/CompositeCanvasRenderer/license/LICENSE.html", 10 | "changelogUrl": "https://mob-sakai.github.io/CompositeCanvasRenderer/changelog/CHANGELOG.html", 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/mob-sakai/CompositeCanvasRenderer.git", 14 | "directory": "Packages/src" 15 | }, 16 | "author": { 17 | "name": "mob-sakai", 18 | "email": "sakai861104@gmail.com", 19 | "url": "https://github.com/mob-sakai" 20 | }, 21 | "dependencies": { 22 | "com.unity.ugui": "1.0.0" 23 | }, 24 | "keywords": [ 25 | "ui" 26 | ], 27 | "samples": [ 28 | { 29 | "displayName": "Demo", 30 | "description": "Composite Canvas Renderer Demo", 31 | "path": "Samples~/Demo" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## How to Contribute 4 | 5 | #### Code of Conduct 6 | 7 | This repository has adopted the Contributor Covenant as it's 8 | Code of Conduct. It is expected that participants adhere to it. 9 | 10 | #### Proposing a Change 11 | 12 | If you are unsure about whether or not a change is desired, 13 | you can create an issue. This is useful because it creates 14 | the possibility for a discussion that's visible to everyone. 15 | 16 | When fixing a bug it is fine to submit a pull request right away. 17 | 18 | #### Sending a Pull Request 19 | 20 | Steps to be performed to submit a pull request: 21 | 22 | 1. Fork the repository and create your branch from `develop`. 23 | 2. If you have fixed a bug or added code that should be tested, add tests. 24 | 3. Click `Window > Generals > Test Runner` to test 25 | 4. Commit with a massage based 26 | on [Angular Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153). 27 | 5. Fill out the description, link any related issues and submit your pull request. 28 | 29 | #### License 30 | 31 | By contributing to this repository, you agree that your contributions will be licensed under its MIT license. 32 | -------------------------------------------------------------------------------- /Documentation/docfx.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": [ 3 | { 4 | "dest": "src/api", 5 | "memberLayout": "separatePages", 6 | "allowCompilationErrors": true, 7 | "filter": "filterConfig.yml", 8 | "src": [ 9 | { 10 | "src": "..", 11 | "files": [ 12 | "Coffee.CompositeCanvas.csproj" 13 | ] 14 | } 15 | ] 16 | } 17 | ], 18 | "build": { 19 | "dest": "_site", 20 | "globalMetadata": { 21 | "_appFaviconPath": "resources/favicon.ico", 22 | "_appLogoPath": "resources/logo.png", 23 | "_enableSearch": "true", 24 | "_gitUrlPattern": "github" 25 | }, 26 | "content": [ 27 | { 28 | "src": "src", 29 | "files": [ 30 | "**" 31 | ] 32 | } 33 | ], 34 | "resource": [ 35 | "metadata.json", 36 | "resources/**/*" 37 | ], 38 | "template": [ 39 | "default", 40 | "custom" 41 | ], 42 | "xref": [ 43 | "https://docs.unity3d.com/Packages/com.unity.ugui@1.0/xrefmap.yml", 44 | "https://normanderwan.github.io/UnityXrefMaps/xrefmap.yml" 45 | ], 46 | "xrefService": [ 47 | "https://xref.docs.microsoft.com/query?uid={uid}" 48 | ] 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 1 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 4 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 1 27 | m_EnterPlayModeOptions: 1 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 1 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | m_CacheServerValidationMode: 2 37 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 10 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 0 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo_BufferImage.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | #if UNITY_EDITOR 4 | using UnityEditor; 5 | using UnityEditor.UI; 6 | #endif 7 | 8 | namespace CompositeCanvas.Demos 9 | { 10 | [ExecuteAlways] 11 | public class CompositeCanvasRenderer_Demo_BufferImage : RawImage 12 | { 13 | [SerializeField] private CompositeCanvasRenderer m_CompositeCanvasRenderer; 14 | 15 | private void LateUpdate() 16 | { 17 | var valid = m_CompositeCanvasRenderer && m_CompositeCanvasRenderer.currentBakeBuffer; 18 | texture = valid ? m_CompositeCanvasRenderer.mainTexture : null; 19 | canvasRenderer.SetAlpha(valid ? 1 : 0); 20 | } 21 | 22 | protected override void OnDisable() 23 | { 24 | base.OnDisable(); 25 | texture = null; 26 | } 27 | } 28 | 29 | #if UNITY_EDITOR 30 | [CustomEditor(typeof(CompositeCanvasRenderer_Demo_BufferImage))] 31 | internal class CompositeCanvasRenderer_Demo_PreBakeImageEditor : RawImageEditor 32 | { 33 | public override void OnInspectorGUI() 34 | { 35 | base.OnInspectorGUI(); 36 | 37 | EditorGUILayout.PropertyField(serializedObject.FindProperty("m_CompositeCanvasRenderer")); 38 | 39 | serializedObject.ApplyModifiedProperties(); 40 | } 41 | } 42 | #endif 43 | } 44 | -------------------------------------------------------------------------------- /Documentation/custom/styles/version-selector.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | run(); 3 | window.refresh += run; 4 | 5 | function run() { 6 | // Find metadata. 7 | const offline = location.hostname === "localhost" || location.hostname === "127.0.0.1"; 8 | const requestURL = '../metadata.json'; 9 | $.getJSON(requestURL, m => { 10 | if (offline) { 11 | generateVersionSelector(m); 12 | } else { 13 | $.getJSON(m.metadataUrl, generateVersionSelector) 14 | } 15 | }); 16 | 17 | // Open/close version selector. 18 | $(document).click(function (e) { 19 | if (e.target.id == 'component-select-current-display') 20 | $('#component-select-current-display').toggleClass('component-select__current--is-active'); 21 | else 22 | $('#component-select-current-display').removeClass('component-select__current--is-active'); 23 | }); 24 | } 25 | 26 | function generateVersionSelector(metadata) { 27 | if (!metadata) return; 28 | 29 | metadata.versions.forEach(v => { 30 | $('#version-select-ul').append($(` 31 | 32 |
  • 33 | ${v.version} ${v.unity}+ 34 |
  • 35 |
    36 | `)); 37 | }); 38 | } 39 | }); 40 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | # Pull Request Template 3 | 4 | ## Description 5 | 6 | - Please include a summary of the change and which issue is fixed. 7 | - Please also include relevant motivation and context. 8 | - List any dependencies that are required for this change. 9 | 10 | Fixes #{issue_number} 11 | 12 | ## Type of change 13 | 14 | Please write the commit message in the format corresponding to the change type. 15 | Please see [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for more information. 16 | 17 | - [ ] Bug fix (non-breaking change which fixes an issue) 18 | - [ ] New feature (non-breaking change which adds functionality) 19 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 20 | - [ ] Update documentations 21 | - [ ] Others (refactoring, style changes, etc.) 22 | 23 | ## Test environment 24 | 25 | - Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL] 26 | - Unity version: [e.g. 2022.2.0f1] 27 | - Build options: [e.g. IL2CPP, .Net 4.x, URP/HDRP] 28 | 29 | ## Checklist 30 | 31 | - [ ] This pull request is for merging into the `develop` branch 32 | - [ ] My code follows the style guidelines of this project 33 | - [ ] I have performed a self-review of my own code 34 | - [ ] I have commented my code, particularly in hard-to-understand areas 35 | - [ ] I have made corresponding changes to the documentation 36 | - [ ] My changes generate no new warnings 37 | - [ ] I have checked my code and corrected any misspellings 38 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/Vector3Extensions.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Coffee.CompositeCanvasRendererInternal 4 | { 5 | internal static class Vector3Extensions 6 | { 7 | public static Vector3 Inverse(this Vector3 self) 8 | { 9 | self.x = Mathf.Approximately(self.x, 0) ? 1 : 1 / self.x; 10 | self.y = Mathf.Approximately(self.y, 0) ? 1 : 1 / self.y; 11 | self.z = Mathf.Approximately(self.z, 0) ? 1 : 1 / self.z; 12 | return self; 13 | } 14 | 15 | public static Vector3 GetScaled(this Vector3 self, Vector3 other1) 16 | { 17 | self.Scale(other1); 18 | return self; 19 | } 20 | 21 | public static Vector3 GetScaled(this Vector3 self, Vector3 other1, Vector3 other2) 22 | { 23 | self.Scale(other1); 24 | self.Scale(other2); 25 | return self; 26 | } 27 | 28 | public static Vector3 GetScaled(this Vector3 self, Vector3 other1, Vector3 other2, Vector3 other3) 29 | { 30 | self.Scale(other1); 31 | self.Scale(other2); 32 | self.Scale(other3); 33 | return self; 34 | } 35 | 36 | public static bool IsVisible(this Vector3 self) 37 | { 38 | return 0 < Mathf.Abs(self.x * self.y * self.z); 39 | } 40 | 41 | public static bool IsVisible2D(this Vector3 self) 42 | { 43 | return 0 < Mathf.Abs(self.x * self.y); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: 🔖 Release 2 | run-name: 🔖 Release (${{ github.ref_name }}) 3 | 4 | on: 5 | workflow_dispatch: 6 | push: 7 | branches: 8 | - preview 9 | - main 10 | - v*.x 11 | tags-ignore: 12 | - "**" 13 | 14 | jobs: 15 | release: 16 | name: 🔖 Release (${{ github.ref_name }}) 17 | runs-on: ubuntu-latest 18 | permissions: 19 | contents: write 20 | pull-requests: write 21 | issues: write 22 | outputs: 23 | channel: ${{ steps.release.outputs.new_release_channel }} 24 | released: ${{ steps.release.outputs.new_release_published }} 25 | tag: ${{ steps.release.outputs.new_release_git_tag }} 26 | steps: 27 | - name: 🚚 Checkout (${{ github.ref_name }}) 28 | uses: actions/checkout@v4 29 | 30 | - name: 🔖 Run semantic release 31 | uses: cycjimmy/semantic-release-action@v4 32 | id: release 33 | with: 34 | working_directory: Packages/src 35 | extra_plugins: | 36 | @semantic-release/changelog 37 | @semantic-release/git 38 | env: 39 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 40 | 41 | - run: | 42 | echo "🔖 New release published: '${{ steps.release.outputs.new_release_published }}'" | tee -a $GITHUB_STEP_SUMMARY 43 | echo "🔖 New release channel: '${{ steps.release.outputs.new_release_channel }}'" | tee -a $GITHUB_STEP_SUMMARY 44 | echo "🔖 New release git tag: '${{ steps.release.outputs.new_release_git_tag }}'" | tee -a $GITHUB_STEP_SUMMARY 45 | -------------------------------------------------------------------------------- /Assets/ProjectSettings/NanoMonitor.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 194d2f2eb25c64ec0af5c323c74eb518, type: 3} 13 | m_Name: NanoMonitor 14 | m_EditorClassIdentifier: 15 | m_NanoMonitorEnabled: 1 16 | m_BootSceneNameRegex: .* 17 | m_DevelopmentBuildOnly: 0 18 | m_EnabledInEditor: 1 19 | m_AlwaysIncludeAssembly: 1 20 | m_InstantiateOnLoad: 1 21 | m_Prefab: {fileID: 4567906826058368312, guid: 7cebff2d255b9433cbe23b243c193329, 22 | type: 3} 23 | m_Interval: 0.5 24 | m_Anchor: 0 25 | m_Width: 800 26 | m_HelpUrl: https://github.com/mob-sakai/CompositeCanvasRenderer 27 | m_CustomMonitorItems: 28 | - m_Format: Screen:{0}x{1} 29 | m_Arg0: 30 | m_Path: UnityEngine.Screen, UnityEngine.CoreModule;width 31 | m_Arg1: 32 | m_Path: UnityEngine.Screen, UnityEngine.CoreModule;height 33 | m_Arg2: 34 | m_Path: 35 | - m_Format: Baked:{0} Materials:{1} RenderTextures:{2} 36 | m_Arg0: 37 | m_Path: CompositeCanvas.Demos.CompositeCanvasRenderer_Demo_Signal, Coffee.CompositeCanvas.Demo;bakedCount 38 | m_Arg1: 39 | m_Path: Coffee.CompositeCanvasRendererInternal.MaterialRepository, Coffee.CompositeCanvas;count 40 | m_Arg2: 41 | m_Path: Coffee.CompositeCanvasRendererInternal.RenderTextureRepository, Coffee.CompositeCanvas;count 42 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasGlow.cs: -------------------------------------------------------------------------------- 1 | using Coffee.CompositeCanvasRendererInternal; 2 | using CompositeCanvas.Enums; 3 | using UnityEngine; 4 | 5 | namespace CompositeCanvas.Effects 6 | { 7 | [Icon("Packages/com.coffee.composite-canvas-renderer/Editor/CompositeCanvasRendererIcon.png")] 8 | public class CompositeCanvasGlow : CompositeCanvasOutline 9 | { 10 | [Header("Inner")] 11 | [Range(0, 1)] 12 | [SerializeField] 13 | private float m_InnerCutoff = 1; 14 | 15 | public override float innerCutoff 16 | { 17 | get => m_InnerCutoff; 18 | set 19 | { 20 | value = Mathf.Clamp01(value); 21 | if (Mathf.Approximately(m_InnerCutoff, value)) return; 22 | 23 | m_InnerCutoff = value; 24 | SetRendererDirty(); 25 | } 26 | } 27 | 28 | /// 29 | /// Reset to default values. 30 | /// 31 | public override void Reset() 32 | { 33 | if (!compositeCanvasRenderer) return; 34 | compositeCanvasRenderer.blendType = BlendType.Additive; 35 | compositeCanvasRenderer.foreground = true; 36 | compositeCanvasRenderer.showSourceGraphics = true; 37 | compositeCanvasRenderer.color = new Color(0, 1, 0, 0.5f); 38 | innerCutoff = 0.8f; 39 | effectDistance = new Vector2(5, -5); 40 | blur = 1f; 41 | iteration = 10; 42 | power = 1f; 43 | multiplier = 1f; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Documentation/custom/styles/collapsible.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | run(); 3 | window.refresh += run; 4 | 5 | function run() { 6 | setAsCollapsible($(".inheritance")[0], true); 7 | setAsCollapsible($(".inheritedMembers")[0], false); 8 | setSiblingAsLast($(".inheritedMembers")[0]); 9 | } 10 | 11 | /* 12 | * Set element as last sibling. 13 | */ 14 | function setSiblingAsLast(element) { 15 | if (!element) return; 16 | 17 | const parent = element.parentElement; 18 | parent.appendChild(element); 19 | } 20 | 21 | /* 22 | * Set element as collapsible. 23 | */ 24 | function setAsCollapsible(element, showBottom) { 25 | if (!element || element.children.length < 0) return; 26 | 27 | // Add collapsible class. 28 | element.classList.add("collapsible"); 29 | element.classList.add("closed"); 30 | 31 | // Add click event. 32 | const children = Array.from(element.children); 33 | element.addEventListener("click", function (evt) { 34 | if (evt.target.tagName == "A") return; 35 | element.classList.toggle("closed"); 36 | children.forEach(c => c.classList.remove("initial")); 37 | }); 38 | 39 | // Initial state. 40 | if (showBottom) { 41 | element.classList.add("show-bottom"); 42 | children.slice(-4, -1).forEach(c => c.classList.add("initial")); 43 | children[1].classList.add("initial"); 44 | } else { 45 | children.slice(1, 6).forEach(c => c.classList.add("initial")); 46 | } 47 | } 48 | }); 49 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/Misc.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | #if UNITY_EDITOR 4 | using UnityEditor; 5 | using UnityEngine; 6 | using Object = UnityEngine.Object; 7 | using System.Linq; 8 | using System.Reflection; 9 | #endif 10 | 11 | namespace Coffee.CompositeCanvasRendererInternal 12 | { 13 | #if !UNITY_2021_2_OR_NEWER 14 | [AttributeUsage(AttributeTargets.Class)] 15 | [Conditional("UNITY_EDITOR")] 16 | internal class IconAttribute : Attribute 17 | { 18 | private readonly string _path; 19 | 20 | public IconAttribute(string path) 21 | { 22 | _path = path; 23 | } 24 | 25 | #if UNITY_EDITOR 26 | private static Action s_SetIconForObject = typeof(EditorGUIUtility) 27 | .GetMethod("SetIconForObject", BindingFlags.Static | BindingFlags.NonPublic) 28 | .CreateDelegate(typeof(Action), null) as Action; 29 | 30 | [InitializeOnLoadMethod] 31 | private static void InitializeOnLoadMethod() 32 | { 33 | if (Application.isBatchMode || BuildPipeline.isBuildingPlayer) return; 34 | 35 | var types = TypeCache.GetTypesWithAttribute(); 36 | var scripts = MonoImporter.GetAllRuntimeMonoScripts(); 37 | foreach (var type in types) 38 | { 39 | var script = scripts.FirstOrDefault(x => x.GetClass() == type); 40 | if (!script) continue; 41 | 42 | var path = type.GetCustomAttribute()?._path; 43 | var icon = AssetDatabase.LoadAssetAtPath(path); 44 | if (!icon) continue; 45 | 46 | s_SetIconForObject(script, icon); 47 | } 48 | } 49 | #endif 50 | } 51 | #endif 52 | } 53 | -------------------------------------------------------------------------------- /.github/workflows/build_demo_player.yml: -------------------------------------------------------------------------------- 1 | # Required secrets 2 | # UNITY_LICENSE: The contents of Unity license file 3 | # UNITY_EMAIL: Unity user email to login 4 | # UNITY_PASSWORD: Unity user password to login 5 | name: 🎮 Build Demo Player 6 | 7 | env: 8 | unityVersion: 2022.3.10f1 9 | targetPlatform: WebGL 10 | 11 | on: 12 | workflow_call: 13 | secrets: 14 | UNITY_EMAIL: 15 | description: Unity user email to login 16 | required: true 17 | UNITY_PASSWORD: 18 | description: Unity user password to login 19 | required: true 20 | UNITY_LICENSE: 21 | description: The contents of Unity license file 22 | required: true 23 | workflow_dispatch: 24 | 25 | jobs: 26 | build: 27 | name: 🎮 Build Demo Player 28 | runs-on: ubuntu-latest 29 | permissions: 30 | contents: read 31 | steps: 32 | - name: 🚚 Checkout 33 | uses: actions/checkout@v4 34 | 35 | - name: 📥 Cache Library 36 | uses: actions/cache@v4 37 | with: 38 | path: Library 39 | key: Library-${{ env.unityVersion }}-${{ env.targetPlatform }}-${{ github.sha }} 40 | restore-keys: | 41 | Library-${{ env.unityVersion }}-${{ env.targetPlatform }}- 42 | Library-${{ env.unityVersion }}- 43 | Library- 44 | 45 | - name: 🛠️ Build Demo Player 46 | uses: game-ci/unity-builder@v4 47 | timeout-minutes: 30 48 | env: 49 | UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} 50 | UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} 51 | UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} 52 | with: 53 | unityVersion: ${{ env.unityVersion }} 54 | targetPlatform: WebGL 55 | allowDirtyBuild: true 56 | 57 | - name: 📦 Upload Demo Player 58 | uses: actions/upload-artifact@v4 59 | with: 60 | name: Demo 61 | path: build/WebGL/WebGL -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Textures/CompositeCanvasRenderer_Demo.spriteatlas: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!687078895 &4343727234628468602 4 | SpriteAtlas: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: CompositeCanvasRenderer_Demo 10 | m_EditorData: 11 | serializedVersion: 2 12 | textureSettings: 13 | serializedVersion: 2 14 | anisoLevel: 1 15 | compressionQuality: 50 16 | maxTextureSize: 2048 17 | textureCompression: 0 18 | filterMode: 1 19 | generateMipMaps: 0 20 | readable: 0 21 | crunchedCompression: 0 22 | sRGB: 1 23 | platformSettings: 24 | - serializedVersion: 3 25 | m_BuildTarget: DefaultTexturePlatform 26 | m_MaxTextureSize: 2048 27 | m_ResizeAlgorithm: 0 28 | m_TextureFormat: -1 29 | m_TextureCompression: 1 30 | m_CompressionQuality: 50 31 | m_CrunchedCompression: 0 32 | m_AllowsAlphaSplitting: 0 33 | m_Overridden: 0 34 | m_AndroidETC2FallbackOverride: 0 35 | m_ForceMaximumCompressionQuality_BC6H_BC7: 1 36 | packingSettings: 37 | serializedVersion: 2 38 | padding: 4 39 | blockOffset: 1 40 | allowAlphaSplitting: 0 41 | enableRotation: 0 42 | enableTightPacking: 0 43 | variantMultiplier: 1 44 | packables: 45 | - {fileID: 102900000, guid: 3d658442ee78046f9a241f3ecf02634a, type: 3} 46 | bindAsDefault: 1 47 | m_MasterAtlas: {fileID: 0} 48 | m_PackedSprites: 49 | - {fileID: 21300000, guid: 3ad57d818b4f448a190e524e494130b0, type: 3} 50 | - {fileID: 21300000, guid: a78208a36b30c404691c2a7719c67300, type: 3} 51 | - {fileID: 21300000, guid: e5a8e8d861f62472d8f99611cf9d12c5, type: 3} 52 | m_PackedSpriteNamesToIndex: 53 | - Light_Frame 54 | - CompositeCanvasRenderer_Demo_Arrow 55 | - Unity-chan 56 | m_Tag: CompositeCanvasRenderer_Demo 57 | m_IsVariant: 0 58 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | # Required secrets 2 | # UNITY_LICENSE: The contents of Unity license file 3 | # UNITY_EMAIL: Unity user email to login 4 | # UNITY_PASSWORD: Unity user password to login 5 | name: 🚀 Deploy 6 | 7 | on: 8 | workflow_call: 9 | secrets: 10 | UNITY_LICENSE: 11 | description: The contents of Unity license file 12 | required: true 13 | workflow_dispatch: 14 | 15 | jobs: 16 | # code-coverage: 17 | # name: 🔍 Code Coverage 18 | # uses: ./.github/workflows/build_code_coverage.yml 19 | # secrets: 20 | # UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} 21 | # permissions: 22 | # contents: read 23 | # checks: write 24 | 25 | demo: 26 | name: 🎮 Demo 27 | uses: ./.github/workflows/build_demo_player.yml 28 | secrets: 29 | UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} 30 | UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} 31 | UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} 32 | permissions: 33 | contents: read 34 | 35 | doc: 36 | name: 📘 Doc 37 | uses: ./.github/workflows/build_documentation.yml 38 | secrets: 39 | UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} 40 | UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} 41 | UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} 42 | permissions: 43 | contents: read 44 | 45 | deploy: 46 | name: 🚀 Deploy 47 | needs: [demo, doc] 48 | runs-on: ubuntu-latest 49 | permissions: 50 | pages: write 51 | id-token: write 52 | steps: 53 | - name: 📦 Download Artifacts To '_site' 54 | uses: actions/download-artifact@v4 55 | with: 56 | path: _site 57 | 58 | - name: 🚚 Move Documentation Files To '_site' 59 | run: | 60 | mv _site/Documentation_* _site/ 61 | rm -r _site/Documentation 62 | 63 | - name: 📦 Upload '_site' 64 | uses: actions/upload-pages-artifact@v3 65 | 66 | - name: 🚀 Deploy To GitHub Pages 67 | uses: actions/deploy-pages@v4 68 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo_Animation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using UnityEngine; 4 | 5 | namespace CompositeCanvas.Demos 6 | { 7 | public class CompositeCanvasRenderer_Demo_Animation : MonoBehaviour 8 | { 9 | [SerializeField] private AnimationType m_AnimationType; 10 | 11 | public float timeScale { get; set; } = 1; 12 | 13 | private void OnEnable() 14 | { 15 | switch (m_AnimationType) 16 | { 17 | case AnimationType.Rotation: 18 | StartCoroutine(Co_Rotate(transform)); 19 | break; 20 | } 21 | } 22 | 23 | private void OnDisable() 24 | { 25 | StopAllCoroutines(); 26 | } 27 | 28 | public void ResetRotation() 29 | { 30 | transform.localRotation = Quaternion.identity; 31 | } 32 | 33 | public void ResetRotation30() 34 | { 35 | transform.localRotation = Quaternion.Euler(new Vector3(0, 30, 0)); 36 | } 37 | 38 | private IEnumerator Co_Rotate(Transform t) 39 | { 40 | while (true) 41 | { 42 | yield return Co_Tween(0, 360, 4, v => t.localRotation = Quaternion.Euler(0, v, 0)); 43 | } 44 | } 45 | 46 | private IEnumerator Co_Tween(float from, float to, float duration, Action callback) 47 | { 48 | var value = from; 49 | var diff = (to - from) / duration; 50 | 51 | callback(value); 52 | 53 | while (0 < diff ? value < to : to < value) 54 | { 55 | yield return null; 56 | 57 | value += diff * Time.deltaTime * timeScale; 58 | callback(0 < diff ? Mathf.Clamp(value, from, to) : Mathf.Clamp(value, to, from)); 59 | } 60 | } 61 | 62 | private enum AnimationType 63 | { 64 | Rotation 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasOutline.cs: -------------------------------------------------------------------------------- 1 | using Coffee.CompositeCanvasRendererInternal; 2 | using CompositeCanvas.Enums; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | namespace CompositeCanvas.Effects 7 | { 8 | [Icon("Packages/com.coffee.composite-canvas-renderer/Editor/CompositeCanvasRendererIcon.png")] 9 | public class CompositeCanvasOutline : CompositeCanvasShadow 10 | { 11 | [SerializeField] 12 | private OutlinePattern m_OutlinePattern = OutlinePattern.x4; 13 | 14 | public OutlinePattern outlinePattern 15 | { 16 | get => m_OutlinePattern; 17 | set 18 | { 19 | if (m_OutlinePattern == value) return; 20 | 21 | m_OutlinePattern = value; 22 | SetRendererVerticesDirty(); 23 | } 24 | } 25 | 26 | /// 27 | /// Call used to modify mesh. 28 | /// Place any custom mesh processing in this function. 29 | /// 30 | public override void ModifyMesh(VertexHelper vh) 31 | { 32 | if (!isActiveAndEnabled) return; 33 | 34 | if (OutlinePattern.x0 == outlinePattern) 35 | { 36 | vh.Clear(); 37 | return; 38 | } 39 | 40 | var count = vh.currentVertCount; 41 | var x = effectDistance.x; 42 | var y = effectDistance.y; 43 | Color32 c = compositeCanvasRenderer.color; 44 | 45 | if (OutlinePattern.x8 <= outlinePattern) 46 | { 47 | ApplyShadowZeroAlloc(true, vh, count, +x, 0, c); 48 | ApplyShadowZeroAlloc(true, vh, count, -x, 0, c); 49 | ApplyShadowZeroAlloc(true, vh, count, 0, +y, c); 50 | ApplyShadowZeroAlloc(true, vh, count, 0, -y, c); 51 | } 52 | 53 | if (OutlinePattern.x4 <= outlinePattern) 54 | { 55 | ApplyShadowZeroAlloc(true, vh, count, +x, -y, c); 56 | ApplyShadowZeroAlloc(true, vh, count, -x, +y, c); 57 | ApplyShadowZeroAlloc(true, vh, count, -x, -y, c); 58 | } 59 | 60 | ApplyShadowZeroAlloc(false, vh, count, +x, +y, c); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Effects/CompositeCanvasEffectBase.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Rendering; 3 | 4 | namespace CompositeCanvas.Effects 5 | { 6 | [ExecuteAlways] 7 | [RequireComponent(typeof(CompositeCanvasRenderer))] 8 | [DisallowMultipleComponent] 9 | public abstract class CompositeCanvasEffectBase : MonoBehaviour 10 | { 11 | private CompositeCanvasRenderer _compositeCanvasRenderer; 12 | 13 | protected CompositeCanvasRenderer compositeCanvasRenderer => 14 | _compositeCanvasRenderer 15 | ? _compositeCanvasRenderer 16 | : _compositeCanvasRenderer = GetComponent(); 17 | 18 | /// 19 | /// Reset to default values. 20 | /// 21 | public virtual void Reset() 22 | { 23 | } 24 | 25 | /// 26 | /// This function is called when the object becomes enabled and active. 27 | /// 28 | protected virtual void OnEnable() 29 | { 30 | SetRendererDirty(); 31 | } 32 | 33 | /// 34 | /// This function is called when the behaviour becomes disabled. 35 | /// 36 | protected virtual void OnDisable() 37 | { 38 | SetRendererDirty(); 39 | } 40 | 41 | /// 42 | /// Editor-only function that Unity calls when the script is loaded or a value changes in the Inspector. 43 | /// 44 | protected virtual void OnValidate() 45 | { 46 | SetRendererDirty(); 47 | } 48 | 49 | public void SetRendererDirty() 50 | { 51 | if (!compositeCanvasRenderer) return; 52 | 53 | compositeCanvasRenderer.SetDirty(false); 54 | } 55 | 56 | public void SetRendererVerticesDirty() 57 | { 58 | if (!compositeCanvasRenderer) return; 59 | 60 | compositeCanvasRenderer.SetVerticesDirty(); 61 | } 62 | 63 | public void SetRendererMaterialDirty() 64 | { 65 | if (!compositeCanvasRenderer) return; 66 | 67 | compositeCanvasRenderer.SetMaterialDirty(); 68 | } 69 | 70 | public abstract void ApplyBakedEffect(CommandBuffer cb); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Assets/Demos/AllocTest/AllocTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using CompositeCanvas; 3 | using UnityEngine; 4 | 5 | public class AllocTest : MonoBehaviour 6 | { 7 | [SerializeField] private GameObject m_Target; 8 | [SerializeField] private bool m_SwitchActivation; 9 | [SerializeField] private bool m_SetDirty; 10 | [SerializeField] private bool m_Translate; 11 | [SerializeField] private bool m_Rotate; 12 | [SerializeField] private bool m_Scale; 13 | 14 | private CompositeCanvasRenderer[] _renderers; 15 | 16 | public bool switchActivation 17 | { 18 | get => m_SwitchActivation; 19 | set => m_SwitchActivation = value; 20 | } 21 | 22 | public bool setDirty 23 | { 24 | get => m_SetDirty; 25 | set => m_SetDirty = value; 26 | } 27 | 28 | private void Start() 29 | { 30 | _renderers = m_Target.GetComponentsInChildren(); 31 | } 32 | 33 | private void Update() 34 | { 35 | if (m_SwitchActivation) 36 | { 37 | m_Target.SetActive(!m_Target.activeSelf); 38 | } 39 | else if (m_SetDirty) 40 | { 41 | if (!m_Target.activeSelf) 42 | { 43 | m_Target.SetActive(true); 44 | } 45 | 46 | foreach (var r in _renderers) 47 | { 48 | r.SetDirty(false); 49 | } 50 | } 51 | 52 | var v = (Mathf.PingPong(Time.timeSinceLevelLoad, 4) - 2) / 2 * Time.deltaTime; 53 | if (m_Translate) 54 | { 55 | m_Target.transform.Translate(v * 100f * Vector3.one); 56 | } 57 | 58 | if (m_Rotate) 59 | { 60 | m_Target.transform.Rotate(v * 100f * Vector3.one); 61 | } 62 | 63 | if (m_Scale) 64 | { 65 | m_Target.transform.localScale = v * 1f * Vector3.one + Vector3.one; 66 | } 67 | } 68 | 69 | public void Clone() 70 | { 71 | StartCoroutine(Co_Clone()); 72 | } 73 | 74 | private IEnumerator Co_Clone() 75 | { 76 | yield return new WaitForSeconds(1); 77 | 78 | var clone = Instantiate(m_Target, m_Target.transform.parent); 79 | clone.SetActive(true); 80 | 81 | yield return new WaitForSeconds(1); 82 | Destroy(clone); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/SpriteExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.U2D; 4 | #if UNITY_EDITOR 5 | using System.Reflection; 6 | #endif 7 | 8 | namespace Coffee.CompositeCanvasRendererInternal 9 | { 10 | /// 11 | /// Extension methods for Sprite class. 12 | /// 13 | internal static class SpriteExtensions 14 | { 15 | #if UNITY_EDITOR 16 | private static readonly Type s_SpriteEditorExtensionType = 17 | Type.GetType("UnityEditor.Experimental.U2D.SpriteEditorExtension, UnityEditor") 18 | ?? Type.GetType("UnityEditor.U2D.SpriteEditorExtension, UnityEditor"); 19 | 20 | private static readonly Func s_GetActiveAtlasTextureMethod = 21 | (Func)Delegate.CreateDelegate(typeof(Func), 22 | s_SpriteEditorExtensionType 23 | .GetMethod("GetActiveAtlasTexture", BindingFlags.Static | BindingFlags.NonPublic)); 24 | 25 | private static readonly Func s_GetActiveAtlasMethod = 26 | (Func)Delegate.CreateDelegate(typeof(Func), 27 | s_SpriteEditorExtensionType 28 | .GetMethod("GetActiveAtlas", BindingFlags.Static | BindingFlags.NonPublic)); 29 | 30 | /// 31 | /// Get the actual texture of a sprite in play mode or edit mode. 32 | /// 33 | public static Texture2D GetActualTexture(this Sprite self) 34 | { 35 | if (!self) return null; 36 | 37 | var ret = s_GetActiveAtlasTextureMethod(self); 38 | return ret ? ret : self.texture; 39 | } 40 | 41 | /// 42 | /// Get the active sprite atlas of a sprite in play mode or edit mode. 43 | /// 44 | public static SpriteAtlas GetActiveAtlas(this Sprite self) 45 | { 46 | if (!self) return null; 47 | 48 | return s_GetActiveAtlasMethod(self); 49 | } 50 | #else 51 | /// 52 | /// Get the actual texture of a sprite in play mode. 53 | /// 54 | internal static Texture2D GetActualTexture(this Sprite self) 55 | { 56 | return self ? self.texture : null; 57 | } 58 | #endif 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Extensions/Color32Extensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEngine.Profiling; 4 | 5 | namespace Coffee.CompositeCanvasRendererInternal 6 | { 7 | internal static class Color32Extensions 8 | { 9 | private static readonly List s_Colors = new List(); 10 | private static byte[] s_LinearToGammaLut; 11 | private static byte[] s_GammaToLinearLut; 12 | 13 | public static byte LinearToGamma(this byte self) 14 | { 15 | if (s_LinearToGammaLut == null) 16 | { 17 | s_LinearToGammaLut = new byte[256]; 18 | for (var i = 0; i < 256; i++) 19 | { 20 | s_LinearToGammaLut[i] = (byte)(Mathf.LinearToGammaSpace(i / 255f) * 255f); 21 | } 22 | } 23 | 24 | return s_LinearToGammaLut[self]; 25 | } 26 | 27 | public static byte GammaToLinear(this byte self) 28 | { 29 | if (s_GammaToLinearLut == null) 30 | { 31 | s_GammaToLinearLut = new byte[256]; 32 | for (var i = 0; i < 256; i++) 33 | { 34 | s_GammaToLinearLut[i] = (byte)(Mathf.GammaToLinearSpace(i / 255f) * 255f); 35 | } 36 | } 37 | 38 | return s_GammaToLinearLut[self]; 39 | } 40 | 41 | public static void LinearToGamma(this Mesh self) 42 | { 43 | Profiler.BeginSample("(COF)[ColorExt] LinearToGamma (Mesh)"); 44 | self.GetColors(s_Colors); 45 | var count = s_Colors.Count; 46 | for (var i = 0; i < count; i++) 47 | { 48 | var c = s_Colors[i]; 49 | c.r = c.r.LinearToGamma(); 50 | c.g = c.g.LinearToGamma(); 51 | c.b = c.b.LinearToGamma(); 52 | s_Colors[i] = c; 53 | } 54 | 55 | self.SetColors(s_Colors); 56 | Profiler.EndSample(); 57 | } 58 | 59 | public static void GammaToLinear(this Mesh self) 60 | { 61 | Profiler.BeginSample("(COF)[ColorExt] GammaToLinear (Mesh)"); 62 | self.GetColors(s_Colors); 63 | var count = s_Colors.Count; 64 | for (var i = 0; i < count; i++) 65 | { 66 | var c = s_Colors[i]; 67 | c.r = c.r.GammaToLinear(); 68 | c.g = c.g.GammaToLinear(); 69 | c.b = c.b.GammaToLinear(); 70 | s_Colors[i] = c; 71 | } 72 | 73 | self.SetColors(s_Colors); 74 | Profiler.EndSample(); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/FastAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Profiling; 5 | 6 | namespace Coffee.CompositeCanvasRendererInternal 7 | { 8 | /// 9 | /// Base class for a fast action. 10 | /// 11 | internal class FastActionBase 12 | { 13 | private static readonly InternalObjectPool> s_NodePool = 14 | new InternalObjectPool>(() => new LinkedListNode(default), _ => true, 15 | x => x.Value = default); 16 | 17 | private readonly LinkedList _delegates = new LinkedList(); 18 | 19 | /// 20 | /// Adds a delegate to the action. 21 | /// 22 | public void Add(T rhs) 23 | { 24 | if (rhs == null) return; 25 | Profiler.BeginSample("(COF)[FastAction] Add Action"); 26 | var node = s_NodePool.Rent(); 27 | node.Value = rhs; 28 | _delegates.AddLast(node); 29 | Profiler.EndSample(); 30 | } 31 | 32 | /// 33 | /// Removes a delegate from the action. 34 | /// 35 | public void Remove(T rhs) 36 | { 37 | if (rhs == null) return; 38 | Profiler.BeginSample("(COF)[FastAction] Remove Action"); 39 | var node = _delegates.Find(rhs); 40 | if (node != null) 41 | { 42 | _delegates.Remove(node); 43 | s_NodePool.Return(ref node); 44 | } 45 | 46 | Profiler.EndSample(); 47 | } 48 | 49 | /// 50 | /// Invokes the action with a callback function. 51 | /// 52 | protected void Invoke(Action callback) 53 | { 54 | var node = _delegates.First; 55 | while (node != null) 56 | { 57 | try 58 | { 59 | callback(node.Value); 60 | } 61 | catch (Exception e) 62 | { 63 | Debug.LogException(e); 64 | } 65 | 66 | node = node.Next; 67 | } 68 | } 69 | 70 | public void Clear() 71 | { 72 | _delegates.Clear(); 73 | } 74 | } 75 | 76 | /// 77 | /// A fast action without parameters. 78 | /// 79 | internal class FastAction : FastActionBase 80 | { 81 | /// 82 | /// Invoke all the registered delegates. 83 | /// 84 | public void Invoke() 85 | { 86 | Invoke(action => action.Invoke()); 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 41 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 42 | - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0} 43 | - {fileID: 4800000, guid: b0bf655e949c44179be80f397d04532d, type: 3} 44 | - {fileID: 4800000, guid: 9a9c5583f6b4e48608974061880dfa13, type: 3} 45 | m_PreloadedShaders: [] 46 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 47 | type: 0} 48 | m_CustomRenderPipeline: {fileID: 0} 49 | m_TransparencySortMode: 0 50 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 51 | m_DefaultRenderingPath: 1 52 | m_DefaultMobileRenderingPath: 1 53 | m_TierSettings: [] 54 | m_LightmapStripping: 0 55 | m_FogStripping: 0 56 | m_InstancingStripping: 0 57 | m_LightmapKeepPlain: 1 58 | m_LightmapKeepDirCombined: 1 59 | m_LightmapKeepDynamicPlain: 1 60 | m_LightmapKeepDynamicDirCombined: 1 61 | m_LightmapKeepShadowMask: 1 62 | m_LightmapKeepSubtractive: 1 63 | m_FogKeepLinear: 1 64 | m_FogKeepExp: 1 65 | m_FogKeepExp2: 1 66 | m_AlbedoSwatchInfos: [] 67 | m_LightsUseLinearIntensity: 0 68 | m_LightsUseColorTemperature: 0 69 | m_LogWhenShaderIsCompiled: 0 70 | m_AllowEnlightenSupportForUpgradedProject: 0 71 | -------------------------------------------------------------------------------- /Packages/src/Shaders/Hidden-UI-CompositeCanvasRenderer-Blur.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/UI/CompositeCanvasRenderer/Blur" 2 | { 3 | Properties 4 | { 5 | [PerRendererData] _MainTex("Main Texture", 2D) = "white" {} 6 | } 7 | 8 | SubShader 9 | { 10 | ZTest Always 11 | Cull Off 12 | ZWrite Off 13 | Blend One Zero 14 | Fog 15 | { 16 | Mode Off 17 | } 18 | 19 | Pass 20 | { 21 | Name "Blur" 22 | 23 | CGPROGRAM 24 | #pragma vertex vert_img 25 | #pragma fragment frag_blur 26 | #pragma target 2.0 27 | 28 | #include "UnityCG.cginc" 29 | 30 | sampler2D _MainTex; 31 | float4 _MainTex_TexelSize; 32 | half4 _Blur; 33 | 34 | fixed4 tex2DBlurring1D(sampler2D tex, half2 uv, half2 blur) 35 | { 36 | const int KERNEL_SIZE = 9; 37 | float4 o = 0; 38 | float sum = 0; 39 | for (int i = -KERNEL_SIZE / 2; i <= KERNEL_SIZE / 2; i++) 40 | { 41 | const half2 sample_uv = half2(uv + blur * i); 42 | const float weight = 1.0 / (abs(i) + 2); 43 | o += tex2D(tex, sample_uv) * weight; 44 | sum += weight; 45 | } 46 | return o / sum; 47 | } 48 | 49 | float invLerp(const float from, const float to, const float value) 50 | { 51 | return saturate(max(0, value - from) / max(0.000000001, to - from)); 52 | } 53 | 54 | fixed4 frag_blur(v2f_img IN) : SV_Target 55 | { 56 | const half2 blur_factor = _Blur.xy; 57 | return tex2DBlurring1D(_MainTex, IN.uv, blur_factor * _MainTex_TexelSize.xy); 58 | } 59 | ENDCG 60 | } 61 | 62 | Pass 63 | { 64 | Name "Cutoff" 65 | 66 | CGPROGRAM 67 | #pragma vertex vert_img 68 | #pragma fragment frag 69 | #pragma target 2.0 70 | 71 | #include "UnityCG.cginc" 72 | 73 | sampler2D _MainTex; 74 | float _InnerCutoff; 75 | float _Multiplier; 76 | float _Power; 77 | float _Limit; 78 | 79 | float invLerp(const float from, const float to, const float value) 80 | { 81 | return (max(0, value - from) / max(0.000000001, to - from)); 82 | } 83 | 84 | fixed4 frag(v2f_img IN) : SV_Target 85 | { 86 | half4 color = tex2D(_MainTex, IN.uv); 87 | color = pow(color, _Power); 88 | 89 | const half inner = invLerp(_InnerCutoff, 1, color.a); 90 | color *= lerp(_Multiplier, 0, inner); 91 | 92 | color = min(color, _Limit); 93 | return color; 94 | } 95 | ENDCG 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.coffee.composite-canvas-renderer": { 4 | "version": "file:src", 5 | "depth": 0, 6 | "source": "embedded", 7 | "dependencies": { 8 | "com.unity.ugui": "1.0.0" 9 | } 10 | }, 11 | "com.coffee.development": { 12 | "version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/Development", 13 | "depth": 0, 14 | "source": "git", 15 | "dependencies": {}, 16 | "hash": "3c280f1a8f4db5038b881ff07f270efd9638fa31" 17 | }, 18 | "com.coffee.nano-monitor": { 19 | "version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor", 20 | "depth": 0, 21 | "source": "git", 22 | "dependencies": { 23 | "com.unity.ugui": "1.0.0" 24 | }, 25 | "hash": "3c280f1a8f4db5038b881ff07f270efd9638fa31" 26 | }, 27 | "com.unity.ext.nunit": { 28 | "version": "2.0.3", 29 | "depth": 1, 30 | "source": "registry", 31 | "dependencies": {}, 32 | "url": "https://packages.unity.com" 33 | }, 34 | "com.unity.ide.rider": { 35 | "version": "3.0.36", 36 | "depth": 0, 37 | "source": "registry", 38 | "dependencies": { 39 | "com.unity.ext.nunit": "1.0.6" 40 | }, 41 | "url": "https://packages.unity.com" 42 | }, 43 | "com.unity.ide.visualstudio": { 44 | "version": "2.0.22", 45 | "depth": 0, 46 | "source": "registry", 47 | "dependencies": { 48 | "com.unity.test-framework": "1.1.9" 49 | }, 50 | "url": "https://packages.unity.com" 51 | }, 52 | "com.unity.test-framework": { 53 | "version": "1.3.9", 54 | "depth": 0, 55 | "source": "registry", 56 | "dependencies": { 57 | "com.unity.ext.nunit": "2.0.3", 58 | "com.unity.modules.imgui": "1.0.0", 59 | "com.unity.modules.jsonserialize": "1.0.0" 60 | }, 61 | "url": "https://packages.unity.com" 62 | }, 63 | "com.unity.textmeshpro": { 64 | "version": "3.0.6", 65 | "depth": 0, 66 | "source": "registry", 67 | "dependencies": { 68 | "com.unity.ugui": "1.0.0" 69 | }, 70 | "url": "https://packages.unity.com" 71 | }, 72 | "com.unity.ugui": { 73 | "version": "1.0.0", 74 | "depth": 1, 75 | "source": "builtin", 76 | "dependencies": { 77 | "com.unity.modules.ui": "1.0.0", 78 | "com.unity.modules.imgui": "1.0.0" 79 | } 80 | }, 81 | "com.unity.modules.imgui": { 82 | "version": "1.0.0", 83 | "depth": 1, 84 | "source": "builtin", 85 | "dependencies": {} 86 | }, 87 | "com.unity.modules.jsonserialize": { 88 | "version": "1.0.0", 89 | "depth": 1, 90 | "source": "builtin", 91 | "dependencies": {} 92 | }, 93 | "com.unity.modules.ui": { 94 | "version": "1.0.0", 95 | "depth": 2, 96 | "source": "builtin", 97 | "dependencies": {} 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Scripts/CompositeCanvasRenderer_Demo_Signal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Coffee.CompositeCanvasRendererInternal; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | #if UNITY_EDITOR 6 | using UnityEditor; 7 | using UnityEditor.UI; 8 | #endif 9 | 10 | namespace CompositeCanvas.Demos 11 | { 12 | [DefaultExecutionOrder(32000)] 13 | public class CompositeCanvasRenderer_Demo_Signal : RawImage 14 | { 15 | [SerializeField] private CompositeCanvasRenderer m_CompositeCanvasRenderer; 16 | [SerializeField] private Mode m_Mode; 17 | 18 | private Action _checkDirty; 19 | public static int bakedCount { get; private set; } 20 | 21 | protected override void OnEnable() 22 | { 23 | base.OnEnable(); 24 | if (!Application.isPlaying) return; 25 | 26 | _checkDirty = _checkDirty ?? CheckDirty; 27 | UIExtraCallbacks.onBeforeCanvasRebuild += _checkDirty; 28 | } 29 | 30 | protected override void OnDisable() 31 | { 32 | base.OnDisable(); 33 | UIExtraCallbacks.onBeforeCanvasRebuild -= _checkDirty; 34 | canvasRenderer.SetAlpha(1); 35 | } 36 | 37 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] 38 | private static void InitializeOnLoad() 39 | { 40 | bakedCount = 0; 41 | CompositeCanvasRenderer.onBaked += _ => bakedCount++; 42 | } 43 | 44 | private void CheckDirty() 45 | { 46 | if (!canvasRenderer || !m_CompositeCanvasRenderer) return; 47 | 48 | switch (m_Mode) 49 | { 50 | case Mode.Baking: 51 | canvasRenderer.SetAlpha(m_CompositeCanvasRenderer.isDirty ? 1 : 0); 52 | break; 53 | case Mode.Perspective: 54 | canvasRenderer.SetAlpha(m_CompositeCanvasRenderer.perspectiveBaking ? 1 : 0); 55 | break; 56 | } 57 | } 58 | 59 | private enum Mode 60 | { 61 | Baking, 62 | Perspective 63 | } 64 | 65 | #if UNITY_EDITOR 66 | [CustomEditor(typeof(CompositeCanvasRenderer_Demo_Signal))] 67 | private class Editor : RawImageEditor 68 | { 69 | private SerializedProperty _compositeCanvasRenderer; 70 | private SerializedProperty _mode; 71 | 72 | protected override void OnEnable() 73 | { 74 | base.OnEnable(); 75 | 76 | _compositeCanvasRenderer = serializedObject.FindProperty("m_CompositeCanvasRenderer"); 77 | _mode = serializedObject.FindProperty("m_Mode"); 78 | } 79 | 80 | public override void OnInspectorGUI() 81 | { 82 | base.OnInspectorGUI(); 83 | 84 | EditorGUILayout.PropertyField(_compositeCanvasRenderer); 85 | EditorGUILayout.PropertyField(_mode); 86 | 87 | serializedObject.ApplyModifiedProperties(); 88 | } 89 | } 90 | #endif 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/AlwaysIncludedShadersProxy.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using UnityEditor; 5 | using UnityEngine; 6 | using UnityEngine.Rendering; 7 | 8 | namespace Coffee.CompositeCanvasRendererInternal 9 | { 10 | internal static class AlwaysIncludedShadersProxy 11 | { 12 | private static GraphicsSettings s_GraphicsSettings; 13 | 14 | private static SerializedProperty GetSerializedProperty() 15 | { 16 | if (!s_GraphicsSettings) 17 | { 18 | s_GraphicsSettings = typeof(GraphicsSettings).GetMethod("GetGraphicsSettings", 19 | BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public) 20 | ?.Invoke(null, null) as GraphicsSettings; 21 | } 22 | 23 | return new SerializedObject(s_GraphicsSettings).FindProperty("m_AlwaysIncludedShaders"); 24 | } 25 | 26 | public static IEnumerable GetShaders() 27 | { 28 | var sp = GetSerializedProperty(); 29 | for (var i = 0; i < sp.arraySize; i++) 30 | { 31 | if (sp.GetArrayElementAtIndex(i).objectReferenceValue is Shader shader) 32 | { 33 | yield return shader; 34 | } 35 | } 36 | } 37 | 38 | public static void Remove(Shader shader) 39 | { 40 | var sp = GetSerializedProperty(); 41 | for (var i = 0; i < sp.arraySize; i++) 42 | { 43 | if (sp.GetArrayElementAtIndex(i).objectReferenceValue == shader) 44 | { 45 | sp.DeleteArrayElementAtIndex(i); 46 | } 47 | } 48 | 49 | ShrinkArray(sp); 50 | sp.serializedObject.ApplyModifiedProperties(); 51 | } 52 | 53 | public static void Add(Shader shader) 54 | { 55 | var sp = GetSerializedProperty(); 56 | for (var i = 0; i < sp.arraySize; i++) 57 | { 58 | if (sp.GetArrayElementAtIndex(i).objectReferenceValue == shader) 59 | { 60 | return; 61 | } 62 | } 63 | 64 | var index = sp.arraySize; 65 | sp.InsertArrayElementAtIndex(index); 66 | sp.GetArrayElementAtIndex(index).objectReferenceValue = shader; 67 | ShrinkArray(sp); 68 | sp.serializedObject.ApplyModifiedProperties(); 69 | } 70 | 71 | private static void ShrinkArray(SerializedProperty sp) 72 | { 73 | var removed = 0; 74 | for (var i = 0; i < sp.arraySize; i++) 75 | { 76 | if (!sp.GetArrayElementAtIndex(i).objectReferenceValue) 77 | { 78 | removed++; 79 | } 80 | else if (0 < removed) 81 | { 82 | sp.MoveArrayElement(i, i - removed); 83 | } 84 | } 85 | 86 | sp.arraySize -= removed; 87 | } 88 | } 89 | } 90 | #endif 91 | -------------------------------------------------------------------------------- /Assets/Demos/Noise/UI-CompositeCanvasRenderer-DigitalNoise.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: UI-CompositeCanvasRenderer-DigitalNoise 11 | m_Shader: {fileID: 4800000, guid: fcd72f6ffd25c462ba7224612e23da75, type: 3} 12 | m_ValidKeywords: 13 | - ENABLE_ERROR 14 | - ENABLE_GLITCH 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_SavedProperties: 23 | serializedVersion: 3 24 | m_TexEnvs: 25 | - _BumpMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailAlbedoMap: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailMask: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _DetailNormalMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _EmissionMap: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MainTex: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _MetallicGlossMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _OcclusionMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _ParallaxMap: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | m_Ints: [] 62 | m_Floats: 63 | - _BlockScale: 50 64 | - _BumpScale: 1 65 | - _ColorMask: 15 66 | - _Cutoff: 0.5 67 | - _DetailNormalMapScale: 1 68 | - _DstBlend: 1 69 | - _ERROR: 1 70 | - _ErrorFrequency: 0.066 71 | - _ErrorProbability: 0.007 72 | - _GLITCH: 1 73 | - _GlitchDivision: 50 74 | - _GlitchFrequency: 324 75 | - _GlitchIntensity: 0.031 76 | - _GlitchProbability: 1 77 | - _GlossMapScale: 1 78 | - _Glossiness: 0.5 79 | - _GlossyReflections: 1 80 | - _Metallic: 0 81 | - _Mode: 0 82 | - _NoiseFrequency: 100 83 | - _NoiseSpeed: 100 84 | - _OcclusionStrength: 1 85 | - _Parallax: 0.02 86 | - _SmoothnessTextureChannel: 0 87 | - _SpecularHighlights: 1 88 | - _SrcBlend: 1 89 | - _Stencil: 0 90 | - _StencilComp: 8 91 | - _StencilOp: 0 92 | - _StencilReadMask: 255 93 | - _StencilWriteMask: 255 94 | - _Threshold: 0 95 | - _UVSec: 0 96 | - _UseUIAlphaClip: 0 97 | - _ZWrite: 1 98 | m_Colors: 99 | - _Color: {r: 1, g: 1, b: 1, a: 1} 100 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 101 | - _ErrorColor: {r: 1, g: 0, b: 0.8144698, a: 1} 102 | m_BuildTextureStacks: [] 103 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/SeamlessPattern_1.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d50cd6b25f794229912604ade851a94 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: 1 36 | mipBias: 0 37 | wrapU: 0 38 | wrapV: 0 39 | wrapW: 0 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | - serializedVersion: 3 87 | buildTarget: WebGL 88 | maxTextureSize: 2048 89 | resizeAlgorithm: 0 90 | textureFormat: -1 91 | textureCompression: 1 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 0 96 | androidETC2FallbackOverride: 0 97 | forceMaximumCompressionQuality_BC6H_BC7: 0 98 | spriteSheet: 99 | serializedVersion: 2 100 | sprites: [] 101 | outline: [] 102 | physicsShape: [] 103 | bones: [] 104 | spriteID: 105 | internalID: 0 106 | vertices: [] 107 | indices: 108 | edges: [] 109 | weights: [] 110 | secondaryTextures: [] 111 | spritePackingTag: 112 | pSDRemoveMatte: 0 113 | pSDShowRemoveMatteOption: 0 114 | userData: 115 | assetBundleName: 116 | assetBundleVariant: 117 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/SeamlessPattern_2.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96ae1cec6c34b485eb9dee398de9b482 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: 1 36 | mipBias: 0 37 | wrapU: 0 38 | wrapV: 0 39 | wrapW: 0 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 2 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | - serializedVersion: 3 87 | buildTarget: WebGL 88 | maxTextureSize: 2048 89 | resizeAlgorithm: 0 90 | textureFormat: -1 91 | textureCompression: 1 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 0 96 | androidETC2FallbackOverride: 0 97 | forceMaximumCompressionQuality_BC6H_BC7: 0 98 | spriteSheet: 99 | serializedVersion: 2 100 | sprites: [] 101 | outline: [] 102 | physicsShape: [] 103 | bones: [] 104 | spriteID: 105 | internalID: 0 106 | vertices: [] 107 | indices: 108 | edges: [] 109 | weights: [] 110 | secondaryTextures: [] 111 | spritePackingTag: 112 | pSDRemoveMatte: 0 113 | pSDShowRemoveMatteOption: 0 114 | userData: 115 | assetBundleName: 116 | assetBundleVariant: 117 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Textures/Light_Frame.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ad57d818b4f448a190e524e494130b0 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: 1 36 | mipBias: 0 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 0 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 0 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 0 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | - serializedVersion: 3 87 | buildTarget: WebGL 88 | maxTextureSize: 2048 89 | resizeAlgorithm: 0 90 | textureFormat: -1 91 | textureCompression: 1 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 0 96 | androidETC2FallbackOverride: 0 97 | forceMaximumCompressionQuality_BC6H_BC7: 0 98 | spriteSheet: 99 | serializedVersion: 2 100 | sprites: [] 101 | outline: [] 102 | physicsShape: [] 103 | bones: [] 104 | spriteID: 5e97eb03825dee720800000000000000 105 | internalID: 0 106 | vertices: [] 107 | indices: 108 | edges: [] 109 | weights: [] 110 | secondaryTextures: [] 111 | spritePackingTag: 112 | pSDRemoveMatte: 0 113 | pSDShowRemoveMatteOption: 0 114 | userData: 115 | assetBundleName: 116 | assetBundleVariant: 117 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Textures/Unity-chan.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5a8e8d861f62472d8f99611cf9d12c5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: 1 36 | mipBias: 0 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 0 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 0 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 0 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | - serializedVersion: 3 87 | buildTarget: WebGL 88 | maxTextureSize: 2048 89 | resizeAlgorithm: 0 90 | textureFormat: -1 91 | textureCompression: 1 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 0 96 | androidETC2FallbackOverride: 0 97 | forceMaximumCompressionQuality_BC6H_BC7: 0 98 | spriteSheet: 99 | serializedVersion: 2 100 | sprites: [] 101 | outline: [] 102 | physicsShape: [] 103 | bones: [] 104 | spriteID: 5e97eb03825dee720800000000000000 105 | internalID: 0 106 | vertices: [] 107 | indices: 108 | edges: [] 109 | weights: [] 110 | secondaryTextures: [] 111 | spritePackingTag: 112 | pSDRemoveMatte: 0 113 | pSDShowRemoveMatteOption: 0 114 | userData: 115 | assetBundleName: 116 | assetBundleVariant: 117 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Wave.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: UI-Wave 11 | m_Shader: {fileID: 4800000, guid: b0bf655e949c44179be80f397d04532d, type: 3} 12 | m_ShaderKeywords: ENABLE_UV_ANIMATION 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MaskTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _OcclusionMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ParallaxMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _UvTex: 67 | m_Texture: {fileID: 2800000, guid: 6d50cd6b25f794229912604ade851a94, type: 3} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - Color_Mode: 0 72 | - _BumpScale: 1 73 | - _ColorMask: 15 74 | - _ColorMode: 0 75 | - _Cutoff: 0.5 76 | - _DETAIL: 0 77 | - _DetailNormalMapScale: 1 78 | - _DstBlend: 10 79 | - _GlossMapScale: 1 80 | - _Glossiness: 0.5 81 | - _GlossyReflections: 1 82 | - _MASK: 0 83 | - _MaskThreshold: 0 84 | - _Metallic: 0 85 | - _Mode: 0 86 | - _OcclusionStrength: 1 87 | - _Parallax: 0.02 88 | - _SmoothnessTextureChannel: 0 89 | - _SpecularHighlights: 1 90 | - _SrcBlend: 1 91 | - _Stencil: 0 92 | - _StencilComp: 8 93 | - _StencilOp: 0 94 | - _StencilReadMask: 255 95 | - _StencilWriteMask: 255 96 | - _UVSec: 0 97 | - _UV_ANIMATION: 1 98 | - _UseUIAlphaClip: 0 99 | - _UvModifier: 0.075 100 | - _ZWrite: 1 101 | m_Colors: 102 | - _Color: {r: 1, g: 1, b: 1, a: 1} 103 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 104 | - _MaskSpeed: {r: 0, g: 0, b: 0, a: 0} 105 | - _UvSpeed: {r: 0.1, g: 0.1, b: 0, a: 0} 106 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Textures/CompositeCanvasRenderer_Demo_Arrow.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a78208a36b30c404691c2a7719c67300 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: 1 36 | mipBias: 0 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 0 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 0 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | - serializedVersion: 3 87 | buildTarget: WebGL 88 | maxTextureSize: 2048 89 | resizeAlgorithm: 0 90 | textureFormat: -1 91 | textureCompression: 1 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 0 96 | androidETC2FallbackOverride: 0 97 | forceMaximumCompressionQuality_BC6H_BC7: 0 98 | spriteSheet: 99 | serializedVersion: 2 100 | sprites: [] 101 | outline: [] 102 | physicsShape: [] 103 | bones: [] 104 | spriteID: 5e97eb03825dee720800000000000000 105 | internalID: 0 106 | vertices: [] 107 | indices: 108 | edges: [] 109 | weights: [] 110 | secondaryTextures: [] 111 | spritePackingTag: 112 | pSDRemoveMatte: 0 113 | pSDShowRemoveMatteOption: 0 114 | userData: 115 | assetBundleName: 116 | assetBundleVariant: 117 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-AnimatedGrow.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: UI-AnimatedGrow 11 | m_Shader: {fileID: 4800000, guid: b0bf655e949c44179be80f397d04532d, type: 3} 12 | m_ShaderKeywords: ENABLE_UV_ANIMATION 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MaskTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _OcclusionMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ParallaxMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _UvTex: 67 | m_Texture: {fileID: 2800000, guid: 6d50cd6b25f794229912604ade851a94, type: 3} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - Color_Mode: 0 72 | - _BumpScale: 1 73 | - _ColorMask: 15 74 | - _ColorMode: 3 75 | - _Cutoff: 0.5 76 | - _DETAIL: 0 77 | - _DetailNormalMapScale: 1 78 | - _DstBlend: 1 79 | - _GlossMapScale: 1 80 | - _Glossiness: 0.5 81 | - _GlossyReflections: 1 82 | - _MASK: 0 83 | - _MaskThreshold: 0 84 | - _Metallic: 0 85 | - _Mode: 0 86 | - _OcclusionStrength: 1 87 | - _Parallax: 0.02 88 | - _SmoothnessTextureChannel: 0 89 | - _SpecularHighlights: 1 90 | - _SrcBlend: 1 91 | - _Stencil: 0 92 | - _StencilComp: 8 93 | - _StencilOp: 0 94 | - _StencilReadMask: 255 95 | - _StencilWriteMask: 255 96 | - _UVSec: 0 97 | - _UV_ANIMATION: 1 98 | - _UseUIAlphaClip: 0 99 | - _UvModifier: 0.05 100 | - _ZWrite: 1 101 | m_Colors: 102 | - _Color: {r: 1, g: 1, b: 1, a: 1} 103 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 104 | - _MaskSpeed: {r: 0, g: 0, b: 0, a: 0} 105 | - _UvSpeed: {r: 0, g: -0.2, b: 0, a: 0} 106 | -------------------------------------------------------------------------------- /Assets/Demos/Noise/UI-CompositeCanvasRenderer-AnalogNoise.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: UI-CompositeCanvasRenderer-AnalogNoise 11 | m_Shader: {fileID: 4800000, guid: 9de0ad79923d849cbbb67c136034b9f2, type: 3} 12 | m_ValidKeywords: 13 | - ENABLE_RGB_SHIFT 14 | - ENABLE_VIGNETTE 15 | m_InvalidKeywords: 16 | - NOISE 17 | - RGB_SHIFT 18 | m_LightmapFlags: 4 19 | m_EnableInstancingVariants: 0 20 | m_DoubleSidedGI: 0 21 | m_CustomRenderQueue: -1 22 | stringTagMap: {} 23 | disabledShaderPasses: [] 24 | m_SavedProperties: 25 | serializedVersion: 3 26 | m_TexEnvs: 27 | - _BumpMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailAlbedoMap: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailMask: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _DetailNormalMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _EmissionMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MainTex: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _MetallicGlossMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _OcclusionMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _ParallaxMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | m_Ints: [] 64 | m_Floats: 65 | - _BumpScale: 1 66 | - _ColorMask: 15 67 | - _Cutoff: 0.5 68 | - _DISTORTION: 0 69 | - _DetailNormalMapScale: 1 70 | - _DistortionIntensity: 1 71 | - _DistortionScale: 1.12 72 | - _DstBlend: 10 73 | - _DstBlendMode: 10 74 | - _GlossMapScale: 1 75 | - _Glossiness: 0.5 76 | - _GlossyReflections: 1 77 | - _Metallic: 0 78 | - _Mode: 0 79 | - _NOISE: 0 80 | - _NoiseIntensity: 1 81 | - _NoiseScale: 1 82 | - _OcclusionStrength: 1 83 | - _Parallax: 0.02 84 | - _RGB_SHIFT: 1 85 | - _RgbShiftIntensity: 0.121 86 | - _RgbShiftOffsetX: 1 87 | - _RgbShiftOffsetY: 1 88 | - _SCANNING_LINE: 0 89 | - _Scale: 1.1 90 | - _ScanningLineFrequency: 300 91 | - _ScanningLineIntensity: 0.238 92 | - _SmoothnessTextureChannel: 0 93 | - _SpecularHighlights: 1 94 | - _SrcBlend: 1 95 | - _SrcBlendMode: 1 96 | - _Stencil: 0 97 | - _StencilComp: 8 98 | - _StencilOp: 0 99 | - _StencilReadMask: 255 100 | - _StencilWriteMask: 255 101 | - _UVSec: 0 102 | - _UseUIAlphaClip: 0 103 | - _VIGNETTE: 1 104 | - _VignetteIntensity: 1 105 | - _ZWrite: 1 106 | m_Colors: 107 | - _Color: {r: 1, g: 1, b: 1, a: 1} 108 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 109 | m_BuildTextureStacks: [] 110 | -------------------------------------------------------------------------------- /Assets/Demos/Readme/UI-Wave-Fill-Additive.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: UI-Wave-Fill-Additive 11 | m_Shader: {fileID: 4800000, guid: b0bf655e949c44179be80f397d04532d, type: 3} 12 | m_ShaderKeywords: COLOR_MODE_FILL ENABLE_UV_ANIMATION 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MaskTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _OcclusionMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ParallaxMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _UvTex: 67 | m_Texture: {fileID: 2800000, guid: 6d50cd6b25f794229912604ade851a94, type: 3} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - Color_Mode: 3 72 | - _BumpScale: 1 73 | - _ColorMask: 15 74 | - _ColorMode: 0 75 | - _Cutoff: 0.5 76 | - _DETAIL: 0 77 | - _DetailNormalMapScale: 1 78 | - _DstBlend: 1 79 | - _GlossMapScale: 1 80 | - _Glossiness: 0.5 81 | - _GlossyReflections: 1 82 | - _MASK: 0 83 | - _MaskThreshold: 0 84 | - _Metallic: 0 85 | - _Mode: 0 86 | - _OcclusionStrength: 1 87 | - _Parallax: 0.02 88 | - _SmoothnessTextureChannel: 0 89 | - _SpecularHighlights: 1 90 | - _SrcBlend: 1 91 | - _Stencil: 0 92 | - _StencilComp: 8 93 | - _StencilOp: 0 94 | - _StencilReadMask: 255 95 | - _StencilWriteMask: 255 96 | - _UVSec: 0 97 | - _UV_ANIMATION: 1 98 | - _UseUIAlphaClip: 0 99 | - _UvModifier: 0.075 100 | - _ZWrite: 1 101 | m_Colors: 102 | - _Color: {r: 1, g: 1, b: 1, a: 1} 103 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 104 | - _MaskSpeed: {r: 0, g: 0, b: 0, a: 0} 105 | - _UvSpeed: {r: 0.1, g: 0.1, b: 0, a: 0} 106 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Wave-Fill.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: UI-Wave-Fill 11 | m_Shader: {fileID: 4800000, guid: b0bf655e949c44179be80f397d04532d, type: 3} 12 | m_ShaderKeywords: COLOR_MODE_FILL ENABLE_UV_ANIMATION 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MaskTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _OcclusionMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ParallaxMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _UvTex: 67 | m_Texture: {fileID: 2800000, guid: 6d50cd6b25f794229912604ade851a94, type: 3} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - Color_Mode: 3 72 | - _BumpScale: 1 73 | - _ColorMask: 15 74 | - _ColorMode: 0 75 | - _Cutoff: 0.5 76 | - _DETAIL: 0 77 | - _DetailNormalMapScale: 1 78 | - _DstBlend: 10 79 | - _GlossMapScale: 1 80 | - _Glossiness: 0.5 81 | - _GlossyReflections: 1 82 | - _MASK: 0 83 | - _MaskThreshold: 0 84 | - _Metallic: 0 85 | - _Mode: 0 86 | - _OcclusionStrength: 1 87 | - _Parallax: 0.02 88 | - _SmoothnessTextureChannel: 0 89 | - _SpecularHighlights: 1 90 | - _SrcBlend: 1 91 | - _Stencil: 0 92 | - _StencilComp: 8 93 | - _StencilOp: 0 94 | - _StencilReadMask: 255 95 | - _StencilWriteMask: 255 96 | - _UVSec: 0 97 | - _UV_ANIMATION: 1 98 | - _UseUIAlphaClip: 0 99 | - _UvModifier: 0.075 100 | - _ZWrite: 1 101 | m_Colors: 102 | - _Color: {r: 1, g: 1, b: 1, a: 1} 103 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 104 | - _MaskSpeed: {r: 0, g: 0, b: 0, a: 0} 105 | - _UvSpeed: {r: 0.1, g: 0.1, b: 0, a: 0} 106 | -------------------------------------------------------------------------------- /Documentation/custom/styles/version-selector.css: -------------------------------------------------------------------------------- 1 | .subnav .container { 2 | display: flex; 3 | align-items: center; 4 | } 5 | 6 | .component-select { 7 | min-width: 200px; 8 | width: fit-content; 9 | width: -moz-fit-content; 10 | position: relative; 11 | margin: 5px; } 12 | .component-select__current, .component-select__options { 13 | border-radius: 4px; } 14 | .component-select__current { 15 | font-size: 15px; 16 | line-height: 24px; 17 | background-color: rgba(0, 0, 0, 0.09); 18 | color: rgba(0, 0, 0, 0.54); 19 | height: 35px; 20 | padding: 5px 30px 5px 10px; 21 | cursor: pointer; 22 | -webkit-user-select: none; 23 | -moz-user-select: none; 24 | -ms-user-select: none; 25 | user-select: none; 26 | position: relative; 27 | white-space: nowrap; 28 | text-overflow: ellipsis; 29 | overflow: hidden; } 30 | .component-select__current::after { 31 | font-size: 24px; 32 | font-size: 1.5rem; 33 | display: block; 34 | font-family: 'Roboto', sans-serif; 35 | content: 'V'; 36 | position: absolute; 37 | top: 6px; 38 | right: 10px; 39 | -webkit-transition: -webkit-transform 0.25s ease-in-out; 40 | transition: -webkit-transform 0.25s ease-in-out; 41 | transition: transform 0.25s ease-in-out; 42 | transition: transform 0.25s ease-in-out, -webkit-transform 0.25s ease-in-out; } 43 | .component-select__current--is-active { 44 | color: #2196f3; 45 | background-color: #e3eff8; } 46 | .component-select__current--is-active::after { 47 | -webkit-transform: rotate(180deg); 48 | transform: rotate(180deg); } 49 | .component-select__current--is-disabled { 50 | cursor: default; } 51 | .component-select__current--is-disabled::after { 52 | display: none; } 53 | .component-select__options-container { 54 | display: none; 55 | position: absolute; 56 | left: 0; 57 | right: 0; 58 | margin: 1px 0 0; 59 | padding: 0; 60 | list-style-type: none; 61 | background: #ffffff; 62 | -webkit-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 5px 0 rgba(0, 0, 0, 0.1); 63 | box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 5px 0 rgba(0, 0, 0, 0.1); 64 | border-radius: 4px; } 65 | .component-select .component-select__current--is-active + .component-select__options-container { 66 | display: block; 67 | z-index: 1; } 68 | .component-select__option { 69 | font-size: 15px; 70 | display: -webkit-box; 71 | display: -ms-flexbox; 72 | display: flex; 73 | -webkit-box-align: center; 74 | -ms-flex-align: center; 75 | align-items: center; 76 | padding: 8px 10px; 77 | cursor: pointer; 78 | -webkit-user-select: none; 79 | -moz-user-select: none; 80 | -ms-user-select: none; 81 | user-select: none; } 82 | .component-select__option:hover { 83 | background-color: #ededed; } 84 | .component-select__option::before { 85 | display: none; } 86 | .component-select__option--is-active { 87 | background-color: #e3eff8; } 88 | 89 | #version-select-ul{ 90 | overflow-y: auto; 91 | max-height: 300px; 92 | } 93 | 94 | #version-select { 95 | display: inline-block; 96 | display: -webkit-inline-box; 97 | } -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Multiply.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: UI-Multiply 11 | m_Shader: {fileID: 4800000, guid: b0bf655e949c44179be80f397d04532d, type: 3} 12 | m_ShaderKeywords: COLORMODE_ADDITIVE COLOR_MODE_MULTIPRY _COLORMODE_MULTIPRY 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MaskTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _OcclusionMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ParallaxMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _UvTex: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - ColorMode: 1 72 | - Color_Mode: 0 73 | - _BumpScale: 1 74 | - _COLORMODE_ADDITIVE: 0 75 | - _ColorMask: 15 76 | - _ColorMode: 0 77 | - _Cutoff: 0.5 78 | - _DetailNormalMapScale: 1 79 | - _DstBlend: 10 80 | - _DstBlendMode: 10 81 | - _GlossMapScale: 1 82 | - _Glossiness: 0.5 83 | - _GlossyReflections: 1 84 | - _MASK: 0 85 | - _Metallic: 0 86 | - _Mode: 0 87 | - _OcclusionStrength: 1 88 | - _Parallax: 0.02 89 | - _SmoothnessTextureChannel: 0 90 | - _SpecularHighlights: 1 91 | - _SrcBlend: 1 92 | - _SrcBlendMode: 1 93 | - _Stencil: 0 94 | - _StencilComp: 8 95 | - _StencilOp: 0 96 | - _StencilReadMask: 255 97 | - _StencilWriteMask: 255 98 | - _Strength: 0.2 99 | - _UVSec: 0 100 | - _UV_ANIMATION: 0 101 | - _UseDetail: 0 102 | - _UseUIAlphaClip: 0 103 | - _UvModifier: 0 104 | - _ZWrite: 1 105 | m_Colors: 106 | - _Color: {r: 1, g: 1, b: 1, a: 1} 107 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 108 | - _MaskSpeed: {r: 0, g: 0, b: 0, a: 0} 109 | - _UvSpeed: {r: 0, g: 0, b: 0, a: 0} 110 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Fill.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: UI-Fill 11 | m_Shader: {fileID: 4800000, guid: b0bf655e949c44179be80f397d04532d, type: 3} 12 | m_ShaderKeywords: COLORMODE_ADDITIVE COLOR_MODE_FILL _COLORMODE_FILL 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MaskTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _OcclusionMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ParallaxMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _UvTex: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - ColorMode: 1 72 | - Color_Mode: 3 73 | - _BumpScale: 1 74 | - _COLORMODE_ADDITIVE: 0 75 | - _ColorMask: 15 76 | - _ColorMode: 3 77 | - _Cutoff: 0.5 78 | - _DETAIL: 0 79 | - _DetailNormalMapScale: 1 80 | - _DstBlend: 10 81 | - _DstBlendMode: 10 82 | - _GlossMapScale: 1 83 | - _Glossiness: 0.5 84 | - _GlossyReflections: 1 85 | - _MASK: 0 86 | - _Metallic: 0 87 | - _Mode: 0 88 | - _OcclusionStrength: 1 89 | - _Parallax: 0.02 90 | - _SmoothnessTextureChannel: 0 91 | - _SpecularHighlights: 1 92 | - _SrcBlend: 1 93 | - _SrcBlendMode: 1 94 | - _Stencil: 0 95 | - _StencilComp: 8 96 | - _StencilOp: 0 97 | - _StencilReadMask: 255 98 | - _StencilWriteMask: 255 99 | - _Strength: 0.2 100 | - _UVSec: 0 101 | - _UV_ANIMATION: 0 102 | - _UseDetail: 0 103 | - _UseUIAlphaClip: 0 104 | - _UvModifier: 0 105 | - _ZWrite: 1 106 | m_Colors: 107 | - _Color: {r: 1, g: 1, b: 1, a: 1} 108 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 109 | - _MaskSpeed: {r: 0, g: 0, b: 0, a: 0} 110 | - _UvSpeed: {r: 0, g: 0, b: 0, a: 0} 111 | -------------------------------------------------------------------------------- /Packages/src/Samples~/Demo/Materials/UI-Masked.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: UI-Masked 11 | m_Shader: {fileID: 4800000, guid: b0bf655e949c44179be80f397d04532d, type: 3} 12 | m_ShaderKeywords: COLOR_MODE_FILL ENABLE_MASK 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _Detail: 27 | m_Texture: {fileID: 2800000, guid: dbefaf8223b5948ddb288f3e00c4ba78, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _DetailTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _EmissionMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MainTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MaskTex: 55 | m_Texture: {fileID: 2800000, guid: 96ae1cec6c34b485eb9dee398de9b482, type: 3} 56 | m_Scale: {x: 20, y: 20} 57 | m_Offset: {x: 0, y: 0} 58 | - _MetallicGlossMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _OcclusionMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _ParallaxMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _UvTex: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | m_Floats: 75 | - Color_Mode: 3 76 | - _BumpScale: 1 77 | - _ColorMask: 15 78 | - _ColorMode: 1 79 | - _Cutoff: 0.5 80 | - _DETAIL: 0 81 | - _DetailNormalMapScale: 1 82 | - _DstBlend: 10 83 | - _GlossMapScale: 1 84 | - _Glossiness: 0.5 85 | - _GlossyReflections: 1 86 | - _MASK: 1 87 | - _MaskThreshold: 0 88 | - _Metallic: 0 89 | - _Mode: 0 90 | - _OcclusionStrength: 1 91 | - _Parallax: 0.02 92 | - _SmoothnessTextureChannel: 0 93 | - _SpecularHighlights: 1 94 | - _SrcBlend: 1 95 | - _Stencil: 0 96 | - _StencilComp: 8 97 | - _StencilOp: 0 98 | - _StencilReadMask: 255 99 | - _StencilWriteMask: 255 100 | - _UVSec: 0 101 | - _UV_ANIMATION: 0 102 | - _UseUIAlphaClip: 0 103 | - _UvModifier: 0 104 | - _ZWrite: 1 105 | m_Colors: 106 | - _Color: {r: 1, g: 1, b: 1, a: 1} 107 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 108 | - _MaskSpeed: {r: 0.5, g: 0.5, b: 0, a: 0} 109 | - _UvSpeed: {r: 0, g: 0, b: 0, a: 0} 110 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/FrameCache.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace Coffee.CompositeCanvasRendererInternal 6 | { 7 | internal static class FrameCache 8 | { 9 | private static readonly Dictionary s_Caches = new Dictionary(); 10 | 11 | static FrameCache() 12 | { 13 | s_Caches.Clear(); 14 | UIExtraCallbacks.onLateAfterCanvasRebuild += ClearAllCache; 15 | } 16 | 17 | #if UNITY_EDITOR 18 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] 19 | private static void Clear() 20 | { 21 | s_Caches.Clear(); 22 | } 23 | #endif 24 | 25 | /// 26 | /// Tries to retrieve a value from the frame cache with a specified key. 27 | /// 28 | public static bool TryGet(object key1, string key2, out T result) 29 | { 30 | return GetFrameCache().TryGet((key1.GetHashCode(), key2.GetHashCode()), out result); 31 | } 32 | 33 | /// 34 | /// Tries to retrieve a value from the frame cache with a specified key. 35 | /// 36 | public static bool TryGet(object key1, string key2, int key3, out T result) 37 | { 38 | return GetFrameCache().TryGet((key1.GetHashCode(), key2.GetHashCode() + key3), out result); 39 | } 40 | 41 | /// 42 | /// Sets a value in the frame cache with a specified key. 43 | /// 44 | public static void Set(object key1, string key2, T result) 45 | { 46 | GetFrameCache().Set((key1.GetHashCode(), key2.GetHashCode()), result); 47 | } 48 | 49 | /// 50 | /// Sets a value in the frame cache with a specified key. 51 | /// 52 | public static void Set(object key1, string key2, int key3, T result) 53 | { 54 | GetFrameCache().Set((key1.GetHashCode(), key2.GetHashCode() + key3), result); 55 | } 56 | 57 | private static void ClearAllCache() 58 | { 59 | foreach (var cache in s_Caches.Values) 60 | { 61 | cache.Clear(); 62 | } 63 | } 64 | 65 | private static FrameCacheContainer GetFrameCache() 66 | { 67 | var t = typeof(T); 68 | if (s_Caches.TryGetValue(t, out var frameCache)) return frameCache as FrameCacheContainer; 69 | 70 | frameCache = new FrameCacheContainer(); 71 | s_Caches.Add(t, frameCache); 72 | 73 | return (FrameCacheContainer)frameCache; 74 | } 75 | 76 | private interface IFrameCache 77 | { 78 | void Clear(); 79 | } 80 | 81 | private class FrameCacheContainer : IFrameCache 82 | { 83 | private readonly Dictionary<(int, int), T> _caches = new Dictionary<(int, int), T>(); 84 | 85 | public void Clear() 86 | { 87 | _caches.Clear(); 88 | } 89 | 90 | public bool TryGet((int, int) key, out T result) 91 | { 92 | return _caches.TryGetValue(key, out result); 93 | } 94 | 95 | public void Set((int, int) key, T result) 96 | { 97 | _caches[key] = result; 98 | } 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/MaterialRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Profiling; 4 | 5 | namespace Coffee.CompositeCanvasRendererInternal 6 | { 7 | /// 8 | /// Provides functionality to manage materials. 9 | /// 10 | internal static class MaterialRepository 11 | { 12 | private static readonly ObjectRepository s_Repository = new ObjectRepository(); 13 | 14 | public static int count => s_Repository.count; 15 | 16 | #if UNITY_EDITOR 17 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] 18 | public static void Clear() 19 | { 20 | s_Repository.Clear(); 21 | } 22 | #endif 23 | 24 | /// 25 | /// Retrieves a cached material based on the hash. 26 | /// 27 | public static bool Valid(Hash128 hash, Material material) 28 | { 29 | Profiler.BeginSample("(COF)[MaterialRegistry] Valid"); 30 | var ret = s_Repository.Valid(hash, material); 31 | Profiler.EndSample(); 32 | return ret; 33 | } 34 | 35 | /// 36 | /// Adds or retrieves a cached material based on the hash. 37 | /// 38 | public static void Get(Hash128 hash, ref Material material, Func onCreate) 39 | { 40 | Profiler.BeginSample("(COF)[MaterialRepository] Get"); 41 | s_Repository.Get(hash, ref material, onCreate); 42 | Profiler.EndSample(); 43 | } 44 | 45 | /// 46 | /// Adds or retrieves a cached material based on the hash. 47 | /// 48 | public static void Get(Hash128 hash, ref Material material, string shaderName) 49 | { 50 | Profiler.BeginSample("(COF)[MaterialRepository] Get"); 51 | s_Repository.Get(hash, ref material, x => new Material(Shader.Find(x)) 52 | { 53 | hideFlags = HideFlags.DontSave | HideFlags.NotEditable 54 | }, shaderName); 55 | Profiler.EndSample(); 56 | } 57 | 58 | /// 59 | /// Adds or retrieves a cached material based on the hash. 60 | /// 61 | public static void Get(Hash128 hash, ref Material material, string shaderName, string[] keywords) 62 | { 63 | Profiler.BeginSample("(COF)[MaterialRepository] Get"); 64 | s_Repository.Get(hash, ref material, x => new Material(Shader.Find(x.shaderName)) 65 | { 66 | hideFlags = HideFlags.DontSave | HideFlags.NotEditable, 67 | shaderKeywords = x.keywords 68 | }, (shaderName, keywords)); 69 | Profiler.EndSample(); 70 | } 71 | 72 | /// 73 | /// Adds or retrieves a cached material based on the hash. 74 | /// 75 | public static void Get(Hash128 hash, ref Material material, Func onCreate, T source) 76 | { 77 | Profiler.BeginSample("(COF)[MaterialRepository] Get"); 78 | s_Repository.Get(hash, ref material, onCreate, source); 79 | Profiler.EndSample(); 80 | } 81 | 82 | /// 83 | /// Removes a soft mask material from the cache. 84 | /// 85 | public static void Release(ref Material material) 86 | { 87 | Profiler.BeginSample("(COF)[MaterialRepository] Release"); 88 | s_Repository.Release(ref material); 89 | Profiler.EndSample(); 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Packages/src/Editor/CompositeCanvasRendererIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf68536ba1e84499da87420c21f1fd91 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 12 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | cookieLightType: 0 67 | platformSettings: 68 | - serializedVersion: 3 69 | buildTarget: DefaultTexturePlatform 70 | maxTextureSize: 64 71 | resizeAlgorithm: 0 72 | textureFormat: -1 73 | textureCompression: 1 74 | compressionQuality: 50 75 | crunchedCompression: 0 76 | allowsAlphaSplitting: 0 77 | overridden: 0 78 | androidETC2FallbackOverride: 0 79 | forceMaximumCompressionQuality_BC6H_BC7: 0 80 | - serializedVersion: 3 81 | buildTarget: WebGL 82 | maxTextureSize: 2048 83 | resizeAlgorithm: 0 84 | textureFormat: -1 85 | textureCompression: 1 86 | compressionQuality: 50 87 | crunchedCompression: 0 88 | allowsAlphaSplitting: 0 89 | overridden: 0 90 | androidETC2FallbackOverride: 0 91 | forceMaximumCompressionQuality_BC6H_BC7: 0 92 | - serializedVersion: 3 93 | buildTarget: Standalone 94 | maxTextureSize: 2048 95 | resizeAlgorithm: 0 96 | textureFormat: -1 97 | textureCompression: 1 98 | compressionQuality: 50 99 | crunchedCompression: 0 100 | allowsAlphaSplitting: 0 101 | overridden: 0 102 | androidETC2FallbackOverride: 0 103 | forceMaximumCompressionQuality_BC6H_BC7: 0 104 | - serializedVersion: 3 105 | buildTarget: Server 106 | maxTextureSize: 2048 107 | resizeAlgorithm: 0 108 | textureFormat: -1 109 | textureCompression: 1 110 | compressionQuality: 50 111 | crunchedCompression: 0 112 | allowsAlphaSplitting: 0 113 | overridden: 0 114 | androidETC2FallbackOverride: 0 115 | forceMaximumCompressionQuality_BC6H_BC7: 0 116 | spriteSheet: 117 | serializedVersion: 2 118 | sprites: [] 119 | outline: [] 120 | physicsShape: [] 121 | bones: [] 122 | spriteID: 123 | internalID: 0 124 | vertices: [] 125 | indices: 126 | edges: [] 127 | weights: [] 128 | secondaryTextures: [] 129 | nameFileIdTable: {} 130 | spritePackingTag: 131 | pSDRemoveMatte: 0 132 | pSDShowRemoveMatteOption: 0 133 | userData: 134 | assetBundleName: 135 | assetBundleVariant: 136 | -------------------------------------------------------------------------------- /.github/workflows/build_documentation.yml: -------------------------------------------------------------------------------- 1 | # Required secrets 2 | # UNITY_LICENSE: The contents of Unity license file 3 | # UNITY_EMAIL: Unity user email to login 4 | # UNITY_PASSWORD: Unity user password to login 5 | name: 📘 Build Documentation 6 | 7 | env: 8 | unityVersion: 2022.3.10f1 9 | targetPlatform: StandaloneLinux64 10 | 11 | on: 12 | workflow_call: 13 | secrets: 14 | UNITY_EMAIL: 15 | description: Unity user email to login 16 | required: true 17 | UNITY_PASSWORD: 18 | description: Unity user password to login 19 | required: true 20 | UNITY_LICENSE: 21 | description: The contents of Unity license file 22 | required: true 23 | workflow_dispatch: 24 | 25 | jobs: 26 | setup: 27 | name: 📘 Setup Metadata 28 | runs-on: ubuntu-latest 29 | permissions: 30 | contents: read 31 | outputs: 32 | matrix: ${{ steps.matrix.outputs.matrix }} 33 | steps: 34 | - name: 🚚 Checkout 35 | uses: actions/checkout@v4 36 | 37 | - name: ⚙️Setup Build Matrix 38 | id: matrix 39 | run: | 40 | matrix=`jq -c '{ include: .versions }' ./Documentation/metadata.json` 41 | echo matrix="${matrix}" | tee -a $GITHUB_OUTPUT $GITHUB_STEP_SUMMARY 42 | 43 | build: 44 | name: 📘 Build Documentation 45 | needs: setup 46 | runs-on: ubuntu-latest 47 | permissions: 48 | contents: read 49 | strategy: 50 | matrix: ${{ fromJson(needs.setup.outputs.matrix) }} 51 | steps: 52 | - name: 🚚 Checkout 53 | uses: actions/checkout@v4 54 | with: 55 | ref: ${{ matrix.ref }} 56 | 57 | - name: ⚙️ Setup 58 | id: setup 59 | run: | 60 | # install docfx 61 | dotnet tool install -g docfx 62 | 63 | # install DocFxForUnity 64 | npx openupm-cli add 'com.coffee.docfx-for-unity@https://github.com/mob-sakai/TestPkgDev.git?path=Packages/src#develop' 65 | 66 | - name: 📥 Cache Library 67 | uses: actions/cache@v4 68 | with: 69 | path: Library 70 | key: Library-${{ env.unityVersion }}-${{ env.targetPlatform }}-${{ github.sha }} 71 | restore-keys: | 72 | Library-${{ env.unityVersion }}-${{ env.targetPlatform }}- 73 | Library-${{ env.unityVersion }}- 74 | Library- 75 | 76 | - name: 🛠️ Run UnityEditor To Setup CsProj 77 | uses: game-ci/unity-builder@v4 78 | continue-on-error: true # NOTE: Disabling the check for the "Build results" output? https://github.com/game-ci/unity-builder/issues/563 79 | timeout-minutes: 30 80 | env: 81 | UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} 82 | UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} 83 | UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} 84 | with: 85 | unityVersion: ${{ env.unityVersion }} 86 | targetPlatform: ${{ env.targetPlatform }} 87 | allowDirtyBuild: true 88 | buildMethod: DocFxForUnity.SetupCsProj 89 | 90 | - name: 📘 Build docfx 91 | run: | 92 | echo "==== Update Configuration ====" 93 | jq " \ 94 | .build.sitemap.baseUrl = \"${{ matrix.url }}\" | \ 95 | .build.globalMetadata._appTitle = \"${{ matrix.appTitle }}\" | \ 96 | .build.dest = \"${{ matrix.dest }}\" \ 97 | " Documentation/docfx.json > Documentation/__docfx.json 98 | 99 | cat Documentation/__docfx.json 100 | 101 | echo "==== Build ====" 102 | docfx Documentation/__docfx.json 103 | 104 | - name: 📦 Upload Documentation 105 | uses: actions/upload-artifact@v4 106 | with: 107 | name: Documentation_${{ matrix.version }} 108 | path: Documentation/_site 109 | overwrite: true 110 | -------------------------------------------------------------------------------- /ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "defaultInstantiationMode": 0 8 | }, 9 | { 10 | "userAdded": false, 11 | "type": "UnityEditor.Animations.AnimatorController", 12 | "defaultInstantiationMode": 0 13 | }, 14 | { 15 | "userAdded": false, 16 | "type": "UnityEngine.AnimatorOverrideController", 17 | "defaultInstantiationMode": 0 18 | }, 19 | { 20 | "userAdded": false, 21 | "type": "UnityEditor.Audio.AudioMixerController", 22 | "defaultInstantiationMode": 0 23 | }, 24 | { 25 | "userAdded": false, 26 | "type": "UnityEngine.ComputeShader", 27 | "defaultInstantiationMode": 1 28 | }, 29 | { 30 | "userAdded": false, 31 | "type": "UnityEngine.Cubemap", 32 | "defaultInstantiationMode": 0 33 | }, 34 | { 35 | "userAdded": false, 36 | "type": "UnityEngine.GameObject", 37 | "defaultInstantiationMode": 0 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEditor.LightingDataAsset", 42 | "defaultInstantiationMode": 0 43 | }, 44 | { 45 | "userAdded": false, 46 | "type": "UnityEngine.LightingSettings", 47 | "defaultInstantiationMode": 0 48 | }, 49 | { 50 | "userAdded": false, 51 | "type": "UnityEngine.Material", 52 | "defaultInstantiationMode": 0 53 | }, 54 | { 55 | "userAdded": false, 56 | "type": "UnityEditor.MonoScript", 57 | "defaultInstantiationMode": 1 58 | }, 59 | { 60 | "userAdded": false, 61 | "type": "UnityEngine.PhysicMaterial", 62 | "defaultInstantiationMode": 0 63 | }, 64 | { 65 | "userAdded": false, 66 | "type": "UnityEngine.PhysicsMaterial2D", 67 | "defaultInstantiationMode": 0 68 | }, 69 | { 70 | "userAdded": false, 71 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 72 | "defaultInstantiationMode": 0 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 77 | "defaultInstantiationMode": 0 78 | }, 79 | { 80 | "userAdded": false, 81 | "type": "UnityEngine.Rendering.VolumeProfile", 82 | "defaultInstantiationMode": 0 83 | }, 84 | { 85 | "userAdded": false, 86 | "type": "UnityEditor.SceneAsset", 87 | "defaultInstantiationMode": 1 88 | }, 89 | { 90 | "userAdded": false, 91 | "type": "UnityEngine.Shader", 92 | "defaultInstantiationMode": 1 93 | }, 94 | { 95 | "userAdded": false, 96 | "type": "UnityEngine.ShaderVariantCollection", 97 | "defaultInstantiationMode": 1 98 | }, 99 | { 100 | "userAdded": false, 101 | "type": "UnityEngine.Texture", 102 | "defaultInstantiationMode": 0 103 | }, 104 | { 105 | "userAdded": false, 106 | "type": "UnityEngine.Texture2D", 107 | "defaultInstantiationMode": 0 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Timeline.TimelineAsset", 112 | "defaultInstantiationMode": 0 113 | } 114 | ], 115 | "defaultDependencyTypeInfo": { 116 | "userAdded": false, 117 | "type": "", 118 | "defaultInstantiationMode": 1 119 | }, 120 | "newSceneOverride": 0 121 | } -------------------------------------------------------------------------------- /Packages/src/Runtime/Internal/Utilities/UIExtraCallbacks.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | namespace Coffee.CompositeCanvasRendererInternal 7 | { 8 | /// 9 | /// Provides additional callbacks related to canvas and UI system. 10 | /// 11 | internal static class UIExtraCallbacks 12 | { 13 | private static bool s_IsInitializedAfterCanvasRebuild; 14 | private static readonly FastAction s_AfterCanvasRebuildAction = new FastAction(); 15 | private static readonly FastAction s_LateAfterCanvasRebuildAction = new FastAction(); 16 | private static readonly FastAction s_BeforeCanvasRebuildAction = new FastAction(); 17 | private static readonly FastAction s_OnScreenSizeChangedAction = new FastAction(); 18 | private static Vector2Int s_LastScreenSize; 19 | 20 | static UIExtraCallbacks() 21 | { 22 | Canvas.willRenderCanvases += OnBeforeCanvasRebuild; 23 | Logging.LogMulticast(typeof(Canvas), "willRenderCanvases", message: "ctor"); 24 | } 25 | 26 | /// 27 | /// Event that occurs after canvas rebuilds. 28 | /// 29 | public static event Action onLateAfterCanvasRebuild 30 | { 31 | add => s_LateAfterCanvasRebuildAction.Add(value); 32 | remove => s_LateAfterCanvasRebuildAction.Remove(value); 33 | } 34 | 35 | /// 36 | /// Event that occurs before canvas rebuilds. 37 | /// 38 | public static event Action onBeforeCanvasRebuild 39 | { 40 | add => s_BeforeCanvasRebuildAction.Add(value); 41 | remove => s_BeforeCanvasRebuildAction.Remove(value); 42 | } 43 | 44 | /// 45 | /// Event that occurs after canvas rebuilds. 46 | /// 47 | public static event Action onAfterCanvasRebuild 48 | { 49 | add => s_AfterCanvasRebuildAction.Add(value); 50 | remove => s_AfterCanvasRebuildAction.Remove(value); 51 | } 52 | 53 | /// 54 | /// Event that occurs when the screen size changes. 55 | /// 56 | public static event Action onScreenSizeChanged 57 | { 58 | add => s_OnScreenSizeChangedAction.Add(value); 59 | remove => s_OnScreenSizeChangedAction.Remove(value); 60 | } 61 | 62 | /// 63 | /// Initializes the UIExtraCallbacks to ensure proper event handling. 64 | /// 65 | private static void InitializeAfterCanvasRebuild() 66 | { 67 | if (s_IsInitializedAfterCanvasRebuild) return; 68 | s_IsInitializedAfterCanvasRebuild = true; 69 | 70 | CanvasUpdateRegistry.IsRebuildingLayout(); 71 | Canvas.willRenderCanvases += OnAfterCanvasRebuild; 72 | Logging.LogMulticast(typeof(Canvas), "willRenderCanvases", 73 | message: "InitializeAfterCanvasRebuild"); 74 | } 75 | 76 | #if UNITY_EDITOR 77 | [InitializeOnLoadMethod] 78 | #endif 79 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] 80 | private static void InitializeOnLoad() 81 | { 82 | Canvas.willRenderCanvases -= OnAfterCanvasRebuild; 83 | s_IsInitializedAfterCanvasRebuild = false; 84 | } 85 | 86 | /// 87 | /// Callback method called before canvas rebuilds. 88 | /// 89 | private static void OnBeforeCanvasRebuild() 90 | { 91 | var screenSize = new Vector2Int(Screen.width, Screen.height); 92 | if (s_LastScreenSize != screenSize) 93 | { 94 | if (s_LastScreenSize != default) 95 | { 96 | s_OnScreenSizeChangedAction.Invoke(); 97 | } 98 | 99 | s_LastScreenSize = screenSize; 100 | } 101 | 102 | s_BeforeCanvasRebuildAction.Invoke(); 103 | InitializeAfterCanvasRebuild(); 104 | } 105 | 106 | /// 107 | /// Callback method called after canvas rebuilds. 108 | /// 109 | private static void OnAfterCanvasRebuild() 110 | { 111 | s_AfterCanvasRebuildAction.Invoke(); 112 | s_LateAfterCanvasRebuildAction.Invoke(); 113 | } 114 | } 115 | } 116 | --------------------------------------------------------------------------------