Re: Trying to optimize a rotation shader
Quote:
Originally Posted by Pixelthief
I'd guess that at least 50% of all sin/cos calls to the GPU are for integers.
Their parameter is in radians, I would think nearly no calls are going to be integers.
Very few shaders use sin/cos because it's more flexible to calculate a transform matrix cpu-side and pass that to the shader, so I wouldn't be surprised if sin/cos weren't very optimised.
Re: Trying to optimize a rotation shader
Sorry to Jump in the middle, but it is true sin and cos are not very efficient function.
i drop this link that have very useful asm function
ftp://ftp.analog.com/pub/dsp/210xx/code_examples/apps_handbook_v1/function.zip
them give you a very good idea how to be implemented in asm.
Regards