{"id":20508840,"url":"https://github.com/smkplus/kamalitransition","last_synced_at":"2025-10-09T16:03:15.068Z","repository":{"id":101453429,"uuid":"236221667","full_name":"smkplus/KamaliTransition","owner":"smkplus","description":"Unity Shader transition between panels","archived":false,"fork":false,"pushed_at":"2020-01-25T20:32:49.000Z","size":1435,"stargazers_count":47,"open_issues_count":0,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T22:09:45.884Z","etag":null,"topics":["shader","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smkplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-25T19:53:25.000Z","updated_at":"2025-02-28T07:02:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"59f26108-7af4-4fd2-9015-26aa4b6b8872","html_url":"https://github.com/smkplus/KamaliTransition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smkplus%2FKamaliTransition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smkplus%2FKamaliTransition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smkplus%2FKamaliTransition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smkplus%2FKamaliTransition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smkplus","download_url":"https://codeload.github.com/smkplus/KamaliTransition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788933,"owners_count":21161727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["shader","unity"],"created_at":"2024-11-15T20:20:41.176Z","updated_at":"2025-10-09T16:03:15.005Z","avatar_url":"https://github.com/smkplus.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [KamaliTransition](https://twitter.com/ShaderGuy/status/1220922020701114368?s=20)\n\nI made this by using [stencil buffer](https://docs.unity3d.com/Manual/SL-Stencil.html)\n\n![Record_2020_01_25_23_27_26_68](https://user-images.githubusercontent.com/16706911/73126623-529a2980-3fca-11ea-85e2-104ffad18a29.gif)\n\n\nStencil Op/Comparison Values\n\n# Comparison Functions\n\n```\n0 - Always\n1 - Never\n2 - Less\n3 - Equal\n4 - LEqual\n5 - Greater\n6 - NotEqual\n7 - GEqual\n8 - Always // (This is the default for the UI shaders so I suspect this one is technically the 'correct' Always, but any value beyond it will also count as Always)\n```\n\n# Stencil Operations\n\n```\n0 - Keep\n1 - Zero\n2 - Replace\n3 - IncrSat\n4 - DecrSat\n5 - Invert\n6 - IncrWrap\n7 - DecrWrap\n```\n\nReferences:\n\n[unity forum](https://forum.unity.com/threads/stencil-op-comparison-values.362425/) \u0026 [khronos](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkStencilOp.html)\n\nI explained more about [UI stencil Buffer here](https://gamedev.stackexchange.com/questions/158128/how-to-write-a-transparent-shader-for-a-sprite-that-ignores-transparent-sprites/158132#158132)\n\n\n# Adding Enum to Inspector\n\nchange your properties like this:\n```\n[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp (\"Stencil Comparison\", Int) = 0\n[Enum(UnityEngine.Rendering.StencilOp)] _StencilOp (\"Stencil Operation\", Int) = 0\n```\n____________________\n\n# Mask Material\n\n![image](https://user-images.githubusercontent.com/16706911/73126700-1d420b80-3fcb-11ea-89ce-8c735ad53e93.png)\n\n# Foreground UI Material\n\n![image](https://user-images.githubusercontent.com/16706911/73126731-64300100-3fcb-11ea-8f6a-323ee4883756.png)\n\n# Masking TextMeshPro\nI explained here how to mask [Textmesh Pro](https://gamedev.stackexchange.com/questions/176170/how-to-use-a-sprite-mask-or-shader-to-mask-a-text\n)\n\n![image](https://user-images.githubusercontent.com/16706911/73126746-a2c5bb80-3fcb-11ea-919f-f5566a7c8302.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmkplus%2Fkamalitransition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmkplus%2Fkamalitransition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmkplus%2Fkamalitransition/lists"}