GithubHelp home page GithubHelp logo

achalpandeyy / oceanfft Goto Github PK

View Code? Open in Web Editor NEW
105.0 4.0 6.0 578 KB

OpenGL Demo: Simulating Ocean Waves with FFT

License: MIT License

CMake 1.96% C++ 88.87% GLSL 9.17%
opengl compute-shader fft real-time

oceanfft's Introduction

OceanFFT

Realistic ocean wave simulation, primarily based on J. Tessendorf's paper, using OpenGL compute shaders. Checkout the demo video here.

demo_image

In the quest for more realism, a different spectrum is used than the Phillips spectrum mentioned in the original paper. Stockham formulation of FFT is used to better map the problem to the GPU and avoid expensive bit-reversal operation required for the vanilla Cooley-Tukey algorithm.

Build Instructions

  1. Clone recursively with submodules via git clone --recurse-submodules git://github.com/achalpandeyy/OceanFFT.git
  2. Run CMake in the root directory

Dependencies

Uses my OpenGL framework Ogle as a submodule.

References

oceanfft's People

Contributors

achalpandeyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

oceanfft's Issues

Some debugging techniques

Hello there, I love your Ocean Waves example, I tried compiling it (I did have to change version of OpenGL used from 4.6 to 4.5 in OpenGL shaders) and it compiles and works fine
slika

then I tried to rewrite it in C# with OpenTK and thats where the problems began
as you can see form this picture
slika

nothing is rendered and I have no idea why, I did test all the Shader and Vertex helpers (when I rewrote them) with this example: https://www.mediafire.com/file/jdxfp4z1pgrlvr4/opentk-examples.zip/file

and it works fine there, I get a triangle

But the ocean simulation doesn't show anything, there is only blue sky
Here is the code (for now, no GUI or keyboard handling is implemented, because I first wanted to get the waves to render): https://www.mediafire.com/file/bzivm7wkb3zbvhu/FFT_SIM.zip/file

So sorry to bother you like that but I am not sure what to check (its my first time doing something like this and I learn as I go), compiler gives me no errors, values seam to be the same between c++ and C# implementation, the only difference is that c++ renders waves fine, while C# one only shows the sky. And I am realy confused why that is

So if you could maybe check it or maybe know some additional debugging tehniques in this cases that would be great.

Thanks for Anwsering and Best Regards

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.