{"id":13731897,"url":"https://github.com/graphitemaster/deshade","last_synced_at":"2026-01-18T21:03:03.289Z","repository":{"id":142016467,"uuid":"134525316","full_name":"graphitemaster/deshade","owner":"graphitemaster","description":"dump and replace shaders of any OpenGL or Vulkan application","archived":false,"fork":false,"pushed_at":"2018-05-24T07:00:19.000Z","size":26,"stargazers_count":30,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T23:33:12.920Z","etag":null,"topics":[],"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/graphitemaster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-05-23T06:42:18.000Z","updated_at":"2024-09-30T05:00:56.000Z","dependencies_parsed_at":"2023-07-07T07:45:31.552Z","dependency_job_id":null,"html_url":"https://github.com/graphitemaster/deshade","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphitemaster%2Fdeshade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphitemaster%2Fdeshade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphitemaster%2Fdeshade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphitemaster%2Fdeshade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphitemaster","download_url":"https://codeload.github.com/graphitemaster/deshade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253008796,"owners_count":21839700,"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":[],"created_at":"2024-08-03T02:01:40.971Z","updated_at":"2026-01-18T21:03:03.283Z","avatar_url":"https://github.com/graphitemaster.png","language":"C++","readme":"# deshade\n\ndeshade is a library that allows you to dump and replace the shaders of\nany OpenGL or Vulkan application, which includes: GL2 + extensions, GL3,\nGL4, EGL, GLES2, GLES3, GLvnd, and Vulkan without recompiling the\napplication for Linux.\n\n# Building\nTo build just run make\n```\nmake\n```\n\n# Running\nBy default, deshade will not dump an application shaders to disk to\nbe replaced, unless a `shaders` directory exists where the application\nis invoked.\n\n## OpenGL\nTo dump and or replace the shaders of an OpenGL application, preload\nthe deshade shared object with `LD_PRELOAD` like so:\n\n```\nmkdir shaders\nLD_PRELOAD=./deshade.so application\n```\n\n## Vulkan\nTo dump and or replace the shaders of a Vulkan application, the\n`deshade.json` and `deshade.so` need to be installed as an implicit layer\nwith Vulkan inside `~/.local/share/vulkan/implicit_layer.d/` for the\ncurrent user. Then enable the implicit layer with `ENABLE_VK_LAYER_deshade=1`\nlike so:\n\n```\nmkdir shaders\nENABLE_VK_LAYER_deshade=1 application\n```\n\nThe shaders will be written to the `shaders` directory, their names\nwill be the hash of their contents, with the following extension scheme:\n`_vs.{glsl,bin}` for vertex shaders, `_fs.{glsl,bin}` for fragment shaders,\n`_gs.{glsl,bin}` for geometry shaders, `_cs.{glsl,bin}` for compute shaders,\n`_tcs.{glsl,bin}` for tesselleation control shaders and `_tes.{glsl,bin}`\nfor tesselation evaluation, and `_ks.bin` for Vulkan kernel shaders.\n\n## Replacing Shaders\nModifying the contents of one of the dumpped shaders in the `shaders`\ndirectory will take effect the next time the application is launched\nwith deshade.\n\n## Debug Output\nA debug log is also written to `deshade.txt` containing introspection\ninformation, if deshade fails to work check this for more information.\n\n# How it works\n\n## OpenGL\nThere are several ways OpenGL can be loaded.\n\n* application dlopens `libGL.so`\n* application dlopens `libGLX_{vendor}.so`, where vendor can be `nvidia`, `intel`, `amd`, `mesa`, etc\n* application fetches OpenGL functions with `glXGetProcAddress` or `glXGetProcAddressARB`\n* application links directly with `-lGL`\n  * this loads functions through GLX\n  * or, this loads functions through `__glx_Main` imports if using `GLvnd`\n\ndeshade attempts to supplement all of these so that regardless of how\nthe application acquires an OpenGL context this should work.\n\n## Vulkan\nVulkan standardized a mechanism for doing these things called layers,\ndeshade supplements some Vulkan functionality and and registers itself\nthrough the layer interface.\n\n# Known bugs\nApplications which use multiple OpenGL contexts per thread may fail to\nwork due to the way deshade only maintains one set of function pointers\nfor the first context. Support for multiple contexts per thread would\nrequire supplementing the `glXCreateContext`, `glXDestroyContext` and\n`glXMakeCurrent` functions.\n\ndeshade exploits internal glibc dynamic linker functions to replace the\ndynamic linker itself to handle any applications that get OpenGL\nthrough `dlopen`, as a result this library is glibc specific and will\nnot work on BSDs or musl based distributions.\n","funding_links":[],"categories":["Graphics"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphitemaster%2Fdeshade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphitemaster%2Fdeshade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphitemaster%2Fdeshade/lists"}