File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,29 @@ The CIE L\*a\*b\* color space has a perceptional uniform lightness in one axis a
8787perceptional uniform color plane. The CIE L\* a\* b\* color space may be a valid color space
8888to do anti-aliasing in, but it is computational expensive.
8989
90+ Do: Properly calculate coverage for sub-pixels
91+ ----------------------------------------------
92+ We sample the signed distance from the center over each sub-pixel.
93+ Since we only have a distance and not an angle, we measure the coverage
94+ of a plane and a circle. The SDF measures the plane's edge from the
95+ centre of the circle, when the signed-distance is negative the
96+ plane intersects with the centre of the circle, while positive it
97+ doesn't.
98+
99+ The circle's area should match the area of the pixel which is 1.0 x 1.0 = 1.0,
100+ this makes: r = sqrt(1/π) = 0.5641895835.
101+
102+ d = signed distance
103+
104+ r = radius of sample circle
105+
106+ x = d / r (-1 <= x <= 1)
107+
108+ f(x) = (1/π) * (acos(x) − x* sqrt(1 - x* x))
109+
110+
111+ Perceptional uniform anti-aliasing
112+
90113Do: Convert coverage to alpha with perceptional compensation
91114------------------------------------------------------------
92115Lets try something cheaper.
You can’t perform that action at this time.
0 commit comments