Jump to content
  • Advertisement


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


Textures in a vertex program

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

How do use textures in vertex program? This is what I have:
ATTRIB vtco = vertex.texcoord;
OUTPUT  otco = result.texcoord;

# Use LIT to calculate lighting coefficients
LIT dots, dots;

# Calculate color contributions
MAD r0, dots.y, lightDiff, lightAmbt;
MAD ocol.xyz, dots.z, lightSpec, r0;
MOV ocol.w, lightDiff.w;

# Texture coordinates
#MOV otco, vtco;
I''m not passing in coords myself as I''m using sphere map tex coord generation, but even if I was passing them in myself I don''t know what I have to do with them in the program. What I''m doing above is just passing the incoming coordinates straight to the output vertex. Is this correct, it doesn''t seem to have any effect. Do I have to combine the texture with the color or something?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!