Skip to content
项目

关于

WebGL FFT (Fast Fourier transform) ocean rendering for Three.js

设计与媒体

这些数字如何统计

可以做什么

  • Ocean rendering is based on the generation of a displacement map and a normal map applied with vertex and fragment shader
  • Ocean mesh is computed in screen space
  • Clouds and rain come from Three.js community

实测星标增长

24小时
0
7天
0
15天
-1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

A trip under the moonlight

Fast Fourier Transform ocean rendering for Three.js

This demo shows a way to render realistic scenes in WebGL.

You can travel by using the keyboard and the environment can be selected. You can also explore the working of the scene by typing 'h'.

Live demo: https://jbouny.github.io/fft-ocean/

Screenshots

Alt text

Alt text

Alt text

Features

  • Ocean rendering is based on the generation of a displacement map and a normal map applied with vertex and fragment shader
  • Ocean mesh is computed in screen space
  • Clouds and rain come from Three.js community

Screen space grid

The screen space working is in fact simple:

  • Add a grid in the scene, anywhere
  • The grid must always be seen by the camera, or the vertex shader will not be applied
  • In the vertex shader, the grid is then put in front of the camera in order to fill the entire screen
  • In the vertex shader, the grid is projected on a 3d plane (just change the depth)

A complete explanation can be find here: http://habib.wikidot.com/projected-grid-ocean-shader-full-html-version

So, results are here.

With a 64*64 grid:

Alt text

With a 256*256 grid:

Alt text

Acknowledgments

探索相关项目

加载中…