Sign in to follow this  

Restrict texture sampling region?

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

I am using a texture that has "tiled" content. Say for instance that the texture is 512x512 pixels, and that it contains a green, blue, yellow and red square, each 256x256 pixels. Now I want to restrict texturing so that only one portion of my tile-texture is being used. I.e. I only want to use the green (upper left) portion of my texture when texturing my primitives. For contents outside (in the >0.5 texture address space) I want it to be handled like when sampling outside of the physical texture. Is there a way to accomplish this (or similar), without manually changing the texture coordinates of the vertices?

Share this post


Link to post
Share on other sites
You can probably use the texture transform matrices to perform some basic remapping of TC's without actually modifying the data if thats what you mean.

Actually replacing/stopping colour from outside of a region isn't possible in the way you describe. Most hardware can do border colours, but that's outside of the [0..1] range and not outside of a particular TC range...

hth
Jack

Share this post


Link to post
Share on other sites

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