File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 11const float degree_per_px = 0.01 ; // higher value causes blinking due to optimizations in the psf_glow()
2+ const float inv_max_offset = 2.0 / (3.0 * sqrt (2.0 ) * degree_per_px); // 1/px
23
34varying vec3 v_color;
45varying float max_theta;
@@ -7,10 +8,8 @@ varying float pointSize;
78float psf_core(float offset)
89{
910 // Human eye's point source function from the research by Greg Spencer et al. (1995)
10- // Optimized for the central part of the PSF. The flow from the nine neighboring pixels is constant.
11- // Designed for degree_per_px == 0.01.
12- return 1.0 + offset * (0.2789 * offset - 1.0 );
13- // the second summand is allowed to be scaled to achieve a seamless transition between modes
11+ // Optimized for the central part of the PSF (3x3 pixels square).
12+ return 1.0 - offset * inv_max_offset;
1413}
1514
1615float psf_glow(float offset)
You can’t perform that action at this time.
0 commit comments