{"id":19205107,"url":"https://github.com/papadanku/cshade","last_synced_at":"2025-07-19T16:14:04.553Z","repository":{"id":155869143,"uuid":"545859632","full_name":"papadanku/CShade","owner":"papadanku","description":"Image and video processing shaders for ReShade (convolutions, optical flow, etc.).","archived":false,"fork":false,"pushed_at":"2024-09-08T03:01:40.000Z","size":690,"stargazers_count":25,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-08T10:06:58.361Z","etag":null,"topics":["hlsl","image-processing","optical-flow","reshade","shaders","video-processing"],"latest_commit_sha":null,"homepage":"https://papadanku.github.io/CShade/","language":"HLSL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/papadanku.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":"2022-10-05T05:13:58.000Z","updated_at":"2024-09-08T03:01:44.000Z","dependencies_parsed_at":"2023-09-24T17:58:54.946Z","dependency_job_id":"b6c266af-380c-43f1-bca3-9c4183ed1094","html_url":"https://github.com/papadanku/CShade","commit_stats":{"total_commits":250,"total_committers":3,"mean_commits":83.33333333333333,"dds":"0.052000000000000046","last_synced_commit":"f0bbbac3c22c20ea496eceb208c3791d13a22a02"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papadanku%2FCShade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papadanku%2FCShade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papadanku%2FCShade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papadanku%2FCShade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/papadanku","download_url":"https://codeload.github.com/papadanku/CShade/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240277128,"owners_count":19775836,"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":["hlsl","image-processing","optical-flow","reshade","shaders","video-processing"],"created_at":"2024-11-09T13:11:23.213Z","updated_at":"2025-07-19T16:14:04.542Z","avatar_url":"https://github.com/papadanku.png","language":"HLSL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# CShade\n\n## About\n\nCShade is an HLSL shader collection for ReShade. CShade introduces conventional image and video processing effects from a different angle.\n\nCShade also includes `.fxh` files that contain algorithms used in the collection or have potential use.\n\n## Effects\n\n### Inter-Shader Merging\n\nCShade allows users to blend shaders together and configure shaders to output a combination of Red/Green/Blue/Alpha.\n\n### Adaptive Exposure\n\nCShade features an adaptive-exposure shader that uses hardware blending for temporal smoothing. The shader also features spot-metering, allowing users to expose their image depending on an area.\n\n### Image Processing\n\nCShade features shaders that deal with getting information about an image.\n\n- [AMD FidelityFX](https://gpuopen.com/amd-fidelityfx-sdk/)\n  - [FidelityFX Lens](https://gpuopen.com/manuals/fidelityfx_sdk/fidelityfx_sdk-page_techniques_lens/)\n  - [FidelityFX Contrast Adaptive Sharpening (CAS)](https://gpuopen.com/manuals/fidelityfx_sdk/fidelityfx_sdk-page_techniques_contrast-adaptive-sharpening/)\n  - [FidelityFX Robust Contrast Adaptive Sharpening (RCAS)](https://gpuopen.com/manuals/fidelityfx_sdk/fidelityfx_sdk-page_techniques_super-resolution-upscaler/#robust-contrast-adaptive-sharpening-rcas)\n- Anti-aliasing\n  - [Fast Approximate Anti-Aliasing (FXAA)](https://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing)\n  - [Directionally Localized Anti-Aliasing (DLAA)](http://www.and.intercon.ru/releases/talks/dlaagdc2011/)\n- Color conversions\n  - Chromaticity spaces\n  - Cylindrical color spaces\n  - Polar color spaces\n  - Grayscale\n- Convolutions\n  - Gaussian blur\n  - Edge detection\n  - Hierarchical (joint) bilateral upsampling\n- Local normalization\n  - Census transform\n  - Local contrast normalization\n\n### Video Processing\n\nCShade features real-time motion estimation and feature-matching shaders through hierarchal Lucas-Kanade optical flow.\n\n- Auto exposure\n- Datamoshing\n- Motion blur\n- Motion stabilization\n- Vector lines\n\n### Post Processing\n\nCShade features shaders that filter images for aesthetics.\n\n- Backbuffer blending\n- Dual-Kawase bloom\n- Lens effect\n- Letterbox\n- Sharpening\n- Vignetting\n\n## Coding Convention\n\n### UI\n\nIn `ui_category`/`ui_label`, use `·` to separate between subcategories, if needed\n\n```md\nuniform float _Level1Weight \u003c\n    ui_category = \"Bloom · Level Weights\";\n    ui_label = \"Level 1\";\n    ui_type = \"slider\";\n    ui_min = 0.0;\n    ui_max = 1.0;\n\u003e = 1.0;\n\nuniform float _CShadeExposureSmoothingSpeed \u003c\n    ui_category = \"Pipeline · Output · Auto Exposure\";\n    ui_label = \"Smoothing Speed\";\n    ui_type = \"slider\";\n    ui_min = 0.1;\n    ui_max = 1.0;\n\u003e = 0.25;\n```\n\n### Functions and Variables\n\n#### Shared Method From Header File\n\n  `shared/common/cLib.fxh` -\u003e `Common_CLib_FunctionName()`\n\n#### ALLCAPS\n\n- State parameters\n\n  `BlendOp = ADD`\n\n- System semantics\n\n  `float4 SV_POSITION`\n\n#### ALL_CAPS\n\n- Preprocessor definition\n\n  `#define SHADER_VERSION`\n\n- Preprocessor Macros\n\n  `#define EXAMPLE_MACRO()`\n\n- Preprocessor Macro Arguments\n\n  `#define EXAMPLE_MACRO(EXAMPLE_ARG)`\n\n#### _SnakeCase\n\n- Uniform variables\n\n  `uniform float3 _Example`\n\n#### SnakeCase\n\n- Function arguments\n\n  `void Function(float4 ArgumentOne)`\n\n- Global Variables\n\n  ```md\n  static const float4 GlobalVariable = 1.0;\n  void Function()\n  {\n      return GlobalVariable;\n  }\n  ```\n\n- Local Variables\n\n  ```md\n  void Function()\n  {\n      float4 LocalVariable = 1.0;\n      return LocalVariable;\n  }\n  ```\n\n- Textures and Samples\n\n  `texture2D ExampleTex ...`\n\n  `sampler2D SampleExampleTex ...`\n\n#### SNAKE_Case\n\n- `struct` datatype\n\n  `struct APP2VS_Example ...`\n\n  `struct VS2PS_Example ...`\n\n  `struct PS2FB_Example ...`\n\n  `struct PS2MRT_Example ...`\n\n- `VertexShader` and `PixelShader`\n\n  `VertexShader = VS_Example;`\n\n  `PixelShader = PS_Example;`\n\n### Virtual-Key Codes\n\n\u003e **See also:** https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes\n\nConstant | Value | Description\n-------- | ----- | -----------\nVK_LBUTTON | 0x01 | Left mouse button\nVK_RBUTTON | 0x02 | Right mouse button\nVK_CANCEL | 0x03 | Control-break processing\nVK_MBUTTON | 0x04 | Middle mouse button\nVK_XBUTTON1 | 0x05 | X1 mouse button\nVK_XBUTTON2 | 0x06 | X2 mouse button\n0x07 | Reserved\nVK_BACK | 0x08 | Backspace key\nVK_TAB | 0x09 | Tab key\n0x0A-0B | Reserved\nVK_CLEAR | 0x0C | Clear key\nVK_RETURN | 0x0D | Enter key\n0x0E-0F | Unassigned\nVK_SHIFT | 0x10 | Shift key\nVK_CONTROL | 0x11 | Ctrl key\nVK_MENU | 0x12 | Alt key\nVK_PAUSE | 0x13 | Pause key\nVK_CAPITAL | 0x14 | Caps lock key\nVK_KANA | 0x15 | IME Kana mode\nVK_HANGUL | 0x15 | IME Hangul mode\nVK_IME_ON | 0x16 | IME On\nVK_JUNJA | 0x17 | IME Junja mode\nVK_FINAL | 0x18 | IME final mode\nVK_HANJA | 0x19 | IME Hanja mode\nVK_KANJI | 0x19 | IME Kanji mode\nVK_IME_OFF | 0x1A | IME Off\nVK_ESCAPE | 0x1B | Esc key\nVK_CONVERT | 0x1C | IME convert\nVK_NONCONVERT | 0x1D | IME nonconvert\nVK_ACCEPT | 0x1E | IME accept\nVK_MODECHANGE | 0x1F | IME mode change request\nVK_SPACE | 0x20 | Spacebar key\nVK_PRIOR | 0x21 | Page up key\nVK_NEXT | 0x22 | Page down key\nVK_END | 0x23 | End key\nVK_HOME | 0x24 | Home key\nVK_LEFT | 0x25 | Left arrow key\nVK_UP | 0x26 | Up arrow key\nVK_RIGHT | 0x27 | Right arrow key\nVK_DOWN | 0x28 | Down arrow key\nVK_SELECT | 0x29 | Select key\nVK_PRINT | 0x2A | Print key\nVK_EXECUTE | 0x2B | Execute key\nVK_SNAPSHOT | 0x2C | Print screen key\nVK_INSERT | 0x2D | Insert key\nVK_DELETE | 0x2E | Delete key\nVK_HELP | 0x2F | Help key\n`0` | 0x30 | 0 key\n`1` | 0x31 | 1 key\n`2` | 0x32 | 2 key\n`3` | 0x33 | 3 key\n`4` | 0x34 | 4 key\n`5` | 0x35 | 5 key\n`6` | 0x36 | 6 key\n`7` | 0x37 | 7 key\n`8` | 0x38 | 8 key\n`9` | 0x39 | 9 key\n0x3A-40 | Undefined\n`A` | 0x41 | A key\n`B` | 0x42 | B key\n`C` | 0x43 | C key\n`D` | 0x44 | D key\n`E` | 0x45 | E key\n`F` | 0x46 | F key\n`G` | 0x47 | G key\n`H` | 0x48 | H key\n`I` | 0x49 | I key\n`J` | 0x4A | J key\n`K` | 0x4B | K key\n`L` | 0x4C | L key\n`M` | 0x4D | M key\n`N` | 0x4E | N key\n`O` | 0x4F | O key\n`P` | 0x50 | P key\n`Q` | 0x51 | Q key\n`R` | 0x52 | R key\n`S` | 0x53 | S key\n`T` | 0x54 | T key\n`U` | 0x55 | U key\n`V` | 0x56 | V key\n`W` | 0x57 | W key\n`X` | 0x58 | X key\n`Y` | 0x59 | Y key\n`Z` | 0x5A | Z key\nVK_LWIN | 0x5B | Left Windows logo key\nVK_RWIN | 0x5C | Right Windows logo key\nVK_APPS | 0x5D | Application key\n0x5E | Reserved\nVK_SLEEP | 0x5F | Computer Sleep key\nVK_NUMPAD0 | 0x60 | Numeric keypad 0 key\nVK_NUMPAD1 | 0x61 | Numeric keypad 1 key\nVK_NUMPAD2 | 0x62 | Numeric keypad 2 key\nVK_NUMPAD3 | 0x63 | Numeric keypad 3 key\nVK_NUMPAD4 | 0x64 | Numeric keypad 4 key\nVK_NUMPAD5 | 0x65 | Numeric keypad 5 key\nVK_NUMPAD6 | 0x66 | Numeric keypad 6 key\nVK_NUMPAD7 | 0x67 | Numeric keypad 7 key\nVK_NUMPAD8 | 0x68 | Numeric keypad 8 key\nVK_NUMPAD9 | 0x69 | Numeric keypad 9 key\nVK_MULTIPLY | 0x6A | Multiply key\nVK_ADD | 0x6B | Add key\nVK_SEPARATOR | 0x6C | Separator key\nVK_SUBTRACT | 0x6D | Subtract key\nVK_DECIMAL | 0x6E | Decimal key\nVK_DIVIDE | 0x6F | Divide key\nVK_F1 | 0x70 | F1 key\nVK_F2 | 0x71 | F2 key\nVK_F3 | 0x72 | F3 key\nVK_F4 | 0x73 | F4 key\nVK_F5 | 0x74 | F5 key\nVK_F6 | 0x75 | F6 key\nVK_F7 | 0x76 | F7 key\nVK_F8 | 0x77 | F8 key\nVK_F9 | 0x78 | F9 key\nVK_F10 | 0x79 | F10 key\nVK_F11 | 0x7A | F11 key\nVK_F12 | 0x7B | F12 key\nVK_F13 | 0x7C | F13 key\nVK_F14 | 0x7D | F14 key\nVK_F15 | 0x7E | F15 key\nVK_F16 | 0x7F | F16 key\nVK_F17 | 0x80 | F17 key\nVK_F18 | 0x81 | F18 key\nVK_F19 | 0x82 | F19 key\nVK_F20 | 0x83 | F20 key\nVK_F21 | 0x84 | F21 key\nVK_F22 | 0x85 | F22 key\nVK_F23 | 0x86 | F23 key\nVK_F24 | 0x87 | F24 key\n0x88-8F | Reserved\nVK_NUMLOCK | 0x90 | Num lock key\nVK_SCROLL | 0x91 | Scroll lock key\n0x92-96 | OEM specific\n0x97-9F | Unassigned\nVK_LSHIFT | 0xA0 | Left Shift key\nVK_RSHIFT | 0xA1 | Right Shift key\nVK_LCONTROL | 0xA2 | Left Ctrl key\nVK_RCONTROL | 0xA3 | Right Ctrl key\nVK_LMENU | 0xA4 | Left Alt key\nVK_RMENU | 0xA5 | Right Alt key\nVK_BROWSER_BACK | 0xA6 | Browser Back key\nVK_BROWSER_FORWARD | 0xA7 | Browser Forward key\nVK_BROWSER_REFRESH | 0xA8 | Browser Refresh key\nVK_BROWSER_STOP | 0xA9 | Browser Stop key\nVK_BROWSER_SEARCH | 0xAA | Browser Search key\nVK_BROWSER_FAVORITES | 0xAB | Browser Favorites key\nVK_BROWSER_HOME | 0xAC | Browser Start and Home key\nVK_VOLUME_MUTE | 0xAD | Volume Mute key\nVK_VOLUME_DOWN | 0xAE | Volume Down key\nVK_VOLUME_UP | 0xAF | Volume Up key\nVK_MEDIA_NEXT_TRACK | 0xB0 | Next Track key\nVK_MEDIA_PREV_TRACK | 0xB1 | Previous Track key\nVK_MEDIA_STOP | 0xB2 | Stop Media key\nVK_MEDIA_PLAY_PAUSE | 0xB3 | Play/Pause Media key\nVK_LAUNCH_MAIL | 0xB4 | Start Mail key\nVK_LAUNCH_MEDIA_SELECT | 0xB5 | Select Media key\nVK_LAUNCH_APP1 | 0xB6 | Start Application 1 key\nVK_LAUNCH_APP2 | 0xB7 | Start Application 2 key\n0xB8-B9 | Reserved\nVK_OEM_1 | 0xBA | It can vary by keyboard. For the US ANSI keyboard , the Semiсolon and Colon key\nVK_OEM_PLUS | 0xBB | For any country/region, the Equals and Plus key\nVK_OEM_COMMA | 0xBC | For any country/region, the Comma and Less Than key\nVK_OEM_MINUS | 0xBD | For any country/region, the Dash and Underscore key\nVK_OEM_PERIOD | 0xBE | For any country/region, the Period and Greater Than key\nVK_OEM_2 | 0xBF | It can vary by keyboard. For the US ANSI keyboard, the Forward Slash and Question Mark key\nVK_OEM_3 | 0xC0 | It can vary by keyboard. For the US ANSI keyboard, the Grave Accent and Tilde key\n0xC1-DA | Reserved\nVK_OEM_4 | 0xDB | It can vary by keyboard. For the US ANSI keyboard, the Left Brace key\nVK_OEM_5 | 0xDC | It can vary by keyboard. For the US ANSI keyboard, the Backslash and Pipe key\nVK_OEM_6 | 0xDD | It can vary by keyboard. For the US ANSI keyboard, the Right Brace key\nVK_OEM_7 | 0xDE | It can vary by keyboard. For the US ANSI keyboard, the Apostrophe and Double Quotation Mark key\nVK_OEM_8 | 0xDF | It can vary by keyboard. For the Canadian CSA keyboard, the Right Ctrl key\n0xE0 | Reserved\n0xE1 | OEM specific\nVK_OEM_102 | 0xE2 | It can vary by keyboard. For the European ISO keyboard, the Backslash and Pipe key\n0xE3-E4 | OEM specific\nVK_PROCESSKEY | 0xE5 | IME PROCESS key\n0xE6 | OEM specific\nVK_PACKET | 0xE7 | Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP\n0xE8 | Unassigned\n0xE9-F5 | OEM specific\nVK_ATTN | 0xF6 | Attn key\nVK_CRSEL | 0xF7 | CrSel key\nVK_EXSEL | 0xF8 | ExSel key\nVK_EREOF | 0xF9 | Erase EOF key\nVK_PLAY | 0xFA | Play key\nVK_ZOOM | 0xFB | Zoom key\nVK_NONAME | 0xFC | Reserved\nVK_PA1 | 0xFD | PA1 key\nVK_OEM_CLEAR | 0xFE | Clear key\n\n## Acknowledgments\n\n### Groups\n\n- [The Forgotten Hope Team](http://forgottenhope.warumdarum.de/)\n\n  Major knowledge-base and inspiration.\n\n- [The Project Reality Team](https://www.realitymod.com/)\n\n  memes\n\n- [The ReShade Community](https://reshade.me/)\n\n  Where the coding journey started.\n\n- [Vietnamese Student Association](https://www.instagram.com/asu.vsa)\n\n  The community I needed.\n\n- Family, friends, and acquaintances\n\n  You know who you are.\n\n### Individuals\n\nThe Shadersphere.\n\n- BeTa/Alea\n- BlueSkyDefender\n- Pfoiffee\n- Certain individuals in #code-chat/#shader-programming\n\nGitHub Contributors\n\n- Overall\n\n  - 0CCULTIST\n\n- Reported Bugs\n\n  - Jakey757\n  - simonedibilio\n  - WardedPredator\n\n- Submitted Ideas\n\n  - mrjoshisattvablack\n  - liuxd17thu\n  - Maximus961\n\n- Asked Questions\n\n  - R0nBurgandy\n  - lapsio\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpapadanku%2Fcshade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpapadanku%2Fcshade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpapadanku%2Fcshade/lists"}