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

gist.github.com/agyild/bbb4e58298b2f86aa24da30…
CAS homepage screenshot

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+
Best for: mpv users who want AMD's Contrast Adaptive Sharpening applied as a shader during video upscaling.
Good for
  • 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.
Watch out for
  • 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

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

CAS alternatives

Tools and sites you could use instead, ranked by how closely they match.

FSR

gist.github.com/agyild/82219c545228d70c5604f86…

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.

All 194

CAS FAQ

What is the maximum upscaling factor the shader handles?
Per AMD's guidelines, CAS scales content up to 4x, such as 1080p to 2160p or 720p to 1440p. Any further scaling is processed by mpv's scalers.
What should be changed for content that is not BT.1886?
The file assumes BT.1886 content by default. The SOURCE_TRC and TARGET_TRC variables should be changed to match the content. The source suggests creating separate versions with different colorspace values and applying them through autoprofiles.
What happens if the filter runs in non-linear light?
The source states that running in non-linear light results in oversharpening.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing