Jump to content
  • Advertisement
Sign in to follow this  
NiGoea

[HLSL] read more samples at one time

This topic is 3177 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
Advertisement
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
Quote:
Original post by NiGoea
But this doesn't seem to work on nvidia stuff :S


Nope, unless you're using D3D10/D3D11.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!