• Advertisement
Sign in to follow this  

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

This topic is 3379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can't a pixel shader do 16 texture lookups per pass? Why was 3x3 downsampling used for that sample?

Share this post


Link to post
Share on other sites
Advertisement
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
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
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
Sign in to follow this  

  • Advertisement