{"id":33023327,"url":"https://github.com/unitycoder/NatRender","last_synced_at":"2025-11-25T02:30:23.721Z","repository":{"id":144946103,"uuid":"360143365","full_name":"unitycoder/NatRender","owner":"unitycoder","description":"High performance native graphics utilities for Unity Engine.","archived":false,"fork":false,"pushed_at":"2021-02-28T01:18:53.000Z","size":481,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T19:27:24.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.natsuite.io/natrender","language":null,"has_issues":false,"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/unitycoder.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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}},"created_at":"2021-04-21T11:25:55.000Z","updated_at":"2024-06-06T07:53:35.000Z","dependencies_parsed_at":"2024-01-14T01:22:22.496Z","dependency_job_id":"18b91d5d-8b89-4d47-93ed-2ebbfb95f8a5","html_url":"https://github.com/unitycoder/NatRender","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unitycoder/NatRender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FNatRender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FNatRender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FNatRender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FNatRender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unitycoder","download_url":"https://codeload.github.com/unitycoder/NatRender/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FNatRender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286079811,"owners_count":27282121,"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-11-25T02:00:05.816Z","response_time":54,"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":[],"created_at":"2025-11-13T19:00:34.939Z","updated_at":"2025-11-25T02:30:23.715Z","avatar_url":"https://github.com/unitycoder.png","language":null,"funding_links":[],"categories":["ComputerGraphics \u0026\u0026 Shadingv"],"sub_categories":["Google Analytics"],"readme":"# NatRender\nNatRender is a lightweight graphics utility library for Unity Engine. Features include:\n- High performance pixel buffer readbacks from the GPU on iOS and Android (including OpenGL ES3).\n- Running delegates on Unity's render thread.\n\n## Setup Instructions\nNatShare should be installed using the Unity Package Manager. In your `manifest.json` file, add the following dependency:\n```json\n{\n  \"dependencies\": {\n    \"com.natsuite.natrender\": \"git+https://github.com/natsuite/NatRender\"\n  }\n}\n```\n\n## Pixel Buffer Readbacks\nNatRender provides lightweight primitives for performing pixel buffer readbacks from textures on the GPU. This is exposed through implementations the `IReadback` interface. Currently, NatRender provides the following implementations:\n- `GLESReadback` for Android when rendering with OpenGL ES3.\n- `MTLReadback` for iOS when rendering with Metal.\n- `AsyncReadback` for platforms that support Unity's [async readbacks](https://docs.unity3d.com/ScriptReference/SystemInfo-supportsAsyncGPUReadback.html).\n- `SyncReadback` for all platforms. Note that this implementation has the worst performance.\n\nOnce you create a readback, you can request the pixel data by calling the `Readback` method:\n```csharp\n// Starting with some texture you want to readback\nvar texture = ...;\n// Create readback\nvar readback = new GLESReadback(...) or new MLTReadback(...) or ...;\n// Issue request\nreadback.Request(texture, (NativeArray\u003cbyte\u003e pixelBuffer) =\u003e {\n    // Do stuff with pixel buffer\n});\n// And when you're done remember to dispose\nreadback.Dispose();\n```\n\n## Running on the Render Thread\nNatRender also provides a way to run an `Action` on Unity's render thread. This is useful for performing native rendering or doing anything that requires being on the primary render thread:\n```csharp\nRenderThread.Run(() =\u003e {\n    // We're on Unity's render thread\n    Debug.Log(\"Hello from the render thread\");\n});\n```\n\n___\n\n## Requirements\n- Unity 2019.2+\n- Android API level 24+\n- iOS 13+\n\n## Resources\n- [NatRender Documentation](https://docs.natsuite.io/natrender)\n- [NatSuite Framework on GitHub](https://github.com/natsuite)\n- [Email Support](mailto:yusuf@natsuite.io)\n\nThank you very much!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitycoder%2FNatRender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funitycoder%2FNatRender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitycoder%2FNatRender/lists"}