Jump to content
  • Advertisement

Archived

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

kill

Trig functions in vertex shaders

This topic is 6115 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 you approximate sine and cosine using assembly instructions included in vertex shader language? I supposes there is a way to do it with taylor series, but I wonder if microsoft has provided source code to tackle this problem. Can someone point me to resources that have anything to do with this problem? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Take a look at the devekoper section of the nVidia website - at the examples and presentations.

One cool example they have is a vector normalisation in *2* pixel shader instructions (including series expansion for the square root).

Some of the other examples do include sine and cosine generation in vertex shaders using series. Theres also some mad ones like a "game of life" in a pixel shader.


Merry Xmas BTW (22:32 here - stuffed with Xmas pudding, beer chilling, wine warming up - nothing worth watching on TV - thus I''m here )

--
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.

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!