# Out of boundary Texture Reference get what?

**URL:** <https://forums.developer.nvidia.com/t/out-of-boundary-texture-reference-get-what/2568>\
**Category:** CUDA Programming and Performance\
**Created:** [February 7, 2008, 9:24pm UTC](https://forums.developer.nvidia.com/t/out-of-boundary-texture-reference-get-what/2568 "2008-02-07T21:24:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppofbb](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ppofbb](https://forums.developer.nvidia.com/u/ppofbb)\
**Post date:** [February 7, 2008, 9:24pm UTC](https://forums.developer.nvidia.com/t/out-of-boundary-texture-reference-get-what/2568/1 "2008-02-07T21:24:27Z")

</div>

What will happen if reference some point out of the boundary of a 2D texture? 0? pixel on the other side?

---

<div class="post-metadata">

**Author:** ![jimh](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jimh](https://forums.developer.nvidia.com/u/jimh)\
**Post date:** [February 7, 2008, 9:30pm UTC](https://forums.developer.nvidia.com/t/out-of-boundary-texture-reference-get-what/2568/2 "2008-02-07T21:30:59Z")

</div>

It depends on the addressing mode you set for the texture. You can either wrap around or clamp to the edge. Look at cudaTextureAddressMode in 4.5.2.6 of the programming guide.
