Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 Nov 2011
Offline Last Active Jan 11 2013 02:46 AM

#4935797 Why use Uber Shaders? Why not one giant shader with some ifs.

Posted by on 29 April 2012 - 05:33 AM

This remibds me of an blog post that I read a while ago about simulating closures in HLSL. As far as I rember it works on SM 3.0 and up.

#4881107 Fourier Transform questions

Posted by on 06 November 2011 - 11:22 AM

1320597004[/url]' post='4881088']
I've been implementing a (Discrete) Fourier transform (and it's inverse) in C++ and was wondering about two things in particular,

1. How does e^-i (negative) differ from e^i when representing this using Euler's formula?

I know that anything to the power of a negative value is it's reciprocal (e.g. 2^-1 = 1/2) but I'm a bit confused whether this changes the Euler's formula (cos(w) + isin(w)) or not.

e^-i = e^(-1)i = cos(-1) + isin(-1) = cos(1) - isin(1)
e^i = e^(1)i = cos(1) + isin(1)

1320597004[/url]' post='4881088']and

2. Why does the inverse Fourier transform get normalized at the end (i.e sum/numsamples) whereas the normal Fourier transform does not?

Which one gets normalized is a convention. You could multiply the normal one instead of dividing the inverse one. The reason you have to do it is (vaguely) because when going from time domain to frequency domain your "unit of measure" changes from s to rad/s.