Giter Site home page Giter Site logo

anu-prakash-dev / tiled-directional-flow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scrawk/tiled-directional-flow

0.0 0.0 0.0 17.88 MB

A shader to control the direction water flows based on a flow map in Unity.

License: Other

ShaderLab 100.00%

tiled-directional-flow's Introduction

Tiled-Directional-Flow

This project is a Unity version of the tiled directional flow project found here.

The idea behind this project is to provide a method to control the direction water flows based on a flow map. The flow map (also know as a velocity map) is simply a texture with the red and green components representing the flow direction normalized to a range of 0 - 1. The shader then divides space into a series of squares where the waters normal direction is determined by the flow map. This is done four times, each with a different offset and the results blended together to remove any seams.

Creating the flow map could be a bit of a hassle. It would be best done using a fluid simulation and some 3D modelling programs can do this for you. You could also paint it by hand in Photoshop but this could be quite hard.

At the moment the shader is just applied to a flat plane and viewed from above so the effect can be seen best. Moving this to a terrain shader would be relatively trivial if that is what you need.

Tiled Directional Flow

tiled-directional-flow's People

Contributors

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