{"id":22168941,"url":"https://github.com/cau777/compute-shader-helper","last_synced_at":"2026-05-04T03:37:03.130Z","repository":{"id":150017643,"uuid":"362128336","full_name":"cau777/Compute-Shader-Helper","owner":"cau777","description":"Simple class to speed up working with compute shaders in Unity","archived":false,"fork":false,"pushed_at":"2021-04-27T14:15:44.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T17:21:22.469Z","etag":null,"topics":["compute-shader","compute-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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cau777.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":"2021-04-27T13:47:01.000Z","updated_at":"2022-09-22T21:24:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc43adee-2730-4f02-8fe4-c96895c45c3e","html_url":"https://github.com/cau777/Compute-Shader-Helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cau777/Compute-Shader-Helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cau777%2FCompute-Shader-Helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cau777%2FCompute-Shader-Helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cau777%2FCompute-Shader-Helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cau777%2FCompute-Shader-Helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cau777","download_url":"https://codeload.github.com/cau777/Compute-Shader-Helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cau777%2FCompute-Shader-Helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32593945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"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":["compute-shader","compute-shaders","unity"],"created_at":"2024-12-02T06:27:54.705Z","updated_at":"2026-05-04T03:37:03.114Z","avatar_url":"https://github.com/cau777.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compute-Shader-Helper\nSimple class to speed up working with compute shaders in Unity\n\n## How to Use\n1. Create ComputeHelper object\n\n`ComputeHelper helper = new ComputeHelper(myComputeShader, kernelIndex);`\n\n2. Set properties in the ComputeShader object\n\n`myComputeShader.SetInt(\"Count\", 3);`\n\n3. Create Buffers using the ComputeHelper object. There are 3 types of buffers:\n* Write buffer: **writes** the contents of the array to the Buffer in the shader\n\n`CreateWriteBuffer(string name, int size, int stride, Array reference)`\n\n`helper.CreateWriteBuffer(\"Inputs\", inputs.Length, sizeof(float), inputs);`\n\n* Read buffer: **reads** the contents of the Buffer and stores them into the array after the shader is dispached\n\n`CreateReadWriteBuffer(string name, int size, int stride, Array reference)`\n\n`helper.CreateReadBuffer(\"Outputs\", outputs.Length, sizeof(float), outputs);`\n\n* Read/Write buffer: **writes** the contents of the array to the Buffer in the shader and **reads** the contents of the Buffer and stores them into the array after the shader is dispached\n\n`CreateReadWriteBuffer(string name, int size, int stride, Array reference)`\n\n`helper.CreateReadWriteBuffer(\"ThingToBeModified\", thingsToBeModified.Length, sizeof(float), thingsToBeModified);`\n\n4. Run the Shader, specifying the **total** thread count for x, y, z\n\n`RunShader(int x, int y, int z)`\n\n`helper.RunShader(500, 1, 1); // The shader will run 500 times`\n\nAfter this command, the program retrieves data from the buffers, stores them into the arrays and releases all ComputeBuffers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcau777%2Fcompute-shader-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcau777%2Fcompute-shader-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcau777%2Fcompute-shader-helper/lists"}