- // for the full reference), so we keep them at 32-bit. However, for
- // small sizes, all components are exact anyway, so we can cheat there
- // (although noting that the source coordinates become somewhat less
- // accurate then, too).
- glTexImage1D(GL_TEXTURE_1D, 0, (subfft_size <= 4) ? GL_RGBA16F : GL_RGBA32F, fft_size, 0, GL_RGBA, GL_FLOAT, tmp);
+ // for the full reference); however, practical testing indicates that it's
+ // not a problem to keep the twiddle factors at 16-bit, at least as long as
+ // we round them properly--it would seem that Schatzman were mainly talking
+ // about poor sin()/cos() approximations. Thus, we store them in 16-bit,
+ // which gives a nice speed boost.
+ //
+ // Note that the source coordinates become somewhat less accurate too, though.
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, fft_size, 1, 0, GL_RGBA, GL_HALF_FLOAT, tmp);