add black/white masks to subpixel mask function

This commit is contained in:
hizzlekizzle 2022-06-10 08:33:15 -05:00 committed by GitHub
parent 94b4fc4f3e
commit 14721633b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -323,6 +323,26 @@ vec3 mask_weights(vec2 coord, float mask_intensity, int phosphor_layout){
return weights; return weights;
} }
else if(phosphor_layout == 22){
// black and white aperture; good for weird subpixel layouts and low brightness; good for 1080p and lower
vec3 bw3[3] = vec3[](black, white, white);
z = int(floor(mod(coord.x, 3.0)));
weights = bw3[z];
return weights;
}
else if(phosphor_layout == 23){
// black and white aperture; good for weird subpixel layouts and low brightness; good for 4k
vec3 bw4[4] = vec3[](black, black, white, white);
z = int(floor(mod(coord.x, 4.0)));
weights = bw4[z];
return weights;
}
else return weights; else return weights;
} }
@ -643,5 +663,27 @@ vec3 mask_weights_alpha(vec2 coord, float mask_intensity, int phosphor_layout, o
return weights; return weights;
} }
else if(phosphor_layout == 22){
// black and white aperture; good for weird subpixel layouts and low brightness; good for 1080p and lower
vec3 bw3[3] = vec3[](black, white, white);
z = int(floor(mod(coord.x, 3.0)));
weights = bw3[z];
alpha = 2./3.;
return weights;
}
else if(phosphor_layout == 23){
// black and white aperture; good for weird subpixel layouts and low brightness; good for 4k
vec3 bw4[4] = vec3[](black, black, white, white);
z = int(floor(mod(coord.x, 4.0)));
weights = bw4[z];
alpha = 0.5;
return weights;
}
else return weights; else return weights;
} }