libretro/common-shaders
FreeCollection of commonly used Cg shaders. These shaders are usable by either HLSL and/or Cg runtime compilers. The cg2glsl script will translate most of these into GLSL shaders.
About libretro/common-shaders
This repository contains a collection of pixel shaders written in the Cg language, intended for use in old school emulators. The shaders are compatible with both OpenGL and D3D backends and follow a strict specification for vertex and fragment entry points, texture coordinates, and uniform parameters. Known implementations include RetroArch, SNES9x, and OpenEmu. The collection covers a wide range of effects such as CRT simulation, anti-aliasing, blur, dithering, scalers (hqx, xbr, xbrz, eagle, etc.), NTSC/PAL artifacts, motion blur, and more. A cg2glsl script is provided to translate most shaders into GLSL for broader compatibility.
Key Features
Pros & Cons
- Comprehensive collection of shaders covering many common effects
- Open source and free to use
- Well-documented specification for easy integration
- Compatible with multiple popular emulators
- Includes conversion tool for GLSL compatibility
- Requires Cg runtime or HLSL, which may be deprecated or unavailable on some systems
- Some shaders may not translate perfectly with the cg2glsl script
- Power-of-two textures recommended for optimal quality
- Top-left texture coordinate origin differs from typical GPU expectations
- Active development may be limited; community-maintained