Giter Club home page Giter Club logo

generative-art's People

Contributors

eli-jordan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

generative-art's Issues

GLSL FFT Issue

I'm getting some weird results when attempting to port glsl-fft to processing

The only notable difference I can see between the two implementations is the way the vertexes are defined. In glsl-fft a triangle is drawn, whereas in my implementation a quad is drawn. I don't see how this could make a difference.

One thing that I thought may have an impact on this, is the different in the coordinate systems for gl_FragCoord and texture coordinates. AFAIK gl_FragCoord has the origin at the bottom left corner, whereas texture coordinates have the origin at the upper left corner. Perhaps regl is doing some adjustment to the coordinate system that is not being done in my solution?

Example 1

Input (all real components):

0, 0, 0, 1
0, 0, 0, 0
0, 0, 0, 0
0, 0, 0, 0

Expected:

 + 1.0 + 0.0i,  + 0.0 + 1.0i,  - 1.0 + 0.0i,  + 0.0 - 1.0i, 
 + 1.0 + 0.0i,  + 0.0 + 1.0i,  - 1.0 + 0.0i,  + 0.0 - 1.0i, 
 + 1.0 + 0.0i,  + 0.0 + 1.0i,  - 1.0 + 0.0i,  + 0.0 - 1.0i, 
 + 1.0 + 0.0i,  + 0.0 + 1.0i,  - 1.0 + 0.0i,  + 0.0 - 1.0i,

Actual:

 + 1.0 + 0.0i,  + 0.0 - 1.0i,  - 1.0 + 0.0i,  + 0.0 + 1.0i, 
 + 1.0 + 0.0i,  + 0.0 - 1.0i,  - 1.0 + 0.0i,  + 0.0 + 1.0i, 
 + 1.0 + 0.0i,  + 0.0 - 1.0i,  - 1.0 + 0.0i,  + 0.0 + 1.0i, 
 + 1.0 + 0.0i,  + 0.0 - 1.0i,  - 1.0 + 0.0i,  + 0.0 + 1.0i,

Notice that column 1 and 3 (0 indexed) are swapped in the actual output as compared to the expected output.

Example 2

Input (all real components):

1, 0, 0, 0
0, 0, 0, 0
0, 0, 0, 0
0, 0, 0, 0

Expected:

 + 1.0 + 0.0i,  + 1.0 + 0.0i,  + 1.0 + 0.0i,  + 1.0 + 0.0i, 
 + 0.0 + 1.0i,  + 0.0 + 1.0i,  + 0.0 + 1.0i,  + 0.0 + 1.0i, 
 - 1.0 + 0.0i,  - 1.0 + 0.0i,  - 1.0 + 0.0i,  - 1.0 + 0.0i, 
 + 0.0 - 1.0i,  + 0.0 - 1.0i,  + 0.0 - 1.0i,  + 0.0 - 1.0i,

Actual:

 + 1.0 + 0.0i,  + 1.0 + 0.0i,  + 1.0 + 0.0i,  + 1.0 + 0.0i, 
 + 0.0 - 1.0i,  + 0.0 - 1.0i,  + 0.0 - 1.0i,  + 0.0 - 1.0i, 
 - 1.0 + 0.0i,  - 1.0 + 0.0i,  - 1.0 + 0.0i,  - 1.0 + 0.0i, 
 + 0.0 + 1.0i,  + 0.0 + 1.0i,  + 0.0 + 1.0i,  + 0.0 + 1.0i,

Notice that row 1 and 3 (0 indexed) are swapped in the actual output as compared to the expected output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.