generative-art's People
generative-art's Issues
GLSL FFT Issue
I'm getting some weird results when attempting to port glsl-fft to processing
- fragment shader source
- vertex shader source this is auto generated by the library I'm using.
- driver source i.e. the thing that generates the configuration of the passes.
- test cases
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.