
This Gist provides an AMD FidelityFX Contrast Adaptive Sharpening shader file for mpv.

About CAS
This GitHub Gist hosts CAS-scaled.glsl, a GLSL shader file that ports AMD's FidelityFX Contrast Adaptive Sharpening v1.0.2 to mpv, the media player. The page is a code-sharing page rather than an application, so the file is downloaded or viewed on the page and used as an mpv shader. The file's license text is included, and it states that the software is provided "as is" without warranty.
The shader applies sharpening during upscaling. Per AMD's guidelines, CAS scales content up to 4x, and any further scaling is handled by mpv's own scalers. The file is designed to run in linear light and includes optional relinearization and delinearization passes that assume BT.1886 content by default. Users working with other content must change the SOURCE_TRC and TARGET_TRC variables, and running the filter in non-linear light is noted to cause oversharpening.
Key features
- AMD FidelityFX Contrast Adaptive Sharpening v1.0.2 ported to mpv
- Upscaling up to 4x, with larger scaling handled by mpv's scalers
- Processes the luma plane directly rather than deriving it from RGB
- Optional relinearization and delinearization passes via SOURCE_TRC and TARGET_TRC
- Custom gamma curve support for relinearization
- Optimized texture lookups for OpenGL 4.0+, DirectX 10+, and OpenGL ES 3.1+
- Changelog states that operating directly on the luma plane reduces texture lookups, with a stated performance benefit on OpenGL 4.0+ renderers.
- Includes optimized texture lookups for several named graphics APIs.
- Offers configurable colorspace handling and custom gamma curve support.
- Upscaling is limited to 4x within the filter; further scaling depends on mpv's scalers.
- Default settings assume BT.1886 content, and other content requires editing variables.
- Running in non-linear light is noted to cause oversharpening.
CAS at a glance
- Category
- Software & Utilities › Media Players & Servers
- Type
- Website
- Pricing
- Not confirmed. Check the site
- Platforms
- Web
- Open source
- Not stated
- Language
- English
- Last checked
- Oct 6, 2026 · Online when checked
- Listed
- Oct 5, 2026
Guides for Media Players & Servers

CAS alternatives
Tools and sites you could use instead, ranked by how closely they match.
This GitHub gist provides an AMD FidelityFX Super Resolution GLSL shader for use with mpv.
Popular in Media Players & Servers
Well-known listings from the same topic.
CAS FAQ
What is the maximum upscaling factor the shader handles?
What should be changed for content that is not BT.1886?
What happens if the filter runs in non-linear light?
Tell us and an editor will check it.
Claim the listing and suggest updates yourself. An editor checks every claim first.







