Sign in to follow this  
NiGoea

[HLSL] read more samples at one time

Recommended Posts

NiGoea    104
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

Share this post


Link to post
Share on other sites
dave    2187
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.

Share this post


Link to post
Share on other sites
NiGoea    104
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 ?

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