Coder Social home page Coder Social logo

urp-watershaders's Introduction

URP-WaterShaders

Procedural Water Surface and Underwater Caustics for Unity URP

This project demonstrates two procedural shadergraphs, for creating immersive underwater caustics and water surface with distortion. Both shadergraphs are meant to be used as templates for your own shaders.

Demo Video

URP-WaterShaders

NOTE: In order to use the graphs in your own projects, export them as a unitypackage, rather than copying the shadergraph files. This will ensure the subgraph references are not lost

Instructions

  1. Open the project with Unity (2019.4.3f1 and URP/Shadergraph 7.3.1 or later recommended) and open SampleScene.unity in the Scenes folder
  2. Make sure the render pipeline is set to URP in Project Settings> Graphics
  3. Select the UniversalRenderPipelineAsset and make sure Opaque Texture and Depth Texture are both enabled.
  4. Under Player settings, select Linear color space for best color representation
  5. In the Asset>Graphs folder you can find two separate shadergraphs for Underwater Caustics and Water surface
  6. These graphs have several customization options, such as:
    1. Adjustable Shorelines using the depth texture
    2. Water clarity, opacity, refraction (through distortion)
    3. Triplanar Underwater caustics
    4. Adjustable flow speeds for surface as well as caustics

Instructions for HDRP

  1. Make sure the project is properly set up and all graphs are working.
  2. Remove URP completely from the project.
  3. Install HDRP from the package manager. Use the HDRP wizard to fix any issues during setup.
  4. In the WaterSurface Shadergraph, change the 'Scene Color' Node to 'HD Scene Color'. This will fix the overexposed water .
  5. In the WaterUnder Shadergraph, find the Position node, and change the space to Absolute World. This will fix caustics moving with the camera.

urp-watershaders's People

Contributors

aniruddhahar avatar

Watchers

James Cloos 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.