libretro / common-shaders

Collection 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.
http://www.libretro.com
1.03k stars 250 forks source link

nes-color-decoder improvements and colorimetry shader #111

Closed Monroe88 closed 7 years ago

Monroe88 commented 7 years ago

nes-color-decoder now use a runtime parameter to toggle between Sony CXA2025AS US conversion and normal FCC conversion; the "common" conversion matrix can be used instead if USE_FCC_MATRIX is commented out. Also, added the different clipping methods from Drag's NES Palette Generator, where colors can be clamped, darkened, or desaturated.

Added a colorimetry shader based on the code from Drag's NES Palette Generator as well. This is a separate shader for now, since it can be applied to things besides NES. Allows selecting between D93 and D65 white points;, selecting between FCC 1953, SMPTE C, and sRGB colorimetry, and selecting a clipping method like with nes-color-decoder.

Added an example preset with the nes-color-decoder, colorimetry, and pixellate shaders to the cgp directory.