2013-03-07 09:46:55 -07:00
|
|
|
void main()
|
2010-07-05 16:31:03 -06:00
|
|
|
{
|
2014-07-29 11:08:57 -06:00
|
|
|
float4 c0 = Sample();
|
2013-03-07 09:46:55 -07:00
|
|
|
float red = c0.r;
|
|
|
|
float blue = c0.b;
|
|
|
|
float green = c0.g;
|
2014-05-05 14:59:49 -06:00
|
|
|
float factor = 2.0;
|
2013-03-07 09:46:55 -07:00
|
|
|
float max = 0.8;
|
|
|
|
float min = 0.3;
|
2011-01-30 17:08:06 -07:00
|
|
|
|
2014-05-20 21:57:31 -06:00
|
|
|
if (c0.r > c0.g && c0.b > c0.g)
|
|
|
|
{
|
|
|
|
if (c0.r < c0.b + 0.05 && c0.b < c0.r + 0.05)
|
|
|
|
{
|
2013-03-07 09:46:55 -07:00
|
|
|
red = 0.7;
|
|
|
|
blue = 0.7;
|
|
|
|
green = 0.05;
|
|
|
|
}
|
2014-05-20 21:57:31 -06:00
|
|
|
else if (c0.r > c0.b + 0.05)
|
|
|
|
{
|
2013-03-07 09:46:55 -07:00
|
|
|
red = 0.7;
|
|
|
|
blue = 0.05;
|
|
|
|
green = 0.05;
|
|
|
|
}
|
2014-05-20 21:57:31 -06:00
|
|
|
else if (c0.b > c0.r + 0.05)
|
|
|
|
{
|
2013-03-07 09:46:55 -07:00
|
|
|
red = 0.05;
|
|
|
|
blue = 0.7;
|
|
|
|
green = 0.05;
|
|
|
|
}
|
2010-07-05 16:31:03 -06:00
|
|
|
}
|
2011-01-30 17:08:06 -07:00
|
|
|
|
2014-05-21 14:29:25 -06:00
|
|
|
if (c0.r > c0.b && c0.g > c0.b)
|
|
|
|
{
|
2014-05-20 21:57:31 -06:00
|
|
|
if (c0.r < c0.g + 0.05 && c0.g < c0.r + 0.05)
|
|
|
|
{
|
2013-03-07 09:46:55 -07:00
|
|
|
red = 0.7;
|
|
|
|
blue = 0.05;
|
|
|
|
green = 0.7;
|
|
|
|
}
|
2014-05-20 21:57:31 -06:00
|
|
|
else if (c0.r > c0.g + 0.05)
|
|
|
|
{
|
2013-03-07 09:46:55 -07:00
|
|
|
red = 0.7;
|
|
|
|
blue = 0.05;
|
|
|
|
green = 0.05;
|
|
|
|
}
|
2014-05-20 21:57:31 -06:00
|
|
|
else if (c0.g > c0.r + 0.05)
|
|
|
|
{
|
2013-03-07 09:46:55 -07:00
|
|
|
red = 0.05;
|
|
|
|
blue = 0.05;
|
|
|
|
green = 0.7;
|
|
|
|
}
|
2010-07-05 16:31:03 -06:00
|
|
|
}
|
2011-01-30 17:08:06 -07:00
|
|
|
|
2014-05-20 21:57:31 -06:00
|
|
|
if (c0.g > c0.r && c0.b > c0.r)
|
|
|
|
{
|
|
|
|
if (c0.g < c0.b + 0.05 && c0.b < c0.g + 0.05)
|
|
|
|
{
|
2013-03-07 09:46:55 -07:00
|
|
|
red = 0.05;
|
|
|
|
blue = 0.7;
|
|
|
|
green = 0.7;
|
|
|
|
}
|
2014-05-21 14:29:25 -06:00
|
|
|
else if (c0.g > c0.b + 0.05)
|
|
|
|
{
|
2013-03-07 09:46:55 -07:00
|
|
|
red = 0.05;
|
|
|
|
blue = 0.05;
|
|
|
|
green = 0.7;
|
|
|
|
}
|
2014-05-21 14:29:25 -06:00
|
|
|
else if (c0.b > c0.g + 0.05)
|
|
|
|
{
|
2013-03-07 09:46:55 -07:00
|
|
|
red = 0.05;
|
|
|
|
blue = 0.7;
|
|
|
|
green = 0.05;
|
|
|
|
}
|
|
|
|
}
|
2014-07-29 11:08:57 -06:00
|
|
|
SetOutput(float4(red, green, blue, c0.a));
|
2013-03-07 09:46:55 -07:00
|
|
|
}
|