Sign in to follow this  
pTymN

HDRPipeline DXSDK sample - why 3x3 instead of 4x4 downsampling?

Recommended Posts

pTymN    464
Its more downsampling passes if the resolution was 1024x768 instead of 640x480. 3^6=729 4^5=1024. One less pass is required at a sane resolution if 4x4 downsampling is used.

Share this post


Link to post
Share on other sites
MJP    19788
No idea why it uses 3x3, perhaps Jack can answer that question.

However in general the best balance between samples per pixel and number of passes might be different depending on the hardware. For example on the Xbox 360, it's generally favorable to stick to only 4 samples per pixel.

Share this post


Link to post
Share on other sites
jollyjeffers    1570
Quote:
Original post by MJP
No idea why it uses 3x3, perhaps Jack can answer that question.
I have been asked on a number of occasions why 3x3 and not 4x4 so I should be able to answer [smile]

In truth there wasn't any specific reason for or against, just that 3x3 works out as a convenient kernel size (+/- 1px)! I do remember there being some odd looking artifacts at the edge of the image (due to wrapping/clamping) if you used large kernels, so be sure to check those if you do go up to 4x4 or 5x5.

Quote:
Can't a pixel shader do 16 texture lookups per pass?
16 samplers, but up to 32 reads, so you can only do a 5x5 kernel unless you get inventive.

hth
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this