GithubHelp home page GithubHelp logo

isabella232 / universalrenderingexamples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unity-technologies/universalrenderingexamples

0.0 0.0 0.0 1.09 GB

This project contains a collection of Custom Renderer examples. This will be updated as we refine the feature and add more options.

ShaderLab 22.09% C# 75.10% HLSL 2.82%

universalrenderingexamples's Introduction

Universal Rendering Examples

This project contains a collection of Custom Renderer examples. This will be updated as we refine the feature and add more options.
Current support : 2019.3.0f6 or later with UniversalRP 7.2.0

CustomRendererExamples

Usage of the project

  • Clone the repo/Download the zip down to your computer
  • Load in Unity version 2019.3.0f6 or later.
  • Each scene contains a different example
  • Upon loading the scene the Universal Render Pipeline asset is switched automatically to the one for the specific example

Project layout

  • _CompletedDemos/XXX This contains the demo data and scene files.
  • External Assets This folder contains shared assets such as meshes and textures.
  • Scripts Folder that contains some custom renderer features and utility scripts

Examples

There are three examples currently in this project, they are:

First Person Objects

This demo showcases a setup to render first person perspective objects with a FOV(Field Of View) that differs from the game scene rendering FOV, this is common in first person games where the FOV needed for the experience is too wide for the objects held in hand ends up distorted.

FOV

  • Can be found at _CompletedDemos/FPSCameraCompleted/FPSCameraDemo.unity
  • Uses the Render Objects (Experimental) feature that is provided with the Universal Render Pipeline Package
  • Different FOV for GameObjects with the Layer set to First Person Objects
  • Depth settings to avoid rendering inside close objects like walls
  • Stencil settings to properly handle transparencies

Toon Outline

Showcases a setup to create an effect of Toon styled outlines, there are two approaches in the example, a post-process one and a hull mesh approach. One example uses a custom RendererFeature and both use custom shaders.

FOV

  • Can be found at _CompletedDemos/ToonOutlinePostprocessCompleted/ToonOutlinePost.unity
  • Uses the Blit custom feature(Blit.cs and BlitPass.cs) that is provided with this project for the OutlinePostEffect custom renderer
  • Custom Sobel Filter shader with Posterize option
  • Uses the Render Objects (Experimental) feature that is provided with the Universal Render Pipeline Package for the OutlineHullEffect custom renderer
  • Custom Toon Outline shader based of Unity Basic Toon shader

Object Occlusion

Showcases a setup useful to create effects when an object moves behind another one. Zero code needed, Shadergraph used for dither effect.

FOV

  • Can be found at _CompletedDemos/UnityOcclusionDemoCompleted/UnityOcclusionDemo.unity
  • Uses the Render Objects (Experimental) feature that is provided with the Universal Render Pipeline Package
  • Shadergraph made Dither shader for the effect

universalrenderingexamples's People

Contributors

phi-lira avatar verasl avatar jonasmortensen avatar hybridherbst avatar kaychang-unity avatar thomas-zeng 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.