Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.5.2 backport] Backported recent changes from 8.x. Including "Writing custom shaders" and the rewritten post-processing and Volumes pages. #2740

Merged
merged 2 commits into from Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -4,11 +4,11 @@ You can download and install the latest version of the Universal Render Pipeline

## Before you begin

URP contains its own integrated [post-processing solution](integration-with-post-processing.md). This version of URP also supports the Post Processing Version 2 (PPV2) package, for backwards compatibility with existing Projects. Both post-processing solutions will be supported in the versions of URP that are compatible with Unity 2019.4 LTS. From Unity 2020.1, only the integrated solution will be supported.
URP contains its own [integrated post-processing solution](integration-with-post-processing.md). URP 7.x also supports the Post Processing Stack v2 (PPv2) package, for backwards compatibility with existing projects. Both post-processing solutions are supported in the versions of URP that are compatible with Unity 2019.4 LTS. Starting with Unity 2020.1, only the integrated post-processing solution is supported.

If you have the Post Processing Version 2 package installed in your Project and you want to use URP's integrated post-processing solution, you need to delete the Post Processing Version 2 package before you install URP into your Project. When you have installed URP, you can then recreate your post-processing effects.
If you have the Post Processing Stack v2 package installed in your project and you want to use URP's integrated post-processing solution, you need to delete the Post Processing Stack v2 package before you install URP into your project. After installing URP, you need to recreate your post-processing effects with the integrated post-processing solution.

URP's integrated post-processing solution does not currently support custom post-processing effects. If your Project uses custom post-processing effects created in PPV2, these cannot currently be recreated in URP's integrated post-processing solution. Custom post-processing effects will be supported in a forthcoming release of URP.
URP's integrated post-processing solution does not currently support custom post-processing effects. If your project uses custom post-processing effects created in PPv2, these cannot currently be recreated in URP.

## Installing URP

Expand All @@ -29,7 +29,7 @@ The [Universal Render Pipeline Asset](universalrp-asset.md) controls the global
To create a Universal Render Pipeline Asset:

1. In the Editor, go to the Project window.
2. Right-click in the Project window, and select __Create__ > __Rendering__ > __Universal Render Pipeline__ > __Pipeline Asset__. Alternatively, navigate to the menu bar at the top, and select __Assets__ > __Create__ > __Rendering__ > __Universal Render Pipeline__ > __Pipeline Asset__.
2. Right-click in the Project window, and select __Create > Rendering > Universal Render Pipeline > Pipeline Asset__. Alternatively, navigate to the menu bar at the top, and select __Assets > Create > Rendering > Universal Render Pipeline > Pipeline Asset__.

You can either leave the default name for the new Universal Render Pipeline Asset, or type a new one.

Expand All @@ -41,7 +41,7 @@ To use URP, you need to add the newly created Universal Render Pipeline Asset to
To add the Universal Render Pipeline Asset to your Graphics settings:


1. Navigate to __Edit__ > __Project Settings...__ > __Graphics__.
1. Navigate to __Edit > Project Settings... > Graphics__.
2. In the __Scriptable Render Pipeline Settings__ field, add the Universal Render Pipeline Asset you created earlier. When you add the Universal Render Pipeline Asset, the available Graphics settings immediately change. Your Project is now using URP.

## Upgrading your shaders
Expand Down
Expand Up @@ -5,6 +5,6 @@ To use the Universal Render Pipeline (URP), you can start a new Project or upgra
- [Create a new URP Project from a Template](creating-a-new-project-with-urp.md). If you are starting a new Project from scratch, this is the best choice. When you do this, Unity automatically installs and configures URP for you.
- [Install URP into an existing Unity Project](InstallURPIntoAProject.md). If you have started a Project using the Built-in Render Pipeline, you can install URP and configure your Project to use URP. When you do this, you must configure URP yourself. You will need to manually convert or recreate parts of your Project (such as lit shaders or post-processing effects) to be compatible with URP.

**Note:** URP's integrated post-processing solution does not currently support custom post-processing effects. If your Project uses custom post-processing effects, these cannot currently be recreated in URP's integrated post-processing solution. Custom post-processing effects will be supported in a forthcoming release of URP.
> **Note:** URP's integrated post-processing solution does not support custom post-processing effects currently. If your project uses custom post-processing effects, they cannot be recreated in URP's integrated post-processing solution. Custom post-processing effect support is on the URP roadmap.

