Giter VIP home page Giter VIP logo

grassbending's Introduction

Download package

For Unity 2018.3 and later: GrassBending.unitypackage. Check releases for previous versions support.

Please be aware that you don't need to clone the whole repository in order to use the extension in your project. Either download package from the link above or extract Assets/GrassBending folder from the repository project โ€“ it contains all the required assets; other stuff is just for testing purposes.

Description

The package contains a shader used for billboarded terrain details with waving and bending support and components to provide the required bend data to the shader.

How to use

Paint grass on the terrain. Make sure the grass is billboarded (it will use a default shader otherwise).

Add a BendGrassWhenEnabled or BendGrassWhenVisible component to a gameobject that should apply the bend effect when positioned over the grass.

BendRadius controls the radius of the bending sphere with center being the pivot of the gameobject.

Priority is used to control the bending source priority; when concurrent bend sources limit is exceeded, benders with lower priority values will be served first.

You can also add your own implementation of the IGrassBender interface instead of using the built-in bender components.

The bending grass shader replaces Unity's default Hidden/TerrainEngine/Details/BillboardWavingDoublePass shader used for the terrain grass when Billboard option is enabled. It additionally allows to control the wind waving and bending power via the healthy/dry color tint alpha; when alpha of the both colors is zero, the wind and bending won't affect the grass at all.

grassbending's People

Contributors

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