{"id":26883130,"url":"https://github.com/raza-liv/2024-webgpu-freestyle","last_synced_at":"2025-03-31T17:00:08.997Z","repository":{"id":283992987,"uuid":"900651254","full_name":"Raza-LIV/2024-webgpu-freestyle","owner":"Raza-LIV","description":"WebGPU basic implementation. Shader module writing and passing custom dynamic values into it. Thanks to Google introduction course","archived":false,"fork":false,"pushed_at":"2025-03-23T14:27:03.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T15:25:15.225Z","etag":null,"topics":["html","js","webgpu-api","webgpu-shaders","webgpu-step-by-step"],"latest_commit_sha":null,"homepage":"https://codelabs.developers.google.com/your-first-webgpu-app","language":"HTML","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/Raza-LIV.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":"2024-12-09T08:09:33.000Z","updated_at":"2025-03-23T14:27:06.000Z","dependencies_parsed_at":"2025-03-23T15:25:18.410Z","dependency_job_id":"007c6306-3b9f-44aa-b117-eaccc715c386","html_url":"https://github.com/Raza-LIV/2024-webgpu-freestyle","commit_stats":null,"previous_names":["raza-liv/2024-webgpu-freestyle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raza-LIV%2F2024-webgpu-freestyle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raza-LIV%2F2024-webgpu-freestyle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raza-LIV%2F2024-webgpu-freestyle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raza-LIV%2F2024-webgpu-freestyle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Raza-LIV","download_url":"https://codeload.github.com/Raza-LIV/2024-webgpu-freestyle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246503169,"owners_count":20788235,"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":["html","js","webgpu-api","webgpu-shaders","webgpu-step-by-step"],"created_at":"2025-03-31T17:00:08.374Z","updated_at":"2025-03-31T17:00:08.984Z","avatar_url":"https://github.com/Raza-LIV.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2025 WebGPU sandbox\nSmall test of what this API can do. Shaders using [WGSL](https://gpuweb.github.io/gpuweb/wgsl) are really powerfull.\n\n![Example](https://github.com/user-attachments/assets/5f90081b-a1a6-44f4-b9a3-1be3ac75a6e1)\n\n```wgsl\n@group(0) @binding(0) var\u003cuniform\u003e grid: vec2f;\n\nstruct VertexInput {\n    @location(0) pos: vec2f,\n    @builtin(instance_index) instance: u32,\n};\n\nstruct VertexOutput {\n    @builtin(position) pos: vec4f,\n    @location(0) cell: vec2f,\n};\n\n@vertex\nfn vertexMain(input: VertexInput) -\u003e VertexOutput {\n    let i = f32(input.instance);\n    let cell = vec2f(i % grid.x, floor(i / grid.x));\n\n    let cellOffset = cell / grid * 2;\n    let gridPos = (input.pos + 1) / grid - 1 + cellOffset;\n\n    var output: VertexOutput;\n    output.pos = vec4f(gridPos, 0, 1);\n    output.cell = cell;\n    return output;\n}\n\nstruct FragInput {\n    @location(0) cell: vec2f,\n};\n\n@fragment\nfn fragmentMain(input: FragInput) -\u003e @location(0) vec4f {\n    let c = input.cell / grid;\n    return vec4f(c, 1-c.x, 1);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraza-liv%2F2024-webgpu-freestyle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraza-liv%2F2024-webgpu-freestyle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraza-liv%2F2024-webgpu-freestyle/lists"}