Pages: 1
  Print  
Author Topic: Perfect Circles  (Read 2321 times)
Offline (Male) Goombert
Posted on: May 27, 2013, 02:35:42 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
I had a great idea of how we can make perfect circles in OpenGL3, make a flat plane, color it with a fragment shader  :D
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) Ideka
Reply #1 Posted on: May 27, 2013, 09:46:54 AM

Member
Joined: Apr 2011
Posts: 85

View Profile
Quote
http://tinyurl.com/JANETHISISYOU
uu: I BELIEVE I HAVE CHOSEN THE PERFECT SHAPE FOR YOU.
uu: IT IS DESCRIBED IN CERTAIN CIRCLES KNOWLEDGEABLE OF THE ARTS. AS. "A CIRCLE".
uu: I AM VERY PLEASED WITH HOW FAITHFULLY IT HAS CAPTURED THE OBSCENE ROTUNDITY. OF YOUR MAGNIFICENT CARRIAGE.
uu: TRULY A SPITTING IMAGE OF THE CROCKER BITCH.
uu: NOW LISTEN CAREFULLY. YOU MAY LEARN SOMETHING.
uu: THE MASTERPIECE AFICIONADO WILL NOTICE. HOW I ACHIEVED THIS HIGHLY ADVANCED AND DIFFICULT SHAPE.
uu: WHAT MOST GIFTED ARTISANS WILL TELL YOU. IS THAT. CIRCLES ARE BASICALLY FUCKING IMPOSSIBLE TO DRAW.
uu: TRUST ME.
uu: IT'S LIKE A PARADOX. A SHAPE WITHOUT ANGLES. WHAT??
uu: SO I FUCKING CHEATED.
uu: I NAVIGATED THE IRRATIONAL PERIMETER BY MAKING A LOT OF EASILY UNDERSTANDABLE, TOTALLY LOGICAL MARKS. FORMING A WHOLE BUNCH OF LITTLE RIGHT ANGLES.
uu: THE CHEATING PART HAPPENS WHEN I DO THIS A LOT. SO IT GOES IN A ROUND DIRECTION.
uu: THIS ONE CAME OUT WELL I THINK. BUT THERE'S ROOM TO IMPROVE.
uu: I HAVE THEORIZED THAT IF I KEEP MAKING BOGUS CIRCLES LIKE THIS.
uu: WHILE DRAWING MORE AND MORE ANGLES. BUT SMALLER. SO SMALL THAT YOU START CAN'T SEEING THEM.
uu: THAT THE ILLUSION OF THE CIRCLE WILL BE COMPLETE! AND PEOPLE WILL BELIEVE IN THE FAKE CIRCLE. LIKE A BUNCH OF SUCKERS.
uu: I BET NOBODY HAS THOUGHT OF THAT CIRCLE STRATEGY. I THINK I'M THE FIRST AT THIS IDEA. AND BEST AT IT ALREADY.
uu: PEOPLE THINK I'M DUMB. ESPECIALLY THE VOICE IN MY HEAD.
uu: AND THEY MAY BE RIGHT ABOUT ME BEING DUMB.
uu: BUT WHEN IT COMES TO THE SPECIAL WAY I DO THINGS. WHICH IS ALWAYS ACTUALLY. THE PERFECT WAY.
uu: I AM.
uu: A GENIUS!
Logged
Offline (Male) Goombert
Reply #2 Posted on: May 27, 2013, 08:09:25 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
 :D
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) Josh @ Dreamland
Reply #3 Posted on: May 27, 2013, 08:27:23 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
I'll just cut to the chase on this one: the distance computation for the needed fill rate on large circles would make one polygon worse than fifty. Maybe if you used exactly 20 to minimize the needed fill rate, you would be okay, but then the shader would need an x,y parameter, which would need to be factored into the struct passed from the vertex shader to the fragment shader. If you did that, though, you could reasonably draw perfect circles with mathematically perfect anti-aliasing.

I find Ideka's solution equally elegant.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) TheExDeus
Reply #4 Posted on: May 28, 2013, 02:09:29 AM

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Isn't the fill rate the same? Fillrate is the amount of pixels drawn to memory. If you render a fully visible polygonal circle and a pixel shader based circle, the amount should be the same. Okay, it will have to "render" invisible pixels around the circle boarder (that's 21% more area), but seeing as that is done in pixel shaders - something extremely fast in a modern GPU - then I don't think there would be performance problems. But we could just test this...

Only if the implemented pixel shaders worked on windows...
Logged
Offline (Male) Goombert
Reply #5 Posted on: May 28, 2013, 02:26:58 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
??? ExDeus they do, we just got that cubes demo working on Windows, so OpenGL3 and GLSL work on Windows now, it was just a makefile problem. The only thing I have not finished is materials and unform shader variables functions.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #6 Posted on: May 28, 2013, 02:53:28 AM

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Has anyone on Windows got them working then? Because the demo worked for me all the time. I never had a makefile problem. But the shaders don't work. When I enable toon shader in the demo I don't see any change. I tried different things with the paths and stuff. I need to check if the source is even loaded and if shader compiler returns errors.
Logged
Offline (Male) Goombert
Reply #7 Posted on: May 28, 2013, 03:09:01 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
That or I also believe the shaders I added are version 1 yet I labeled them 3.3, so maybe your graphics hardware is too new?
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #8 Posted on: May 28, 2013, 03:28:59 AM

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Well it is always backwards compatible I think. So there can't be hardware too new.
Logged
Offline (Male) Josh @ Dreamland
Reply #9 Posted on: May 28, 2013, 08:43:52 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
I was speaking of circle outlines, but I would still use a hollow decagon for regular circles, too. The less of the fill we compute by taking the distance to center, the better.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Pages: 1
  Print