Oh ho ho! Cool it dude. You're not the only one with graphics knowledge around here. It doesn't have ZERO similarity to it, BECAUSE IT IS MULTISAMPLING without all the extra hardware-based optimizations. And if one could accurately replicate the MSAA technique that the hardware does, obviously developers would have employed custom MSAA algorithms by now, making hardware MSAA obsolete! And what do you propose to do when you need to implement MSAA on hardware that doesn't support it natively? Think before you blurt out BS!Uttar said:Rofl. Do you even know what modern MSAA implies? Your implementation has ZERO similarity to it. Obviously with such an implementation, you'd consider so-called SSAA to be better than so-called MSAA... duh. May I congratulate you for not even pointing this out earlier, and daring to start a debate based on such BS?
Uttar
MSAA has to be done in software when it is NOT supported by hardware. Otherwise you will have to resort to super-sampling. So, I was estimating the performance and quality differences between the two methods done "in software". Why aren't you folks getting this point?Inane Dork said:poly-gone, surely you have to realize how worthless your performance measurements are. MSAA in software compared to MSAA in hardware? They're not the same at all. Why you expect usable performance metrics from your program is beyond me.
Not MSAA in hardware, YES. But it's the closest thing to implementing MSAA in software. And you'd have to resort to a "software" based method when the underlying hardware doesn't support it natively. Are you getting my point now?Xmas said:Then that is not MSAA and your claim that 2xSSAA is better than 4xMSAA is useless.
Exactly, so if you want a viable "software" solution for AA on FP16 targets, supersampling would be the way to go.Xmas said:I'm pretty sure that game developers that go all the way to implement some form of AA on non-FP16-MSAA-capable GPUs will most likely make use of the MSAA capabilities for 8 bit per channel rendertargets and compose a non-antialiased tonemapped HDR render on top of it. Or take the easy way of doing supersampling.
poly-gone said:MSAA has to be done in software when it is NOT supported by hardware. Otherwise you will have to resort to super-sampling. So, I was estimating the performance and quality differences between the two methods done "in software". Why aren't you folks getting this point?
That's all well and good, but how could you possibly do it in software?poly-gone said:MSAA has to be done in software when it is NOT supported by hardware. Otherwise you will have to resort to super-sampling. So, I was estimating the performance and quality differences between the two methods done "in software". Why aren't you folks getting this point?
You mean performing hardware style MSAA in software? It can be approximated, but you'd need to use an edge detection filter to extract the edges of all polygons, in order to antialias them without compromising the shading "power" or wasting computations on intra-polygon regions. And use z-compression via special depth buffers (dunno if this can be done efficiently).Chalnoth said:That's all well and good, but how could you possibly do it in software?
Same resolution, otherwise it would become no different than super-sampling. I sample 4 pixels at a time, in 4 sets, thus giving me a 16 tap kernel and average them.Basic said:When you do your "custom MSAA", what resolution do you render to (compared to the final resolution). What is the custom 16 tap filter kernel? (What sample points?)
Ah, no, it's not an extended bi-linear filter. The sampling is still effectively done at 4 times (instead of 16 due to 4 sets) the frequency of the initial aliased image, so it does satisfy the Nyquist criterion, and hence looks better than ordinary filtering.Basic said:So what you're doing isn't AA at all. It just regular non-AA rendering with a blur filter at the end. Then no, this isn't multisampling by any stretch. And probably won't look any better than without the blur (ie not better than no-AA). But what you described is not it.
I tried that once a while back, and it wasn't exactly "straightforward". The problem is that you need to straight away render the edges to an upsampled buffer, otherwise, if you render the "colored" scene to a bigger buffer, the whole point of efficient multisampling is lost. Most edge detection filters require a base "color" image (though a depth map would perhaps work) to extract the edges from, so initially you'd have to render all the objects in different colors using simple shaders, then run an edge detection pass on them and proceed with the downsampling. For the hardware, it's much simpler since it has full control over the rasterizing phase.Basic said:You could make a multipass SW algorithm with edge detection, that do SSAA only on the edges. And with really complex shaders, fairly large polygons, and HW with fast branching in PS, it might be faster than straight SSAA.
Software is not hardware, and it should be obvious to you that making statements about hardware performance of MSAA when you tested software performance of MSAA is unfounded. There's no necessary link between the two.poly-gone said:MSAA has to be done in software when it is NOT supported by hardware. Otherwise you will have to resort to super-sampling. So, I was estimating the performance and quality differences between the two methods done "in software". Why aren't you folks getting this point?
Well, since supersampling is comparitively harder to optimize, a hardware and software implementation aren't going to differ much in performance.Inane_Dork said:And doing them both in software is doubly missing the point, as neither are necessary reflections of hardware performance.
I wouldn't expect much difference either, but I did not want to impose my expectations on the outcome.Chalnoth said:Well, since supersampling is comparitively harder to optimize, a hardware and software implementation aren't going to differ much in performance.
If I'm reading the DX SDK correctly, you can only output one depth value per pixel.Chalnoth said:Hrm, I wonder if you could make use of MRT's to do software MSAA? I mean, it would require that you can have a different z-buffer for each render target, and it may require modifying z values in the pixel shader (a big no-no for performance), but I suppose that could be a way...
It certainly didn't look that way until later in this thread.poly-gone said:MSAA has to be done in software when it is NOT supported by hardware. Otherwise you will have to resort to super-sampling. So, I was estimating the performance and quality differences between the two methods done "in software". Why aren't you folks getting this point?
You can implement MSAA in software (like any other algorithm). But trying to squeeze it into a hardware-accelerated method is a bad idea because you're inevitably throwing valuable processing power away.Not MSAA in hardware, YES. But it's the closest thing to implementing MSAA in software. And you'd have to resort to a "software" based method when the underlying hardware doesn't support it natively. Are you getting my point now?
I think there are better ways, but they require more work.Exactly, so if you want a viable "software" solution for AA on FP16 targets, supersampling would be the way to go.
You can take as many samples as you want, if the resolution of the data you sample from is not higher than the output resolution, it will hurt more than it helps.poly-gone said:Ah, no, it's not an extended bi-linear filter. The sampling is still effectively done at 4 times (instead of 16 due to 4 sets) the frequency of the initial aliased image, so it does satisfy the Nyquist criterion, and hence looks better than ordinary filtering.
As long as the jitter is smaller than one pixel, I guess I would classify that as supersampling, but not otherwise. The general idea with supersampling is that you're trying to raise the Nyquist limit of your sampling grid so that it is at least as high as the resolution of your final output. That's what sort of makes MSAA not really *true* antitaliasing in my book. SSAA is more correct.Another implementation of SSAA I'm thinking of implementing is using an accumulation buffer, rendering the scene from jittered camera viewpoints and averaging them.
Well, MSAA is only anti-aliasing for edges. So it's not true full-screen anti-aliasing (in that while it is applied to the full screen, it doesn't anti-alias the full screen). But it is definitely anti-aliasing, as it does increase the resolution of your sampling grid by the number of samples at triangle edges.ShootMyMonkey said:The general idea with supersampling is that you're trying to raise the Nyquist limit of your sampling grid so that it is at least as high as the resolution of your final output. That's what sort of makes MSAA not really *true* antitaliasing in my book. SSAA is more correct.