Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing max. number of samples (MSAA) check #9916

Merged
merged 1 commit into from
Jul 28, 2017

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jul 27, 2017

@akien-mga akien-mga added this to the 3.0 milestone Jul 27, 2017
int max_samples = 0;
glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
if (msaa > max_samples) {
WARN_PRINT("MSAA must be <= GL_MAX_SAMPLES, falling-back to GL_MAX_SAMPLES.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe display the value of GL_MAX_SAMPLES too for clarity? Otherwise it's trial and error to find out the GPU limitation I guess?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@akien-mga akien-mga merged commit 3ea3c2d into godotengine:master Jul 28, 2017
@bruvzg bruvzg deleted the 3.0-msaa-check branch July 28, 2017 09:46
@vnen
Copy link
Member

vnen commented Jul 28, 2017

Hm, would be interesting to retrieve this value in-game somehow, so if we add a "Graphics Options" menu, it's possible to limit to the player's hardware capability.

@akien-mga
Copy link
Member

akien-mga commented Jul 28, 2017

More globally, we could have something like Engine.get_graphics_capabilities() which would return a dictionary of such driver-dependent values. Might be worth discussing in a new issue though so that we can list what such parameters would be :)

@fabriceci
Copy link
Contributor

Hm, would be interesting to retrieve this value in-game somehow, so if we add a "Graphics Options" menu, it's possible to limit to the player's hardware capability.

Indeed !

If there is a way to retrieve this value, I'm interested.

@Calinou
Copy link
Member

Calinou commented Jul 10, 2020

@fabriceci Is there a lot of hardware out there that doesn't support MSAA past 8×? (I don't consider 16× MSAA here as it's too expensive to be usable in a modern engine.)

Given Godot's current rendering performance, it might not make sense to expose 8× MSAA to players in the first place anyway. You'll need to give up a lot of visual effects if you want to use 8× MSAA and keep a good framerate.

To be fair, I think we should unexpose 16× MSAA from Godot 4.0 altogether as it's often buggy in graphics drivers and causes weird issues. This is because it's usually implemented as 2× SSAA + 8× MSAA in the graphics driver - we have no control over this. The difference between 8× MSAA and 16× MSAA is very small anyway, even in screenshots.

@fabriceci
Copy link
Contributor

fabriceci commented Jul 10, 2020

@Calinou I had the warning on mac when I try to set 16x MSAA, that what leads me to this issue, I will limit MSAA to 8X to get rid of that like you suggest and explained.

To be honest, I thought 16x was too much, but by tests, I noticed that it's the only one that be able to remove pixelation effect on cube's edges (a bit less notable here due to compression):

image

(8x)
Capture d’écran 2020-07-10 à 11 41 47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor crashed when using msaa x16
6 participants