Git Product home page Git Product logo

godot-3.0-noise-shaders's Introduction

Different noise shaders For Godot Engine 3.0

A port of https://github.com/ashima/webgl-noise

You can use those noises in your gdscripts using the technique shown here: https://github.com/curly-brace/Godot-Simplex

Consists of:

  • worley 2d
  • worley with 2x2 window instead of 3x3
  • worley 3d
  • worley 3d with 2x2x2 window instead of 3x3x3
  • perlin 2d
  • perlin 3d
  • perlin 4d
  • simplex 2d
  • simplex 3d
  • simplex 3d with analytic derivative gradient output
  • simplex 4d
  • and last is 'psrdnoise' monster with 4:
    • 2-D non-tiling simplex noise with rotating gradients, without the analytical derivative
    • 2-D non-tiling simplex noise with rotating gradients and analytical derivative
    • 2-D tiling simplex noise with rotating gradients, without the analytical derivative
    • 2-D tiling simplex noise with rotating gradients and analytical derivative

Analytical derivatives return vec3 with first element is a vector of the noise value. And 2nd and 3rd are x and y partial derivatives.

You can test any of the shaders by creating a Sprite node, creating new ImageTexture for it (size like 256x256 would be fine), creating new shader material for it and loading desired shader to it. (try simplex3d.tres ^_^ )

All shaders have offset and scale parameters. Set scale to something like 8 to see the noise better. Worley shaders have jitter parameter that with 0 value will output perfect squares.

More info on original repo: https://github.com/ashima/webgl-noise/wiki

Drawbacks:

godot does not support (currently) in shaders: constants, inline functions, defines, for loops, better swizzling. So code is not as efficient as it could be.

godot-3.0-noise-shaders's People

Contributors

curly-brace avatar

Watchers

 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.