Skip to main content
gamedev.net
🔒 Locked

Texture Coordinates?

Started by Revil 2 replies 300+ views
Original Post
Revil
Revil
Hi, please, does anybody know, how to map textures (in DX8) using ''real'' image coordinates, instead of 0.0 - 1.0? I mean I would like to assign my vertices'' tu/tv coordinates like tv = 140; instead of tv = 1.0; I know it would be possible to calculate manually, but I am sure, there is another way... I''ve heard something about texture transformations/??, but I am just a begginner and don''t quite understand Thanks for reply...
Jakub Lanc
pangplast
pangplast
0 is 0.0 (min x) and 140 is 1.0 (max x) right?

so let''s say you want to enter the x coord 100 that would be 100/140.0f = 0.71 (don''t forget to typecast to float or you''ll get zero every time)

.Pangis
Screenshos of "Humanoid invasion": http://humanoid.vaultcity.org/
pangplast
pangplast
0 is 0.0 (min x) and 140 is 1.0 (max x) right?

so let''s say you want to enter the x coord 100 that would be 100/140.0f = 0.71 (don''t forget to typecast to float or you''ll get zero every time)

.Pangis
Screenshos of "Humanoid invasion": http://humanoid.vaultcity.org/
Revil
Revil
Yes, thanks for reply, but I know this is possible, as a matter of fact, I am using it now, but I think there is some way to set the type of adressing mode (or how is it called) once at initialization and don''t care later (calculating ''manually''). But thanks anyway...
Jakub Lanc

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.