mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
157 lines
3.5 KiB
Plaintext
157 lines
3.5 KiB
Plaintext
uniform samplerRECT samp0 : register(s0);
|
|
|
|
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
|
{
|
|
float4 c0 = texRECT(samp0, uv0).rgba;
|
|
|
|
//Change this number to increase the pixel size.
|
|
int pixelSize = 2;
|
|
|
|
float red = 0.0;
|
|
float green = 0.0;
|
|
float blue = 0.0;
|
|
int val = uv0[0];
|
|
int val2 = uv0[1];
|
|
|
|
val = val % pixelSize;
|
|
val2 = val2 % pixelSize;
|
|
|
|
if(val == 0 && val2 == 0 ){
|
|
if (c0.r < 0.06 && c0.r >= 0)
|
|
red = 0.06;
|
|
if (c0.r < 0.13 && c0.r >= 0.06)
|
|
red = 0.13;
|
|
if (c0.r < 0.26 && c0.r >= 0.13)
|
|
red = 0.26;
|
|
if (c0.r < 0.33 && c0.r >= 0.26)
|
|
red = 0.33;
|
|
if (c0.r <0.46 && c0.r >= 0.33)
|
|
red = 0.46;
|
|
if (c0.r <0.60 && c0.r >= 0.46)
|
|
red = 0.60;
|
|
if (c0.r <0.73 && c0.r >= 0.60)
|
|
red = 0.73;
|
|
if (c0.r <0.80 && c0.r >= 0.73)
|
|
red = 0.80;
|
|
if (c0.r <0.93 && c0.r >= 0.80)
|
|
red = 0.93;
|
|
if (c0.r <=1 && c0.r >= 0.93)
|
|
red = 1;
|
|
|
|
if (c0.b < 0.06 && c0.b >= 0)
|
|
blue = 0.06;
|
|
if (c0.b < 0.13 && c0.b >= 0.06)
|
|
blue = 0.13;
|
|
if (c0.b < 0.26 && c0.b >= 0.13)
|
|
blue = 0.26;
|
|
if (c0.b < 0.33 && c0.b >= 0.26)
|
|
blue = 0.33;
|
|
if (c0.b <0.46 && c0.b >= 0.33)
|
|
blue = 0.46;
|
|
if (c0.b <0.60 && c0.b >= 0.46)
|
|
blue = 0.60;
|
|
if (c0.b <0.73 && c0.b >= 0.60)
|
|
blue = 0.73;
|
|
if (c0.b <0.80 && c0.b >= 0.73)
|
|
blue = 0.80;
|
|
if( c0.b <0.93 && c0.b >= 0.80)
|
|
blue = 0.93;
|
|
if (c0.b <=1 && c0.b >= 0.93)
|
|
blue = 1;
|
|
|
|
|
|
if (c0.g < 0.06 && c0.g >= 0)
|
|
green = 0.06;
|
|
if (c0.g < 0.13 && c0.g >= 0.06)
|
|
green = 0.13;
|
|
if (c0.g < 0.26 && c0.g >= 0.13)
|
|
green = 0.26;
|
|
if (c0.g < 0.33 && c0.g >= 0.26)
|
|
green = 0.33;
|
|
if (c0.g <0.46 && c0.g >= 0.33)
|
|
green = 0.46;
|
|
if (c0.g <0.60 && c0.g >= 0.46)
|
|
green = 0.60;
|
|
if (c0.g <0.73 && c0.g >= 0.60)
|
|
green = 0.73;
|
|
if (c0.g <0.80 && c0.g >= 0.73)
|
|
green = 0.80;
|
|
if( c0.g <0.93 && c0.g >= 0.80)
|
|
green = 0.93;
|
|
if (c0.g <=1 && c0.g >= 0.93)
|
|
green = 1;
|
|
|
|
}
|
|
else{
|
|
float4 c1 = texRECT(samp0, uv0-float2(val, val2)).rgba;
|
|
|
|
if (c1.r < 0.06 && c1.r >= 0)
|
|
red = 0.06;
|
|
if (c1.r < 0.13 && c1.r >= 0.06)
|
|
red = 0.13;
|
|
if (c1.r < 0.26 && c1.r >= 0.13)
|
|
red = 0.26;
|
|
if (c1.r < 0.33 && c1.r >= 0.26)
|
|
red = 0.33;
|
|
if (c1.r <0.46 && c1.r >= 0.33)
|
|
red = 0.46;
|
|
if (c1.r <0.60 && c1.r >= 0.46)
|
|
red = 0.60;
|
|
if (c1.r <0.73 && c1.r >= 0.60)
|
|
red = 0.73;
|
|
if (c1.r <0.80 && c1.r >= 0.73)
|
|
red = 0.80;
|
|
if (c1.r <0.93 && c1.r >= 0.80)
|
|
red = 0.93;
|
|
if (c1.r <=1 && c1.r >= 0.93)
|
|
red = 1;
|
|
|
|
if (c1.b < 0.06 && c1.b >= 0)
|
|
blue = 0.06;
|
|
if (c1.b < 0.13 && c1.b >= 0.06)
|
|
blue = 0.13;
|
|
if (c1.b < 0.26 && c1.b >= 0.13)
|
|
blue = 0.26;
|
|
if (c1.b < 0.33 && c1.b >= 0.26)
|
|
blue = 0.33;
|
|
if (c1.b <0.46 && c1.b >= 0.33)
|
|
blue = 0.46;
|
|
if (c1.b <0.60 && c1.b >= 0.46)
|
|
blue = 0.60;
|
|
if (c1.b <0.73 && c1.b >= 0.60)
|
|
blue = 0.73;
|
|
if (c1.b <0.80 && c1.b >= 0.73)
|
|
blue = 0.80;
|
|
if( c1.b <0.93 && c1.b >= 0.80)
|
|
blue = 0.93;
|
|
if (c1.b <=1 && c1.b >= 0.93)
|
|
blue = 1;
|
|
|
|
|
|
if (c1.g < 0.06 && c1.g >= 0)
|
|
green = 0.06;
|
|
if (c1.g < 0.13 && c1.g >= 0.06)
|
|
green = 0.13;
|
|
if (c1.g < 0.26 && c1.g >= 0.13)
|
|
green = 0.26;
|
|
if (c1.g < 0.33 && c1.g >= 0.26)
|
|
green = 0.33;
|
|
if (c1.g <0.46 && c1.g >= 0.33)
|
|
green = 0.46;
|
|
if (c1.g <0.60 && c1.g >= 0.46)
|
|
green = 0.60;
|
|
if (c1.g <0.73 && c1.g >= 0.60)
|
|
green = 0.73;
|
|
if (c1.g <0.80 && c1.g >= 0.73)
|
|
green = 0.80;
|
|
if( c1.g <0.93 && c1.g >= 0.80)
|
|
green = 0.93;
|
|
if ( c1.g >= 0.93)
|
|
green = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
ocol0 = float4(red, green, blue, c0.a);
|
|
} |