Git Product home page Git Product logo

urp_blitrenderfeature's Introduction

Blit Renderer Feature

  • Used to apply fullscreen image effects to camera (or other source/destination) using a shader/material.
  • Tested with 2021.2 and 2021.3 (~ URP v12). For other versions, see branches.
  • Note : Unity/URP 2022.2+ now has a Fullscreen Graph and built-in Fullscreen Pass Renderer Feature which essentially replaces this feature when blitting using camera targets. (But if you want more injection points and different destinations see the 2022.1 branch)
  • This version uses CommandBuffer.Blit so will not work in Single-Pass Instanced VR. Try using cmd-DrawMesh version instead.

Setup:

  • Install via Package Manager โ†’ Add package via git URL :
    • https://github.com/Cyanilux/URP_BlitRenderFeature.git
  • Alternatively, download and put the folder in your Assets

Usage :

  • Adds "Blit" option to Renderer Features list on Forward/Universal asset (and 2D Renderer if in 2021.2+)
  • The shader/material used should sample _MainTex to obtain source. Will work with Shader Graphs too (as long as you set the texture Reference in the Blackboard / Node Settings)
  • Feature allows specific access to selecting the source and destination targets (via Camera, TextureID or Render Texture object)
  • Some usage examples :
    • Could be used with Camera for both source/destination to apply an shader/material as an image effect / post process
    • Could be used to copy the camera source to a TextureID. Similar to what the Opaque Texture / Scene Color does. (When TextureID is used in destination it automatically creates a Temporary Render Texture, and should also set it as a global texture so it can be obtained in shaders rendered later. May want to avoid using IDs that already exist)
    • Could be used with Render Texture object source (rendered by a second camera) and Camera destination to apply it to the Main Camera

Additional Features :

  • Option to set an _InverseView matrix (cameraToWorldMatrix), for shaders that might need it to handle calculations from screen space to world. For example, reconstructing world position from depth, see : https://twitter.com/Cyanilux/status/1269353975058501636
  • (2020.2/v10+) Enabling generation of DepthNormals (_CameraNormalsTexture)

Author / Sources :

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.