Skip to content

Instantly share code, notes, and snippets.

@galacticglum
Created June 2, 2018 23:19
Show Gist options
  • Save galacticglum/992b465ffa883bdd8718a456c94bbbea to your computer and use it in GitHub Desktop.
Save galacticglum/992b465ffa883bdd8718a456c94bbbea to your computer and use it in GitHub Desktop.
int pixelPosition = (int)pixelScreenCoordinates.x % 3;
float4 output = float4(0, 0, 0, 1);
if (pixelPosition == 1)
{
output.r = color.r;
}
else if (pixelPosition == 2)
{
output.g = color.g;
}
else
{
output.b = color.b;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment