[HLSL] read more samples at one time
When using Tex2D(...) it's possible to read a sample from a position.
Is it possibile to read kinda 2-3-4 adiacent samples in HLSL ?
I know that exists "fetch4" command. How can I use it ?
THANKS
Just call tex2D multiple times, offsetting the lookup coordinate for each sampler. This is how blurring is done, for example. An array of offsets is stored and iterated over and for each element a new sample is made.
Quote:Original post by Dave
Just call tex2D multiple times, offsetting the lookup coordinate for each sampler. This is how blurring is done, for example. An array of offsets is stored and iterated over and for each element a new sample is made.
Ok, but in this way I'd have to do one Tex2D for each sample.
Instead, if I use a 2x2 mask, I would like being able to perform one single instruction, like ATI's Fetch4.
Is there any way to accomplish this ?
Quote:Original post by MJP
Go to page 9.
I'd found this PDF just few minutes before you replied :D!
THANK YOU
But this doesn't seem to work on nvidia stuff :S
Quote:Original post by MJP
Go to page 9.
I'd found this PDF just few minutes before you replied :D!
THANK YOU
But this doesn't seem to work on nvidia stuff :S
Quote:Original post by NiGoea
But this doesn't seem to work on nvidia stuff :S
Nope, unless you're using D3D10/D3D11.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement