0
$\begingroup$

Is there a way to influence the behavior of imageLoad() for accessing an image2D or uimage2D with an out-of-bounds texel coordinate; for example repeat the last good texel instead of returning 0s?

$\endgroup$

1 Answer 1

1
$\begingroup$

No. When you use image load/store, you don't get to play "texture" games like playing with the border color, doing filtering on values, etc. You are fetching a texel from a particular location.

If you want this, you will have to detect the out-of-bounds access and choose to substitute an alternate value. You can query the image's size, so it should be easy enough to detect.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.