Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

pickups

texture coordinates

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

hi. in opengl, u can use the object space vertex position as the texture coordinates. but as far as i can see, D3D only supports eye space tex coord generation. is that correct, or is it possibile to use object space somehow?

Share this post


Link to post
Share on other sites
Advertisement
1) eye_space_vertex * (Mview*Mworld)-1 == object_space_vertex

So put the inverse of your world * view into a texture transform matrix and use the camera space texgen and you'll have the object space in your texture coordinates. [The matrix is likely orthonormal too so a transpose will do].


2) vertex shaders were made for these "but I can't do xyz with the pipeline" situations. A vertex shader would definately be the way I'd go to do that.


3) of course, generating texture coordinates in object space on the fly every frame seems pretty pointless to me. Just put the object space mapping coordinates into the vertices in when you first create the vertex buffer - texture coordinate on vertices are automatically relative to object space...



--
Simon O'Connor
Creative Asylum Ltd
www.creative-asylum.com

[edited by - s1ca on June 18, 2003 6:27:47 PM]

Share this post


Link to post
Share on other sites
yes, i thats what i thought of doing. it just seems odd that the functionality isnt present in d3d and it is in openGl.
thnx.

Share this post


Link to post
Share on other sites
quote:
Original post by pickups
yes, i thats what i thought of doing. it just seems odd that the functionality isnt present in d3d and it is in openGl.
thnx.


it may seem odd, but IMO, it''s odd functionality to need

MS (and IHVs) add features to the D3D API based on demand (requests from developers, feedback from preview versions, feedback from the feature review board, feedback from beta testers). If there isn''t the demand, the feature isn''t likely to go in.

If you need that feature for something, then make sure your voice is heard - contact MS (directx@microsoft.com), contact IHVs, get involved in the testing and feature review process etc.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!