Sign in to follow this  

[HLSL] read more samples at one time

This topic is 2958 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

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

This topic is 2958 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.

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