{"id":13451181,"url":"https://github.com/realazthat/glsl-quad","last_synced_at":"2025-07-27T02:35:19.146Z","repository":{"id":141450028,"uuid":"64492926","full_name":"realazthat/glsl-quad","owner":"realazthat","description":"glsl-quad provides simple utilities (simple quad mesh, shaders, etc.) for image processing with webgl.","archived":false,"fork":false,"pushed_at":"2016-11-10T22:46:04.000Z","size":241,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T16:51:15.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/realazthat.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":"2016-07-29T15:57:59.000Z","updated_at":"2021-09-04T03:13:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab25b3cb-3792-4def-aaa2-71bf1fad3e4b","html_url":"https://github.com/realazthat/glsl-quad","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/realazthat/glsl-quad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realazthat%2Fglsl-quad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realazthat%2Fglsl-quad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realazthat%2Fglsl-quad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realazthat%2Fglsl-quad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realazthat","download_url":"https://codeload.github.com/realazthat/glsl-quad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realazthat%2Fglsl-quad/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267289595,"owners_count":24064730,"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-07-27T02:00:11.917Z","response_time":82,"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":"2024-07-31T07:00:49.388Z","updated_at":"2025-07-27T02:35:19.127Z","avatar_url":"https://github.com/realazthat.png","language":"JavaScript","funding_links":[],"categories":["Tools"],"sub_categories":[],"readme":"\nglsl-quad\n---\n\n\n####Description\n\nglsl-quad provides simple utilities (simple quad mesh, shaders, etc.) for image processing with webgl.\n\nSee `glsl-quad-demo.js` for usage.\n\n####Dependencies\n\n* nodejs\n* browserify\n* [regl](https://github.com/mikolalysenko/regl) (for demo)\n* [resl](https://github.com/mikolalysenko/resl) (for demo)\n* budo (for quick demo as an alternative to running browserify) \n\n\n####Demo\n\nTo run the demo, run:\n\n```\n    cd ./glsl-quad\n    \n    #install npm dependencies\n    npm install\n    \n    #browser should open with the demo\n    budo glsl-quad-demo.js --open\n\n\n```\n\nResults:\n\nbranch  | demo\n--------|-------\nmaster  | [glsl-quad-demo](https://realazthat.github.io/glsl-quad/master/www/glsl-quad-demo/index.html)\n        | [glsl-quad-uv-demo](https://realazthat.github.io/glsl-quad/master/www/glsl-quad-uv-demo/index.html)\n        | [glsl-quad-pos-demo](https://realazthat.github.io/glsl-quad/master/www/glsl-quad-pos-demo/index.html)\n        | [glsl-quad-vertical-flip-tests](https://realazthat.github.io/glsl-quad/master/www/glsl-quad-vertical-flip-tests/index.html)\ndevelop | [glsl-quad-demo](https://realazthat.github.io/glsl-quad/develop/www/glsl-quad-demo/index.html)\n        | [glsl-quad-uv-demo](https://realazthat.github.io/glsl-quad/develop/www/glsl-quad-uv-demo/index.html)\n        | [glsl-quad-pos-demo](https://realazthat.github.io/glsl-quad/develop/www/glsl-quad-pos-demo/index.html)\n        | [glsl-quad-vertical-flip-tests](https://realazthat.github.io/glsl-quad/develop/www/glsl-quad-vertical-flip-tests/index.html)\n\n####Docs\n\n```\nconst quad = require('./glsl-quad.js');\n```\n\n##### `quad.verts`\n\n* A list of vertices that can be used for webgl positions, that make up a quad (two triangles).\n\n##### `quad.indices`\n\n* A list of indices that can be used for webgl triangles, that make up a quad (two triangles).\n\n##### `quad.uvs`\n\n* A list of uv attributes for the vertices.\n\n##### `quad.shader.frag`\n\n* Returns the webgl 1.0 fragment shader to use.\n* The fragment shader expects a uniform shader (sampler2D) named `u_tex`.\n\n##### `quad.shader.vert`\n\n* Returns the webgl 1.0 vertex shader to use.\n* The vertex shader expects:\n    * A uniform float named `u_clip_y`, representing whether to flip the y-axis; values of 1 or -1.\n    * An attribute list of vec2 positions of the vertices named `a_position`.\n    * An attribute list of vec2 uvs of the vertices named `a_uv`.\n\n\n##### `quad.bitmaps.directions.uri`\n\n* Returns a data uri for an image that can be used to test proper display directions.\n* Can see the images in the `glsl-quad/assets/` directory.\n\n\n####Usage\n\nSee `glsl-quad-demo.js` for a full demo using [regl](https://github.com/mikolalysenko/regl)\nand [resl](https://github.com/mikolalysenko/resl).\n\nAn excerpt:\n\n```\n\n    const drawTexture = regl({\n      frag: quad.shader.frag,\n      vert: quad.shader.vert,\n      attributes: {\n        a_position: quad.verts,\n        a_uv: quad.uvs\n      },\n      elements: quad.indices,\n      uniforms: {\n        u_tex: regl.prop('texture'),\n        u_clip_y: 1\n      }\n    });\n\n    drawTexture({texture});\n\n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealazthat%2Fglsl-quad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealazthat%2Fglsl-quad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealazthat%2Fglsl-quad/lists"}