Jump to content
  • Advertisement


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


Trig functions in vertex shaders

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

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!