{"id":30774959,"url":"https://github.com/codybloemhard/frag","last_synced_at":"2026-04-18T19:32:57.681Z","repository":{"id":311093315,"uuid":"345761309","full_name":"codybloemhard/frag","owner":"codybloemhard","description":"Fragment shaders in Rust.","archived":false,"fork":false,"pushed_at":"2024-05-24T00:36:41.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-27T22:40:51.976Z","etag":null,"topics":["boilerplate","fragment-shader","opengl","raymarching","shaders"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codybloemhard.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,"zenodo":null}},"created_at":"2021-03-08T18:51:49.000Z","updated_at":"2024-10-10T09:39:02.000Z","dependencies_parsed_at":"2025-08-22T05:25:12.955Z","dependency_job_id":"481ba786-9af8-4e27-b2f1-e3b762b61f7f","html_url":"https://github.com/codybloemhard/frag","commit_stats":null,"previous_names":["ocdy1001/frag"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codybloemhard/frag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codybloemhard%2Ffrag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codybloemhard%2Ffrag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codybloemhard%2Ffrag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codybloemhard%2Ffrag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codybloemhard","download_url":"https://codeload.github.com/codybloemhard/frag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codybloemhard%2Ffrag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31982700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["boilerplate","fragment-shader","opengl","raymarching","shaders"],"created_at":"2025-09-05T03:07:15.628Z","updated_at":"2026-04-18T19:32:57.674Z","avatar_url":"https://github.com/codybloemhard.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frag\n\nFragment shaders in Rust.\nLet's you skip the boilerplate and just write a fragment shader.\nUseful when for example, writing a raymarching shader.\n\n## Features\n\n* Compose shader of multiple part or files\n* Live coding: updates when a file is updated\n* Keyboard controls for time\n* Resolution independent: separate resolutions for rendering and displaying. Can be used to stretch, pixelate or anti alias\n* MP4 rendering with FFMPEG\n* Save current frame as PNG image\n\n## Controls\n\n* Space: Pause/Resume time and rendering\n* Left(hold): go back in time\n* Right(hold): go forward in time\n* Down: set time to 0\n* PageDown: jump backward in time with 5 seconds\n* PageUp: jump forward in time with 5 seconds\n\n## Todo\n\n* Post process fragment shader accessable\n\n## Examples\n\n### Example live coding, with pixel art like style\n\n```rust\nuse frag::*;\nlet streamer = shader::ShaderStreamer::new()\n    .with_file(\"lib.glsl\")\n    .with_file(\"shader.glsl\");\nFragConf::new()\n    .with_window_width(1600)\n    .with_window_height(900)\n    .with_canvas_width(320)\n    .with_canvas_height(180)\n    .with_pixelate(true)\n    .with_streamer(streamer)\n    .run_live().expect(\"Could not run.\");\n```\n\n### Example rendering to video\n\n```rust\nuse frag::*;\nlet streamer = shader::ShaderStreamer::new()\n    .with_file(\"lib.glsl\")\n    .with_file(\"shader.glsl\");\nFragConf::new()\n    .with_window_width(1600)\n    .with_window_height(900)\n    .with_streamer(streamer)\n    .into_ffmpeg_renderer()\n    .with_framerate(30)\n    .with_crf(20)\n    .with_preset(Preset::Slow)\n    .with_tune(Tune::Animation)\n    .with_length(600)\n    .with_output(\"render.mp4\")\n    .render().expect(\"Could not render.\");\n```\n\n## License\n\n```\nCopyright (C) 2024 Cody Bloemhard\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodybloemhard%2Ffrag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodybloemhard%2Ffrag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodybloemhard%2Ffrag/lists"}