Skip to content

Instantly share code, notes, and snippets.

@joletb
Created January 11, 2018 18:02
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joletb/9c718eafb0249546d0f05737c7469efb to your computer and use it in GitHub Desktop.
Save joletb/9c718eafb0249546d0f05737c7469efb to your computer and use it in GitHub Desktop.
sampler s0 : register(s0);
#define const_1 ( 16.0 / 235.0)
#define const_2 (235.0 / 219.0)
float4 main(float2 tex : TEXCOORD0) : COLOR
{
// original pixel
float4 c0 = tex2D(s0, tex);
return ((c0 - const_1) * const_2);
}
@FichteFoll
Copy link

Here's a comparison for how this looks with and without the shader: https://diff.pics/DIRD4kvAGVVv/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment