Skip to main content
gamedev.net
🔒 Locked

How many addiction memory will multisample needs?

Started by lanceking Nov 16, 2004 at 2:11 AM 5 replies 400+ views
Original Post
lanceking
lanceking
I knew that multisample need additional memorys, but how many? If I create a 1024x1024x32 render target with 4x multisample, how big will this surface be? Many thanks!
d000hg
d000hg
I don't exactly know how the multisampling works, but a basic way would be for 4X to actually have a buffer twice the width and height of the screen, 9X would have a buffer 3 times as high and wide. In these cases you would take up 4 and 9 times as much memory as the original screen buffer.

for 1024x1024x32 that's 4Mb to start with - meaning you'd be up to 16/36Mb with 4X/9X AA.

Can somebody confirm/refute my reasoning?
darookie
darookie
Quote:
Original post by d000hg
I don't exactly know how the multisampling works, but a basic way would be for 4X to actually have a buffer twice the width and height of the screen, 9X would have a buffer 3 times as high and wide. In these cases you would take up 4 and 9 times as much memory as the original screen buffer.

for 1024x1024x32 that's 4Mb to start with - meaning you'd be up to 16/36Mb with 4X/9X AA.

Can somebody confirm/refute my reasoning?

Multisampling is a filtering technique, therefore no additional memory will be required.
The rendering performance will go down but the memory requirements stay the same.
The buffer will be 4Mib big.
Nik02
Nik02
Seems correct. Additional memory could be used for padding, if the surface dimensions would be non-powers of 2.

EDIT: True supersampling stores all the sub-pixels separately, so you can write them separately, thus taking the more memory the more samples there is per pixel.
Niko Suni
darookie
darookie
Quote:
Original post by d000hg
I don't exactly know how the multisampling works, but a basic way would be for 4X to actually have a buffer twice the width and height of the screen, 9X would have a buffer 3 times as high and wide. In these cases you would take up 4 and 9 times as much memory as the original screen buffer.

for 1024x1024x32 that's 4Mb to start with - meaning you'd be up to 16/36Mb with 4X/9X AA.

Can somebody confirm/refute my reasoning?

AFAIK what you describe is referred to as 'super-sampling'.
Indeed with supersampling, the buffer size depends on the multiplier. Thus with 4x supersampling you will end up with a 4096x4096 buffer for a 1024x1024 target.
darookie
darookie
Quote:
Original post by Anonymous Poster
Quote:
Original post by darookie
Quote:
Original post by d000hg
I don't exactly know how the multisampling works, but a basic way would be for 4X to actually have a buffer twice the width and height of the screen, 9X would have a buffer 3 times as high and wide. In these cases you would take up 4 and 9 times as much memory as the original screen buffer.

for 1024x1024x32 that's 4Mb to start with - meaning you'd be up to 16/36Mb with 4X/9X AA.

Can somebody confirm/refute my reasoning?

Multisampling is a filtering technique, therefore no additional memory will be required.
The rendering performance will go down but the memory requirements stay the same.
The buffer will be 4Mib big.


I think multisample should take more memory. I have read the
gdc2002_multisample document(which is opengl, btw). It says
that:
It(Multisample) doesn¡¯t happen for free
More video memory is required:
Vid_mem = sizeof(Front_buffer) +
sizeof(Back_buffer) +
num_samples * (sizeof(Front_buffer) +sizeof(ZS_buffer))

I don't know what does sizeof(Front_buffer) means. If this
means the whole front buffer size, then multisample will
need A LOT OF MEMORY!! I don't think this is reasonable
so I wonder how multisample works in real hardware?

You are right about that! Even though hardware performs some trick to reduce the memory foot-print (e.g. num_samples / x * (sizeof(front_buffer) + sizeof(ZS_buffer)), the formula you provided seems correct. I supposed the hardware does that on a per-pixel basis, but I was wrong.
So the main difference between super-sampling and multi-sampling is that the former calculates a factor * buffer_size image, while the latter renders factor * buffer_size images (and applies some tricks to reduce memory bandwidth).

My apologies for the misinformation I provided.

Pat.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.