Sign in to follow this  
galaxist

Non-Normalized Texture Coordinates

Recommended Posts

Hello. I would like to know is there anyway to use non-normalized texture coordinates( [0,W][0,H] instead of using [0,1.0],[0,1.0] ) for normal 2D textures? I know the GL_ARB_texture_rectangle textures use non-normalized texture coordinates, is there anything I can set for making standard 2D textures to use non-normalized texture coordinates too?

Share this post


Link to post
Share on other sites
You can use higher and lower texture coordinates like -12345.0f or 631314.234f. Depending on your settings the texture is then tiled, wrapped, clamped to [0.0f,1.0f] etc.

But if you mean using texcoords 0 to 256 for a 256 x 256 texture and having it displayed untiled and unclamped I'd say no. Please correct me if I'm wrong here.

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord_Evil
You can use higher and lower texture coordinates like -12345.0f or 631314.234f. Depending on your settings the texture is then tiled, wrapped, clamped to [0.0f,1.0f] etc.

But if you mean using texcoords 0 to 256 for a 256 x 256 texture and having it displayed untiled and unclamped I'd say no. Please correct me if I'm wrong here.


I mean the "0 to 256 for a 256 x 256 texture". I see, then I really have to do the convertion, thanks for reply.

Share this post


Link to post
Share on other sites
You can scale the texture matrix to emulate using non-normalized texture coordinates. Texture coordinates for a specific texture unit are transformed by that unit's texture matrix just like vertices are transformed by the modelview and projection matrices.

Share this post


Link to post
Share on other sites

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