Comments (14)
If #11 is completed then this issue will be resolved, but only for Vulkan. OpenGL will unfortunately be out of luck due to the lack of proper support for disabling GL_MULTISAMPLE.
from fna.
This could also be solved by #30, in theory.
from fna.
Just a suggested work around, do you think FNA could just get away with using a FXAA shader instead of GL_MULTISAMPLE? Using a simple shader for post processing and having it be built into FNA should be a feasible cross-platform solution.
from fna.
FXAA isn't really the same, and it adds extra rendering passes behind the developer's back... it'd probably be easier to just get multisampling working with a different GLDevice!
from fna.
While it adds extra rendering passes, it's still typically less work than MSAA on the hardware and notably performs really well, even though the results aren't as great at lower resolutions.
I noticed you even have a gist for it with SpriteBatch.
from fna.
That was part our original tests for enabling antialiasing in FEZ. Our conclusion was that it looked like total crap:
https://plus.google.com/+flibitijibibo/posts/48R4vB5MVPN
It didn't help that Tim Lottes even told us not to use it if we could avoid it...
Point is, I'm not writing it in and I don't suspect anyone else will either. Focus on Vulkan or Metal instead.
from fna.
So while researching MultiSampleMask and glSampleMaski I ended up playing with the idea of setting GL_MULTISAMPLE to false and hoping that would work in combination with glSampleMaski(0, 1)
or something to get "roughly" the same thing as if GL_MULTISAMPLE was actually respected.
I got to setting RasterizerState.MultiSampleAntiAlias = false
and... uh, apparently it just works now??? WTF? Are there others that could possibly play with this? I swear when @renaudbedard and I were working on FEZ 1.12 it didn't work and there are discussions elsewhere talking about how drivers ignore it, and now I have it working with NVIDIA/Intel Linux and NVIDIA/Intel macOS. If any Windows users or AMD Linux users want to try this I made a super quick test binary:
http://www.flibitijibibo.com/msaaWTF.tar.bz2
Just run Program.exe
(or ./Program
on Linux/macOS) and toggle the multisample mode with the space bar. The demo is based on this example:
https://msdn.microsoft.com/en-us/library/bb975403.aspx
- NVIDIA
- Linux
- macOS
- Windows
- Intel
- Linux
- macOS
- Windows
- AMD
- Mesa (radeonsi)
- Mesa (r600)
- macOS
- Windows
from fna.
I now also have it verified as working on NVIDIA/Intel Windows. If this works on AMD I'm marking this as done and the drivers that don't support this will have to deal with it themselves...
I just updated msaaWTF with a corflags fix and Mac binaries; if you run AMD graphics on any platform please give that test project a try. Windows runs Program.exe
and Linux/macOS runs ./Program
.
from fna.
Ran your test program on my machine. Windows 10, NVIDIA GTX 750 TI, dunno what driver version.
Edit: WTF, I just saw your "verified as working" comment. Time to update my drivers...
Edit: Updated drivers to the newest (388.31: 11/15/2017), same output and whoops, I somehow misunderstood this 😅
from fna.
Possibly; my Windows machine tends to lag behind so there could be a newer release than what I tried. That said, looking at your output it appears to be working, the edges are aliased :P
from fna.
Works as expected on AMD Radeon 460, 10.13.1.
I'm not terribly surprised though - our ports have relied on this for years now. Hitman Absolution needed this to work, and it did as of when we shipped it back in 2014. (At least on macOS - can't speak to Linux.)
from fna.
Thanks Brad! My guess is macOS has always respected it, though interestingly it's their docs specifically that informed this issue:
The commands glEnable(GL_MULTISAMPLE) and glDisable(GL_MULTISAMPLE) are ignored on some hardware because some graphics cards have the feature enabled all the time. That doesn't mean that you should not call these commands because you'll certainly need them on hardware that doesn't ignore them.
I also got confirmation from a Windows AMD user via Twitter (thanks Joaquins Void!), so Linux is all that's left... I'm fine with just Mesa, don't care about fglrx or PRO.
from fna.
+1, works on Windows 10 & nVidia with latest drivers. I'm confused, but I'm glad!
from fna.
Got a radeonsi result from @kisak-valve so I'm calling this as done as can be. I updated the GL_MULTISAMPLE note accordingly:
from fna.
Related Issues (20)
- Fn HOT 2
- [MojoShader] Preshaders with bool outputs aren't supported HOT 3
- mono_thread_internal_set_priority: unknown policy 5
- Expose FAudioContext or Device Handle HOT 3
- arm64 fnalibs for Apple Silicone Macs HOT 3
- Add GitHub Actions HOT 1
- Terraria: sigsegv when using vulkan renderer in newer versions of FNA HOT 3
- Add DPI Awareness hint for Windows
- Do a second take of #442 HOT 1
- Support for net8.0-ios targets HOT 2
- Incorrect Wiki instructions: Chapter 5 Creating New Projects HOT 1
- SharpFont + SpriteFont HOT 2
- VertexPositionColorNormalTexture HOT 3
- System.NullReferenceException when using BasicEffect HOT 2
- Question about the process of porting NativeAOT to Consiles HOT 3
- Newer Shader Models
- Add extension method for loading mipmap texture from stream HOT 3
- White artifacts on certain color values in DDS HOT 5
- [BUG] Can't download clone the Wiki HOT 1
- Proxy Blade Zero (313980): Black Screen issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fna.