**Note:** Projects made using URP are not compatible with the High Definition Render Pipeline (HDRP) or the Built-in Render Pipeline. Before you start development, you must decide which render pipeline to use in your Project. For information on choosing a render pipeline, see [the Render Pipelines section of the Unity Manual](https://docs.unity3d.com/2019.3/Documentation/Manual/render-pipelines.html).
> **Note:** Projects made using URP are not compatible with the High Definition Render Pipeline (HDRP) or the Built-in Render Pipeline. Before you start development, you must decide which render pipeline to use in your Project. For information on choosing a render pipeline, see [the Render Pipelines section of the Unity Manual](https://docs.unity3d.com/2019.3/Documentation/Manual/render-pipelines.html).
Expand Up @@ -9,7 +9,7 @@ Universal Render Pipeline (URP) only blurs camera motions.
**Motion Blur** uses the [Volume](Volumes.md) system, so to enable and modify **Motion Blur** properties, you must add a **Motion Blur** override to a [Volume](Volumes.md) in your Scene. To add **Motion Blur** to a Volume:

1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector.
2. In the Inspector, navigate to **Add Override** > **Post-processing**, and click on **Motion Blur**. URP now applies **Motion Blur** to any Camera this Volume affects.
2. In the Inspector, navigate to **Add Override > Post-processing**, and click on **Motion Blur**. URP now applies **Motion Blur** to any Camera this Volume affects.

## Properties

Expand Down
Expand Up @@ -5,12 +5,16 @@
* [Getting started](InstallingAndConfiguringURP.md)
* [Create a Project from a Template](creating-a-new-project-with-urp.md)
* [Install URP into an existing Project](InstallURPIntoAProject.md)
* [The Universal Render Pipeline Asset](universalrp-asset.md)
* [Render Pipeline Concepts](urp-concepts.md)
* [The URP Asset](universalrp-asset.md)
* [Forward Renderer](urp-forward-renderer.md)
* [Renderer Feature](urp-renderer-feature.md)
* [How to add a Renderer Feature](urp-renderer-feature-how-to-add.md)
* [Upgrade guides](upgrade-guides.md)
* [Upgrading to URP 9.0.x](upgrade-guide-9-0-x.md)
* [Upgrading to URP 8.1.0](upgrade-guide-8-1-0.md)
* [Upgrading to URP 8.0.0](upgrade-guide-8-0-0.md)
* [Upgrading to URP 7.5.0](upgrade-guide-7-5-0.md)
* [Upgrading to URP 7.5.x](upgrade-guide-7-5-x.md)
* [Upgrading to URP 7.4.0](upgrade-guide-7-4-0.md)
* [Upgrading to URP 7.3.0](upgrade-guide-7-3-0.md)
* [Upgrading to URP 7.2.0](upgrade-guide-7-2-0.md)
Expand All @@ -19,6 +23,7 @@
* [Lighting](lighting.md)
* [Light component reference](light-component)
* [The Universal Additional Light Data component](universal-additional-light-data.md)
* [Lighting Mode](urp-lighting-mode.md)
* [Cameras](cameras.md)
* [The Universal Additional Camera Data component](universal-additional-camera-data.md)
* [Render Type](camera-types-and-render-type.md)
Expand All @@ -30,6 +35,7 @@
* [Camera component reference](camera-component-reference.md)

* [Post-processing](integration-with-post-processing.md)
* [How to configure](integration-with-post-processing.md#post-proc-how-to)
* [Volumes](Volumes.md)
* [Volume Profile](VolumeProfile.md)
* [Volume Overrides](VolumeOverrides.md)
Expand Down Expand Up @@ -68,6 +74,7 @@
* [URP unlit shader with color input](writing-shaders-urp-unlit-color.md)
* [Drawing a texture](writing-shaders-urp-unlit-texture.md)
* [Visualizing normal vectors](writing-shaders-urp-unlit-normals.md)
* [URP ShaderLab Pass tags](urp-shaders/urp-shaderlab-pass-tags.md)

* [Customizing URP](customizing-urp.md)
* [beginCameraRendering event](using-begincamerarendering.md)
Expand Down
@@ -1,21 +1,23 @@
# Volume Overrides

__Volume Overrides__ are structures which contain values that override the default properties in a [Volume Profile](Volume-Profile.html). The Universal Render Pipeline (URP) uses these Profiles within the [Volume](Volumes.html) framework. For example, you could use a Volume Override in your Unity Project to darken the outside edges of yours Scene.
__Volume Overrides__ let you change or extend the default properties in a [Volume Profile](VolumeProfile.md).

![__Vignette__ is an example of a Volume Override.](Images/Inspectors/Vignette.png)
URP implements post-processing effects as Volume Overrides. For example, the following image shows the Vignette post-processing effect in the URP Template SampleScene.

Each Volume Override property has a checkbox on its left. Enable the checkbox to make that property editable. This also tells URP to use that property for this Volume component rather than the default value. If you disable the checkbox, URP ignores the property you set and uses the Volume’s default value for that property instead.
![Vignette post-processing effect in the URP Template SampleScene](Images/post-proc/post-proc-as-volume-override.png)

Override checkboxes allow you to override as many or as few values on a Volume component as you want. To quickly toggle all the properties between editable or not, click the __All__ or __None__ shortcuts in the top left of the Volume Override respectively.
In a the Volume Override, checkboxes to the left of each property let you enable or disable specific properties. If you disable a property, URP uses the Volume’s default value for that property instead. To turn all properties on or off, use the __All__ or __None__ shortcuts above the property list.

## Using Volume Overrides
![Volume Override property list](Images/post-proc/volume-override-property-list.png)

To render both a global vignette and a local vignette in a certain area of your Scene:
## <a name="volume-add-override"></a>How to add a Volume Override to a Volume component

1. Create a global Volume (menu: __GameObject__ &gt; __Volume__ &gt; __Global Volume__).
2. Click the **New** button next to the **Profile** property to add a new Volume Profile to the Volume.
3. Select __Add Override__ > __Vignette__, and leave it with the default settings.
4. Create a local Volume. To add a **Local** Volume with a box boundary, select __GameObject__ &gt; __Volume__ &gt; __Box Volume__.
5. Select __Add Override__ &gt; __Vignette__.Then, in the __Vignette__ Inspector, override the properties them with your preferred values.
To add a Volume Override to a Volume component:

Now, whenever your Camera is within the bounds of the local Volume's Collider, URP uses the __Vignette__ values from that Volume. Whenever your Camera is outside the bounds of the local Volume's Collider, URP uses the __Vignette__ values from the global Volume
1. Select a GameObject with the Volume component.

2. In the Inspector window, click Add Override.

![Add Override](Images/post-proc/volume-add-override.png)

Use the search field to search for an Override, or select an Override from the menu.
Expand Up @@ -2,11 +2,11 @@

A Volume Profile is a [Scriptable Object](https://docs.unity3d.com/Manual/class-ScriptableObject.html) which contains properties that [Volumes](Volumes.md) use to determine how to render the Scene environment for Cameras they affect. A Volume references a Volume Profile in its **Profile** field and uses values from the Volume Profile it references.

A Volume Profile organizes its properties into structures which control different environment settings. These structures all have default values that you can use, but you can use [Volume Overrides](VolumeComponents.md) to override these values and customize the environment settings.
A Volume Profile organizes its properties into structures which control different environment settings. These structures all have default values that you can use, but you can use [Volume Overrides](VolumeOverrides.md) to override these values and customize the environment settings.

##Create and custom a Volume Profile

There are multiple ways to create a Volume Profile. Unity creates, and links, a Volume Profile automatically when you create a **Scene Settings** GameObject (menu: **Rendering** &gt; **Scene Settings**). You can also create a Volume Profile manually. Navigate to menu: **Assets** &gt; **Create** &gt; **Volume Profile**.
There are multiple ways to create a Volume Profile. Unity creates, and links, a Volume Profile automatically when you create a **Scene Settings** GameObject (menu: **Rendering > Scene Settings**). You can also create a Volume Profile manually. Navigate to menu: **Assets > Create > Volume Profile**.

Open the Volume Profile in the Inspector to edit its properties. To do this, you can either:

Expand Down