mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 15:51:30 +11:00
add black/white masks to subpixel mask function
This commit is contained in:
parent
94b4fc4f3e
commit
14721633b2
|
@ -323,6 +323,26 @@ vec3 mask_weights(vec2 coord, float mask_intensity, int phosphor_layout){
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -643,5 +663,27 @@ vec3 mask_weights_alpha(vec2 coord, float mask_intensity, int phosphor_layout, o
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue