Giter Site home page Giter Site logo

urpgrabpass's Introduction

URP Grab Pass

license

日本語ドキュメント(Japanese Documents Available)

Replacement for GrabPass in Unity's Universal Render Pipeline (URP).

Demo

Features

  • You can get the camera's color texture at the following timings.
    • After drawing opaque objects
    • After drawing transparent objects
  • Then you can use it in your shader.
  • In contrast to URP's _CameraOpaqueTexture, you can also get the color texture after drawing semi-transparent objects.

Requirement

Universal RP 10.2.0 or higher.
Unity2020.2.3f1 or higher.
VR is not supported.

Usage

Setup Universal Render Pipeline

Install URP Grab Pass

  1. Open the Package Manager from Window > Package Manager
  2. "+" button > Add package from git URL
  3. Enter the following

Package Manager

Or, open Packages/manifest.json and add the following to the dependencies block.

{
    "dependencies": {
        "com.harumak.urpgrabpass": "https://github.com/Haruma-K/URPGrabPass.git?path=/Assets/URPGrabPass"
    }
}

If you want to set the target version, specify it like follow.

Setup Renderer Feature

  • Add the Grab Pass Renderer Feature from the inspector of the Forward Renderer Data.

Add Renderer Feature

  • Change the properties of the Renderer Feature if necessary.

Set up Renderer Feature

Property Name Description
Name Name of the Renderer Feature.
Timing When to get and use the camera's color texture.
Grabbed Texture Name Name of the grabbed texture when it is used in the shader.
Shader Light Modes LightModes for shaders that use the texture.
Sorting Criteria How to sort objects during rendering.

Write and use the shader

Demo

  1. Clone this repository.
  2. Open the following scene.

License

This software is released under the MIT License.
You are free to use it within the scope of the license.
However, the following copyright and license notices are required for use.

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.