PDA

View Full Version : Why should depth maps be so?


Crymzon
04-15-2006, 05:43 PM
Hey guys!

I wanna ask a basic question that I neevr really thot abt much. When using depth map shadows why should I use the resolution like 256 or 512 or 1024?

cos I have never followed that rule and still get good results.

Now in my new company , I am told that I have to follow this rule.

Can some one please throw some light on using multiples of 256 for depth maps ?

Thanks!

lazzhar
04-15-2006, 11:04 PM
Usually renderers end up converting the shadow map into something that will fit correctly into memory. If you give it sizes you mentioned you will earn that time spent in converting.

tedious
04-16-2006, 02:10 AM
When using depth map shadows why should I use the resolution like 256 or 512 or 1024?

A depth map holds a Floating Point value for each sample, that's 4 bytes per sample.

A resolution of 512 would mean width * height * bytes per sample = 512 * 512 * 4

That's exactly 1 megabyte, to the byte:

(512^2*4)/(1024^2) = 1

A resolution of 256 would mean 256 * 256 * 4 bytes, or exactly 1/4 of a megabyte.

Some graphics systems allocate fixed page sizes for shadow maps and texture maps, so a larger amount would be allocated (and wasted) if you used dmap or texmap resolutions that were not powers of 2.

-tedious

Crymzon
04-18-2006, 06:11 AM
Thx for the info guys. really appreciate that!

CGTalk Moderation
04-18-2006, 06:11 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.