Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. float aR = screenHeight / screenWidth; // 16:9 = 1.777, 4:3 = 1.333 etc
  2. float newX = (SceneUV.x / aR);
  3. float centerX = 0.5;
  4. float newY = SceneUV.y;
  5. float centerY = 0.5;
  6. float cDis;
  7.  
  8. cDis = sqrt(pow(newX - centerX, 2) + pow(newY - centerY, 2));
  9.  
  10. if (cDis >= .06 && cDis <= .063)
  11. {
  12. OutColor = circleColor;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement