Polygon is too bitmap.
-
- Prole
- Posts: 30
- Joined: Mon May 13, 2024 4:05 pm
Polygon is too bitmap.
Im using love.graphics.polygon, and its working, but the resulting polygon looks to pixelated to me, is there a way to make it have a higher quality to make it look more closer to an svg?
Re: Polygon is too bitmap.
Pixelated like aliased? You could enable multi-sampled antialiasing by adding a conf.lua to your project with following code:
https://love2d.org/wiki/Config_Files
Code: Select all
function love.conf(t)
t.window.msaa = 4 -- The number of samples to use with multi-sampled antialiasing (number)
end
Re: Polygon is too bitmap.
img:setFilter("linear", "nearest")
??
??
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
Re: Polygon is too bitmap.
Probably that. Shouldn't this be a default option, anyway? I see many people having these issues on the forums. What does @slime think?
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Re: Polygon is too bitmap.
polygon and image are different beasts maybe so it might not be the filter but agree it should be the default option.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
- slime
- Solid Snayke
- Posts: 3159
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Polygon is too bitmap.
As-is, people who use nearest talk about setFilter / setDefaultFilter. And people who use linear don't. So just listening to who's talking about it won't tell you how many people are using each mode.
Both have valid uses for different art / aesthetic styles. Personally I don't think changing the default has enough value to offset the fact that it would be an unwanted change for many people. But my opinion could be changed with a strong argument, I just haven't seen one so far.
Either way the choice has no effect on polygons and other shape APIs.
-
- Prole
- Posts: 30
- Joined: Mon May 13, 2024 4:05 pm
Re: Polygon is too bitmap.
What I mean by bitmap is like it looks like this. Love2d polygons have to have higher res capabilities right?
Re: Polygon is too bitmap.
Have you tried what mön said? Filled polygons and circles are made of OpenGL triangles, which are usually rendered by default without antialiasing. setFilter won't help in this case though.
-
- Prole
- Posts: 30
- Joined: Mon May 13, 2024 4:05 pm
Re: Polygon is too bitmap.
Yes. I have. But, i mean, the Pixel res has to have higher capabilities right? Like with circles? Triangles look basically great but circles are a bit mid.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Polygon is too bitmap.
You said polygon before, not specifically circle;
love.graphics.circle has an extra segments parameter you can give a high enough number so it looks smoother; try that.
love.graphics.circle has an extra segments parameter you can give a high enough number so it looks smoother; try that.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests