Skip to content

Instantly share code, notes, and snippets.

@KumoKairo
Created December 25, 2017 17:54
Show Gist options
  • Save KumoKairo/6309453e691e224a0b05fd7a18be12ea to your computer and use it in GitHub Desktop.
Save KumoKairo/6309453e691e224a0b05fd7a18be12ea to your computer and use it in GitHub Desktop.
Shader "Gameboy"
{
...
sampler2D _MainTex;
float4 _Darkest, _Dark, _Ligt, _Ligtest;
float4 frag (v2f i) : SV_Target
{
float4 originalColor = tex2D(_MainTex, i.uv);
float luma = dot(originalColor.rgb, float3(0.2126, 0.7152, 0.0722));
float posterized = floor(luma * 4) / (4 - 1);
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment