HDRPipeline DXSDK sample - why 3x3 instead of 4x4 downsampling?
Can't a pixel shader do 16 texture lookups per pass? Why was 3x3 downsampling used for that sample?
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.
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.
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.
Quote:Original post by MJPI have been asked on a number of occasions why 3x3 and not 4x4 so I should be able to answer [smile]
No idea why it uses 3x3, perhaps Jack can answer that question.
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement