{"id":14965021,"url":"https://github.com/deanthecoder/crttextbox","last_synced_at":"2025-10-25T10:31:04.270Z","repository":{"id":254730711,"uuid":"847339332","full_name":"deanthecoder/CrtTextBox","owner":"deanthecoder","description":"Avalonia-powered TextBox with CRT shader applied.","archived":false,"fork":false,"pushed_at":"2025-03-11T18:25:02.000Z","size":6308,"stargazers_count":40,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-07T06:27:45.908Z","etag":null,"topics":["avalonia","avalonia-ui","avaloniaui","crt","csharp","retro","shaders","sksl"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deanthecoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-08-25T14:47:37.000Z","updated_at":"2025-04-01T13:29:32.000Z","dependencies_parsed_at":"2024-09-13T23:27:20.493Z","dependency_job_id":"8ba72b8e-dce5-4afc-8a00-73ca7b2f8dd9","html_url":"https://github.com/deanthecoder/CrtTextBox","commit_stats":{"total_commits":12,"total_committers":3,"mean_commits":4.0,"dds":"0.16666666666666663","last_synced_commit":"91eec919cee998304c5542e185336035ad018335"},"previous_names":["deanthecoder/crttextbox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deanthecoder/CrtTextBox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanthecoder%2FCrtTextBox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanthecoder%2FCrtTextBox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanthecoder%2FCrtTextBox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanthecoder%2FCrtTextBox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deanthecoder","download_url":"https://codeload.github.com/deanthecoder/CrtTextBox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanthecoder%2FCrtTextBox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280942633,"owners_count":26417736,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["avalonia","avalonia-ui","avaloniaui","crt","csharp","retro","shaders","sksl"],"created_at":"2024-09-24T13:34:06.632Z","updated_at":"2025-10-25T10:31:03.809Z","avatar_url":"https://github.com/deanthecoder.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Twitter Follow](https://img.shields.io/twitter/follow/deanthecoder?style=social)](https://twitter.com/deanthecoder)\n\n# CrtTextBox\n\n**CrtTextBox** is an Avalonia C# project that enhances a standard TextBox control with a custom SKSL shader, giving it the appearance of a retro CRT screen. This effect adds a nostalgic touch to your UI with features like fish-eye distortion, scan lines, vignette, screen jitter, background noise, and a scrolling electron bar.\n\n![](img/preview.png)\n\nIt makes use of a custom `ShaderControl` control, allowing any SKSL shader code to be applied to a source Avalonia UI control.\nThe `CrtTextBox` example demonstrate how to use it with a `TextBox`, but any other source control can be used.\n\n## Features\n\n- **Retro CRT Look**: The shader applies various effects to create a convincing retro CRT display, including:\n  - Fish-eye distortion\n  - Scan lines\n  - Vignette effect\n  - Screen jitter\n  - Background noise\n  - Scrolling electron bar\n  - Monitor 'surround' with screen reflection\n\n- **Cross-Platform Compatibility**: Built with [Avalonia](https://avaloniaui.net/), ensuring compatibility across Windows, MacOS, and Linux.\n\n- **Customizable**: The shader can be easily integrated into any Avalonia application and modified to suit different visual styles.\n\n## Getting Started\n\n### Prerequisites\n\n- .NET compatible IDE such as [JetBrains Rider](https://www.jetbrains.com/rider/) or [Visual Studio 2022](https://visualstudio.microsoft.com/vs/).\n- Basic knowledge of C# and Avalonia UI.\n\n### Building From Source\n\n1. Clone the repository from GitHub.\n2. Open the solution in your IDE.\n3. Build and run the project.\n\n### Using the Text Editor\n\nThe main view is taken up with the shader code itself. Feel free to modify it and press `F5` to apply changes. Right-click outside of the text area to switch Themes.\n\n### Create Your Own Theme\n\nCheck out the `Themes` folder in the source tree. Modify the code to toggle features, or create your own theme from scratch.\n\n### Using the `ShaderControl`\n\nThe `ShaderControl` object is a standalone class and can be copied into your own project, and applied to any control with any shader code.\n\n1. Add `ShaderControl` to your AXAML.\n2. From the code-behind, set the `ControlSource` property to the UI control you wish to apply the shader to.\n3. Set the `FPS` property, which determines the frequency the source control is sampled.\n4. Set `ShaderUri` to point to the location of your SKSL shader code. Use `crt.sksl` as a reference.\n\nCustom `uniform` values can be passed into the shader code using `ShaderControl.AddUniform(name, value)`.\n\n## Contribution and Improvements\n\nCrtTextBox is an open-source project, and contributions are welcome. If you have ideas for new features, improvements, or bug fixes, feel free to submit a pull request. Please note that this is a side project, so responses might not be immediate.\n\n## Credits\n\n* Created with help from the blog: [Avalonia with Fragment Shaders](https://avaloniaui.net/blog/avalonia-with-fragment-shaders)\n* ...based on work by [Wiesław Šoltés](https://github.com/wieslawsoltes/EffectsDemo).\n\nThe project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.\n\n## Useful Resources\n\n- [Avalonia UI Documentation](https://docs.avaloniaui.net/)\n- [SKSL Shader Language](https://skia.org/docs/user/sksl/)\n- [The Oldschool PC Font Resource](https://int10h.org/oldschool-pc-fonts/fontlist/font?ibm_vga_8x16)\n\n---\n\nFollow me on Twitter for more updates: [@deanthecoder](https://twitter.com/deanthecoder).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanthecoder%2Fcrttextbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeanthecoder%2Fcrttextbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanthecoder%2Fcrttextbox/lists"}