radial: configurable offsets (#73)

* Add: Offset radial visualizer (config)

* Add: Offset radial visualizer
This commit is contained in:
Robin B
2018-10-25 18:56:59 +02:00
committed by GitHub
parent 3da1fb34dd
commit 52af6ac173
2 changed files with 6 additions and 2 deletions

View File

@@ -41,8 +41,8 @@ void main() {
Alpha layer blending is only applied when `xroot` transparency is enabled. */
float /* translate (x, y) to use (0, 0) as the center of the screen */
dx = gl_FragCoord.x - (screen.x / 2),
dy = gl_FragCoord.y - (screen.y / 2);
dx = gl_FragCoord.x - (screen.x / 2) + CENTER_OFFSET_X,
dy = gl_FragCoord.y - (screen.y / 2) + CENTER_OFFSET_Y;
float theta = atan(dy, dx); /* fragment angle with the center of the screen as the origin */
float d = sqrt((dx * dx) + (dy * dy)); /* distance */
if (d > C_RADIUS - (float(C_LINE) / 2.0F) && d < C_RADIUS + (float(C_LINE) / 2.0F)) {