{"id":13661911,"url":"https://github.com/siberder/UnityDrawOnGPU","last_synced_at":"2025-04-25T06:30:51.731Z","repository":{"id":132837195,"uuid":"255137597","full_name":"siberder/UnityDrawOnGPU","owner":"siberder","description":"⚡ Fast drawing on textures at runtime using GPU","archived":false,"fork":false,"pushed_at":"2020-04-12T22:27:26.000Z","size":34308,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-10T17:45:22.696Z","etag":null,"topics":["drawing","gpu","shaders","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/siberder.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}},"created_at":"2020-04-12T17:45:12.000Z","updated_at":"2024-09-07T16:15:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"81bf77d6-b1d0-4efd-9c2f-00b337548353","html_url":"https://github.com/siberder/UnityDrawOnGPU","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/siberder%2FUnityDrawOnGPU","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siberder%2FUnityDrawOnGPU/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siberder%2FUnityDrawOnGPU/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siberder%2FUnityDrawOnGPU/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siberder","download_url":"https://codeload.github.com/siberder/UnityDrawOnGPU/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250767015,"owners_count":21483906,"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":["drawing","gpu","shaders","unity"],"created_at":"2024-08-02T05:01:44.093Z","updated_at":"2025-04-25T06:30:46.721Z","avatar_url":"https://github.com/siberder.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# Drawing on textures at runtime with GPU in UNITY\nThese scripts (and a shader) allows you to draw on textures at runtime with lightning-fast speed, unlike if you trying to do the same on CPU using `GetPixels` and `SetPixels`.\n\n## In action\n![Preview](/images/preview1.gif)\n\n**Stable drawing at *high FPS* (1000+ on Nvidia GTX 1060). Same result, but using CPU to change texture runs at 10-15 FPS (trust me).**\n\nAlso, there is an example with a \"scratch\" shader:\n\n![Preview](/images/preview2.gif)\n\n## Usage\nAll essential scripts and shader lies under `Scripts` and `Shaders` folders. Brushes lies under `Textures/brushes` folder.\n\n### Scripts\n- Put `MouseDrawController.cs` script on your camera, set **brush texture**, **color** and **size** in it\n- Put `DrawZone.cs` script on mesh that you want to draw on\n\nYou can also inherit `DrawZone.cs` and create your own behaviour of script, example given in `ScratchZone.cs`\n\n\n### Brushes\nBrushes are black/white images. White area draws, black doesnt.\n\n### Mesh requirements\nYou have to unwrap your mesh properly, so *left bottom corner* of mesh must be (0, 0) on UVs, and the top right corner of mesh must be (1, 1).\n\nJust like this:\n\n![Preview](/images/unwrapping.png)\n\n## Conclusion\n\nThanks for your attention! I will be pleasured to see any feedback :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiberder%2FUnityDrawOnGPU","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiberder%2FUnityDrawOnGPU","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiberder%2FUnityDrawOnGPU/lists"}