GithubHelp home page GithubHelp logo

pacex / gmsoceansurface Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 2.77 MB

[Finished] Submission to XOR's Fluid rendering contest: An ocean surface renderer incl. wave spectra, Gerstner waves and screen-space reflections

Home Page: https://twitter.com/XorDev/status/1568277920698753026

Game Maker Language 37.98% Yacc 44.77% GLSL 17.24%
3d-graphics gamemaker gerstner-waves screen-space-reflections wave-spectra

gmsoceansurface's Introduction

GMSOceanSurface

About

This is my entry for XOR's GM Fluid rendering contest. It is my attempt at rendering a large ocean surface in GameMaker.

screenshot

Features include:

  • Wave functions through discretizing ocean wave spectra
    • Currently: Pierson-Moskowitz spectrum, but easily replaceable
  • Rendering of trochoidal waves (Gerstner waves)
  • Water surface shading
  • Water surface reflections
    • Positionally invariant features (skybox): cube-map reflections
    • Objects in the scene: screen space reflections
      • binary and linear ray marching
  • GUI to control wave and reflection parameters

Usage

  • WASD, Shift, Space to move the camera
  • Right click + drag to turn the camera
  • [U] to update wave functions
  • [G] to toggle GUI

To change the number of wave functions sampled from the spectrum, change the NUM_WAVES parameter on the CPU side as well as in BOTH the vertex and fragment shader!

Future Work

Discrete sampling of the wave spectrum is not ideal. Using an FFT to retrieve vertex displacements from the wave spectrum is far more efficient and provides better visual results. Due to time constraints I was unable to implement this until the contest deadline, but it will remain the main goal for this project.

Boundary awareness of waves adds substantially to visual appearance. This is another aspect I aim to work on in the future.

gmsoceansurface's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.