Git Product home page Git Product logo

water-urp's Introduction

Stylised Water in Unity URP

A stylised water shader for Unity's Universal Render Pipeline.

Water Banner

Overview

This project contains a stylised water shader intended to show off some of the features of Shader Graph and Universal RP. An accompanying tutorial is available on danielilett.com.

Software

This project was created using Unity 2019.3.0f6 and Universal Render Pipeline 7.1.8.

Authors

This project and the corresponding tutorial series were written by Daniel Ilett. Follow him on Twitter for more gamedev tutorials!

Release

This project was released on April 5th 2020.

water-urp's People

Contributors

daniel-ilett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

water-urp's Issues

[Info] Get the vertex height position

Hi,
first of all thank you for sharing this water shader tutorial, I really like it.

In my project I'm adding buoyancy to the player boat and I need the current shader vertex height for the boat current position, a user in the Unity forums suggested to apply it to the buoyancy system.
Do you have the exact formula that you used for the wave effect?

The following is the one that I tried to recreate after reading the shader code:

private float CalculateVertexHeight(Vector3 worldPosition, Vector3 localPosition, float choppiness)
{   
        float sumXZ = worldPosition.x + worldPosition.z;

        float sumTime = sumXZ + (Time.timeSinceLevelLoad / 20);

        float sine = Mathf.Sin(sumTime);

        float multiply = sine * choppiness;

        Vector3 vector = new Vector3(0, multiply, 0);

        Vector3 finalposition = localPosition + vector;

        return (finalposition.y);
}

The code can be simplified but at the moment I'm keeping this as a reference to the shader code

Thank you for you help
Bye

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.