Code Monkey home page Code Monkey logo

gpu-gems-improved-perlin-noise's Introduction

GPU-GEMS-Improved-Perlin-Noise

This project is a port of the GPU gems article on improved perlin noise to Unity. The GPU gems article describes a method that is more optimal for the GPU than implementations that have been written for the CPU. The article describes how to implement 3D and 4D noise. It also describes some extra optimization techniques that can be applied to the 3D noise by pre-processing some data and packing it into a texture. The code for this is given in the book but they have left out the optimizing for the 4D noise. Ive managed to work it out though. I'm not sure its as they intended but it dramatically reduce the number of texture looks ups so I'm happy with that. Ive also added the code for the 2D noise. This could be worked out quite easily by removing the third dimension from the 3D noise and adding the appropriate gradients.

As the code has been optimized for the GPU performance is excellent. I achieved frame rates of about 200 for the 4D noise which is quite impressive considering the amount of work that needs to be done. I did attempt to use the same method for generating the 2D noise on the CPU but surprisingly it was slower that the original implementation. This is probably due to the fact that the GPU version has been optimized by use of texture look ups and vector operations which are much slower on the CPU.

You can download a Unity package here.

GPU Perlin Noise

gpu-gems-improved-perlin-noise's People

Contributors

scrawk 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.