{"id":20004108,"url":"https://github.com/cj-mills/unitytexturereaderd3d","last_synced_at":"2026-04-30T03:35:23.229Z","repository":{"id":143569635,"uuid":"616174185","full_name":"cj-mills/UnityTextureReaderD3D","owner":"cj-mills","description":"UnityTextureReaderD3D is a plugin package for Unity that enables easy access to pixel data from Direct3D11 and Direct3D12 textures. The package includes native plugins for both APIs, providing efficient texture reading without the need for additional scripts or workarounds.","archived":false,"fork":false,"pushed_at":"2023-04-06T04:11:50.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-29T08:37:09.778Z","etag":null,"topics":["direct3d11","direct3d12","pixel-data","unity","unity3d"],"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/cj-mills.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":"2023-03-19T20:18:43.000Z","updated_at":"2023-03-20T00:59:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"83b107bc-aeb0-4d86-b531-36e8a7b69db0","html_url":"https://github.com/cj-mills/UnityTextureReaderD3D","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cj-mills/UnityTextureReaderD3D","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cj-mills%2FUnityTextureReaderD3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cj-mills%2FUnityTextureReaderD3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cj-mills%2FUnityTextureReaderD3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cj-mills%2FUnityTextureReaderD3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cj-mills","download_url":"https://codeload.github.com/cj-mills/UnityTextureReaderD3D/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cj-mills%2FUnityTextureReaderD3D/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32454092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["direct3d11","direct3d12","pixel-data","unity","unity3d"],"created_at":"2024-11-13T05:28:34.097Z","updated_at":"2026-04-30T03:35:20.029Z","avatar_url":"https://github.com/cj-mills.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UnityTextureReaderD3D\n\nUnityTextureReaderD3D is a plugin package for Unity that enables easy access to pixel data from Direct3D11 and Direct3D12 textures. The package includes native plugins for both APIs, providing efficient texture reading without the need for additional scripts or workarounds.\n\n## Features\n\n- Supports Direct3D11 and Direct3D12 textures.\n- Efficient and easy-to-use native plugins.\n- Compatible with Unity game engine.\n\n## Getting Started\n\n### Prerequisites\n\n- Unity game engine (compatible with Direct3D11 and Direct3D12)\n\n### Installation\n\nYou can install the UnityTextureReaderD3D package using the Unity Package Manager:\n\n1. Open your Unity project.\n2. Go to Window \u003e Package Manager.\n3. Click the \"+\" button in the top left corner, and choose \"Add package from git URL...\"\n4. Enter the GitHub repository URL: `https://github.com/cj-mills/UnityTextureReaderD3D.git`\n5. Click \"Add\". The package will be added to your project.\n\nFor Unity versions older than 2021.1, add the Git URL to the `manifest.json` file in your project's `Packages` folder as a dependency:\n\n```json\n{\n  \"dependencies\": {\n    \"com.cj-mills.unitytexturereaderd3d\": \"https://github.com/cj-mills/UnityTextureReaderD3D.git\",\n    // other dependencies...\n  }\n}\n```\n\n\n\n### Usage\n\nThe UnityTextureReaderD3D package provides two native plugins: UnityTextureReaderD3D11 and UnityTextureReaderD3D12, and C# scripts to interact with the plugin functions. The appropriate script will be automatically chosen based on your Unity project's rendering pipeline.\n\nHere's an example of how to use the package:\n\n\n```c#\nusing System;\nusing UnityEngine;\nusing UnityEngine.Rendering;\nusing CJM.UnityTextureReaderD3D;\n\npublic class TextureReaderExample : MonoBehaviour\n{\n    private ITexturePixelDataReaderD3D _texturePixelDataReaderD3D;\n\n    private void Start()\n    {\n        if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D11)\n        {\n            _texturePixelDataReaderD3D = new Direct3D11TexturePixelDataReader();\n        }\n        else if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D12)\n        {\n            _texturePixelDataReaderD3D = new Direct3D12TexturePixelDataReader();\n        }\n    }\n\n    private void ReadPixels(Texture2D texture)\n    {\n        IntPtr pixelDataPtr = _texturePixelDataReaderD3D.GetPixelDataFromTexture(texture.GetNativeTexturePtr());\n\n        if (pixelDataPtr != IntPtr.Zero)\n        {\n            // Process pixel data...\n\n            _texturePixelDataReaderD3D.FreePixelData(pixelDataPtr);\n        }\n    }\n}\n```\n\n\n\n## Demo Project\n\nA demo project called [UnityTextureReaderD3D_Demo](https://github.com/cj-mills/UnityTextureReaderD3D_Demo) is available to help you get started with using the `UnityTextureReaderD3D` package. The demo project demonstrates how to access and read pixel data from Direct3D11 and Direct3D12 textures in Unity. To get started, simply clone the demo project, open it in Unity, and follow the instructions provided in the demo project's README.\n\n\n\n## Contributing\n\nIf you would like to contribute to this project, please feel free to submit a pull request or open an issue on the repository.\n\n\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](Documentation~/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcj-mills%2Funitytexturereaderd3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcj-mills%2Funitytexturereaderd3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcj-mills%2Funitytexturereaderd3d/lists"}