{"id":24122163,"url":"https://github.com/tlinden/kageviewer","last_synced_at":"2025-09-18T11:32:50.600Z","repository":{"id":229613213,"uuid":"777135546","full_name":"TLINDEN/kageviewer","owner":"TLINDEN","description":"Viewer for shaders written in Kage, similar to glslviewer","archived":false,"fork":false,"pushed_at":"2024-04-08T08:29:36.000Z","size":40781,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T06:30:27.668Z","etag":null,"topics":["command-line","ebitengine","game-development","golang","kage","shader","shell","viewer"],"latest_commit_sha":null,"homepage":"","language":"Go","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/TLINDEN.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":"2024-03-25T09:16:59.000Z","updated_at":"2024-06-02T14:30:32.000Z","dependencies_parsed_at":"2024-03-25T12:32:18.800Z","dependency_job_id":"66900a5b-7353-4b0e-9529-f51bf77633bb","html_url":"https://github.com/TLINDEN/kageviewer","commit_stats":null,"previous_names":["tlinden/kageviewer"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fkageviewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fkageviewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fkageviewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fkageviewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TLINDEN","download_url":"https://codeload.github.com/TLINDEN/kageviewer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233477097,"owners_count":18682137,"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":["command-line","ebitengine","game-development","golang","kage","shader","shell","viewer"],"created_at":"2025-01-11T11:38:40.625Z","updated_at":"2025-09-18T11:32:45.317Z","avatar_url":"https://github.com/TLINDEN.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kageviewer - Viewer for shaders written in Kage, similar to glslviewer\n\n![Logo](https://github.com/TLINDEN/kageviewer/blob/main/.github/assets/logo.png)\n\n[![License](https://img.shields.io/badge/license-GPL-blue.svg)](https://github.com/tlinden/kageviewer/blob/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tlinden/kageviewer)](https://goreportcard.com/report/github.com/tlinden/kageviewer) \n\nThis   little  tool   can  be   used  to   test  shaders   written  in\n[Kage](https://ebitengine.org/en/documents/shader.html), a shader meta\nlanguage for\n[Ebitengine](https://github.com/hajimehoshi/ebiten). kageviewer\nreloads changed assets, which allows you to develop your shader and\nsee live, how it responds to your changes. If loading fails, an error\nwill be printed to STDOUT. The same applies for images.\n\n## Screenshot\n\n![Screenshot](https://github.com/TLINDEN/kageviewer/blob/main/.github/assets/screenshot.png)\n\n## Installation\n\nSince `kageviewer` is primarily aimed at golang game developers, no\npre built binaries are provided.\n\n### Installation with go\n\n```shell\ngo install github.com/tlinden/kageviewer@latest\n```\n\n### Installation from source\n\nYou will need the Golang toolchain  in order to build from source. GNU\nMake will also help but is not strictly neccessary.\n\nIf you want to compile the tool yourself, use `git clone` to clone the\nrepository.   Then   execute   `go mod tidy`   to   install   all\ndependencies. Then  just enter `go build` or -  if you have  GNU Make\ninstalled - `make`.\n\nTo install after building either copy the binary or execute `sudo make\ninstall`. \n\n# Usage\n\n```shell\nkageviewer -h\nThis is kageviewer, a shader viewer.\n\nUsage: kageviewer [-vd] [-c \u003cconfig file\u003e] [-g geom] [-p geom] \\\n       -i \u003cimage0.png\u003e -i \u003cimage1.png\u003e -s \u003cshader.kage\u003e\n\nOptions:\n-c --config     \u003ctoml file\u003e     Config file to use (optional)\n-i --image      \u003cpng file\u003e      Image to load (multiple times allowed, up to 4)\n-s --shader     \u003ckage file\u003e     Shader to run\n-g --geometry   \u003cWIDTHxHEIGHT\u003e  Window size\n-p --position   \u003cXxY\u003e           Position of image0\n-b --background \u003cpng file\u003e      Image to load as background\n-t --tps        \u003cticks/s\u003e       At how many ticks per second to run\n   --map-flag   \u003cname\u003e          Map Flag uniform to \u003cname\u003e\n   --map-ticks  \u003cname\u003e          Map Ticks uniform to \u003cname\u003e\n   --map-time   \u003cname\u003e          Map Time uniform to \u003cname\u003e\n   --map-slider \u003cname\u003e          Map Slider uniform to \u003cname\u003e\n   --map-mouse  \u003cname\u003e          Map Mouse uniform to \u003cname\u003e\n-d --debug                      Show debugging output\n-v --version                    Show program version\n```\n\nExample usage using the provided example:\n\n```shell\nkageviewer -g 32x32 -i example/wall.png -i example/damage.png  -s example/destruct.kg\n```\n\nHit `SPACE` or press the left mouse button to toggle the damage\nmask. Press the `UP` or `DOWN` key to adjust the damage scale.\n\n# Uniforms\n\nSince this is a generic viewer, you cannot (yet) use custom\nuniforms. If you need this, just edit the source accordingly.\n\nUniforms supported so far:\n\n- `var Flag int`: a flag which toggles between 0 and 1 by pressing\n  `SPACE` or pusing the left mouse button\n- `var Slider float`: a normalized float value, you can increment it\n  with `UP` or `DOWN`\n- `var Time float`: the time the game runs (ticks / TPS)\n- `var Ticks float`: the number of updates happened so far\n- `var Mouse vec2`: the current mouse position\n\nIf you want to test an existing shader and don't want to rename the\nuniforms, you can map the ones provided by **kageviewer** to custom\nnames using the `--map-*` options. For example:\n\n```shell\nkageviewer -g 640x480 --map-ticks Time --map-mouse Cursor examples/shader/default.go\n```\n\nThis executes the example shader in the ebitenging source repository.\n\n# Config File\n\nYou can use a config file to store your own codes, once you found one\nyou like. A configfile is searched in these locations in this order:\n\n* `/etc/kageviewer.conf`\n* `/usr/local/etc/kageviewer.conf`\n* `$HOME/.config/kageviewer/config`\n* `$HOME/.kageviewer`\n\nYou may also specify a config file on the commandline using the `-c`\nflag.\n\nConfig files are expected to be in the [TOML format](https://toml.io/en/).\n\nPossible parameters equal the long command line options.\n\n# TODO\n\n- [X] Implement loading of images and shader files\n- [X] Implement basic shader rendering and user input\n- [ ] Add custom uniforms (maybe using lua code?)\n- [x] Provide a way to respond live to shader code changes (use lua as\n  well?)\n\n# Report bugs\n\n[Please open an issue](https://github.com/TLINDEN/kageviewer/issues). Thanks!\n\n# License\n\nThis work is licensed under the terms of the General Public Licens\nversion 3.\n\n# Author\n\nCopyleft (c) 2024 Thomas von Dein\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlinden%2Fkageviewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlinden%2Fkageviewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlinden%2Fkageviewer/lists"}