Jump to content
  • Advertisement
Sign in to follow this  
galaxist

Non-Normalized Texture Coordinates

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

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!