Generate a 1D FFT PipelineLayout. More...
#include <FFT.hpp>
Public Member Functions | |
GenerateFFT1DPipeline (void) | |
Module constructor. More... | |
Public Member Functions inherited from Glip::Modules::LayoutLoaderModule | |
virtual void | apply (const std::vector< std::string > &arguments, const std::string &body, const std::string ¤tPath, std::vector< std::string > &dynamicPaths, std::map< std::string, HdlTextureFormat > &formatList, std::map< std::string, ShaderSource > &sourceList, std::map< std::string, GeometryModel > &geometryList, std::map< std::string, FilterLayout > &filterList, std::map< std::string, PipelineLayout > &pipelineList, std::string &mainPipelineName, const std::vector< std::string > &staticPaths, const std::map< std::string, HdlTextureFormat > &requiredFormatList, const std::map< std::string, ShaderSource > &requiredSourceList, const std::map< std::string, GeometryModel > &requiredGeometryList, const std::map< std::string, PipelineLayout > &requiredPipelineList, const std::map< std::string, LayoutLoaderModule * > &moduleList, const std::string &sourceName, const int startLine, const int bodyLine, std::string &executionSource, std::string &executionSourceName, int &executionStartLine)=0 |
Interface of the module : this function will be called on each corresponding token CALL for the LayoutLoader which has the module. More... | |
const std::string & | getName (void) const |
Get the name of the module. More... | |
const int & | getMinNumArguments (void) const |
Get the minimum number of arguments of the module. More... | |
const int & | getMaxNumArguments (void) const |
Get the maximum number of arguments of the module. More... | |
const char & | bodyPresenceTest (void) const |
Get the requirement on the body. More... | |
const std::string & | getDescription (void) const |
Get the description of the module. More... | |
const std::string & | getBodyDescription (void) const |
Get the description of the body of the module. More... | |
const std::vector< std::pair < std::string, std::string > > & | getArgumentsDescriptions (void) const |
Get the description of all the arguments of the module. More... | |
std::string | getManual (void) const |
Get the manual of the module. More... | |
virtual void | beginLoadLayout (void) |
Function called at the beginning of a loading session. | |
virtual void | endLoadLayout (void) |
Function called at the end of a loading session. | |
Static Public Member Functions | |
static PipelineLayout | generate (int width, int flags=0, const ShaderSource &pre=std::string(), const ShaderSource &post=std::string()) |
Construct a pipeline performing a 1D FFT. More... | |
Static Public Member Functions inherited from Glip::Modules::LayoutLoaderModule | |
static void | addBasicModules (LayoutLoader &loader) |
Add the basic modules to a LayoutLoader. More... | |
static std::vector < LayoutLoaderModule * > | getBasicModulesList (void) |
Retrieve the list of standard modules. More... | |
static bool | getBoolean (const std::string &arg, const std::string &sourceName="", int line=1) |
Convert a keyword to a boolean. More... | |
static void | getCases (const std::string &body, std::string &trueCase, int &trueCaseStartLine, std::string &falseCase, int &falseCaseStartLine, const std::string &sourceName="", int bodyLine=1) |
Get true and false cases out of a body. More... | |
static std::vector< std::string > | findFile (const std::string &filename, const std::vector< std::string > &dynamicPaths) |
Find in which path a file can be found. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Glip::Modules::LayoutLoaderModule | |
LayoutLoaderModule (const std::string &_name, const std::string &_manual, const int &_minNumArguments, const int &_maxNumArguments, const char &_bodyPresence) | |
LayoutLoaderModule constructor. For simple modules you can just use the macro LAYOUT_LOADER_MODULE_APPLY. More... | |
Generate a 1D FFT PipelineLayout.
Warning : This module might return low accuracy or even erroneous result if the driver performs a blind optimization.
The FFT is computed in single precision. The pipeline will have the input port inputTexture and the output port outputTexture. The input texture will have the real part in its red channel and the imaginary part in its green channel.
Here is an example of PRE and POST functions given when creating the pipeline via a LayoutLoader script. Note that you can provide the content of the blocks PRE and POST directly to the GenerateFFT1DPipeline::generate function.
GenerateFFT1DPipeline::GenerateFFT1DPipeline | ( | void | ) |
Module constructor.
This object can be added to a LayoutLoader via LayoutLoader::addModule().
|
static |
Construct a pipeline performing a 1D FFT.
width | Width of the signal. |
flags | Possible flags associated to the transformation (see Glip::Modules::FFTModules::Flag). |
pre | Add a filtering function before the transform. |
post | Add a filtering function after the transform. |
The pre-function will be inserted before the transform. It should be a block of code declaring the function pre as in the following example :
The post-function will be inserted after the transform. It should be a block of code declaring the function post as in the following example :
Each time, the position is normalized from 0.0 to 1.0. You are allowed to declare uniform variables in these filters.