This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
pidi_planar_reflections_3 [2020/08/25 03:54] irrsoft [Movable Reflective Surfaces] |
pidi_planar_reflections_3 [2020/09/25 05:34] irrsoft [Universal / High Definition RP vs Standard Pipeline] |
||
---|---|---|---|
Line 17: | Line 17: | ||
</ | </ | ||
<WRAP justify> | <WRAP justify> | ||
- | Below you can see a comparison table showing the full feature set of each edition. The Lite edition has an add-on sold separately which adds LWRP support in Unity 2019.1+ (this add-on is included free of charge in the Standard / Team edition). To learn more about the specific limits and differences between the standard Unity rendering pipeline (also known as Built-in) and the new LWRP pipeline, please go to the corresponding section of the documentation. | + | Below you can see a comparison table showing the full feature set of each edition. The Lite edition has an add-on sold separately which adds LWRP support in Unity 2019.4+ (this add-on is included free of charge in the Standard / Team edition). To learn more about the specific limits and differences between the standard Unity rendering pipeline (also known as Built-in) and the new LWRP pipeline, please go to the corresponding section of the documentation. |
</ | </ | ||
\\ | \\ | ||
Line 28: | Line 28: | ||
| Culling, clipping and shadows control | ✓ | ✓ | | | Culling, clipping and shadows control | ✓ | ✓ | | ||
| Static + real-time reflections composition | X | ✓ | | | Static + real-time reflections composition | X | ✓ | | ||
- | | Opaque PRB Shaders | | + | | Opaque PRB Shaders | |
- | | Transparent PBR Shaders | | + | | Transparent PBR Shaders | |
- | | Mobile-ready shaders | + | | Mobile-ready shaders | ✓ | ✓ | |
- | | LWRP support* | With SRP add-on | + | |
| Universal RP (URP) support | With SRP add-on | | Universal RP (URP) support | With SRP add-on | ||
| Support for integrated URP Post FX | X | ✓ | | | Support for integrated URP Post FX | X | ✓ | | ||
Line 37: | Line 36: | ||
| Support for integrated HDRP Post FX | X | ✓ | | | Support for integrated HDRP Post FX | X | ✓ | | ||
| Water shaders | With Water add-on | | Water shaders | With Water add-on | ||
+ | | Blur Pass | X | ✓ | | ||
+ | |||
\\ | \\ | ||
<WRAP justify> | <WRAP justify> | ||
Line 42: | Line 43: | ||
</ | </ | ||
<WRAP justify> | <WRAP justify> | ||
- | *The LWRP pipeline has been deprecated by Unity and thus is no longer supported. Please use the Universal Rendering Pipeline integration instead. For better compatibility, | + | *The LWRP pipeline has been deprecated by Unity and thus is no longer supported. Please use the Universal Rendering Pipeline integration instead. For better compatibility, |
</ | </ | ||
\\ | \\ | ||
Line 48: | Line 49: | ||
---- | ---- | ||
- | ===== Universal RP vs Standard Pipeline ===== | + | ===== Universal |
---- | ---- | ||
Line 61: | Line 62: | ||
</ | </ | ||
{{tablelayout? | {{tablelayout? | ||
- | ^ Feature | + | ^ Feature |
| Render to external RenderTexture | ✓ | ✓ | | | Render to external RenderTexture | ✓ | ✓ | | ||
| Post Process Stack v2 Support | ✓ | ✓ | | | Post Process Stack v2 Support | ✓ | ✓ | | ||
| Real-time + Static Reflections | X | ✓ | | | Real-time + Static Reflections | X | ✓ | | ||
| Dynamic reflection resolution | ✓ | ✓ | | | Dynamic reflection resolution | ✓ | ✓ | | ||
- | | Advanced optimization | | + | | Advanced optimization | |
| Layer-specific reflections | ✓ | ✓ | | | Layer-specific reflections | ✓ | ✓ | | ||
- | | Water shaders | | + | | Water shaders | |
| Depth based effects | X | ✓ | | | Depth based effects | X | ✓ | | ||
+ | | Blur Pass / Blurred reflections | ✓ | ✓ | | ||
<WRAP justify> | <WRAP justify> | ||
- | Different packages are provided | + | Due to multiple changes in the way URP / HDRP releases |
</ | </ | ||
Line 91: | Line 93: | ||
* It is being developed with Unity 2017.1+ | * It is being developed with Unity 2017.1+ | ||
- | * If it uses LWRP, make sure it is using a compatible version | + | * If it uses Universal RP or HDRP, make sure you are using the latest Unity LTS release (Unity 2019.4 LTS) |
\\ | \\ | ||
Line 126: | Line 128: | ||
</ | </ | ||
\\ | \\ | ||
- | {{ : | + | {{ : |
\\ | \\ | ||
<WRAP justify> | <WRAP justify> | ||
Line 135: | Line 137: | ||
To achieve the best results and especially if you plan to use the advanced Water Shaders with URP, you must change the settings of the Scriptable Render Pipeline Asset that you are using (you can find it in Project Settings / Graphics) and enable the Opaque and Depth texture rendering features. This will ensure that all the internal data required by PIDI Planar Reflections 3 is generated. | To achieve the best results and especially if you plan to use the advanced Water Shaders with URP, you must change the settings of the Scriptable Render Pipeline Asset that you are using (you can find it in Project Settings / Graphics) and enable the Opaque and Depth texture rendering features. This will ensure that all the internal data required by PIDI Planar Reflections 3 is generated. | ||
</ | </ | ||
- | + | \\ | |
- | {{ : | + | {{ : |
+ | \\ | ||
<WRAP justify> | <WRAP justify> | ||
- | While we do our best to keep up to date with LWRP releases there may be times when Unity updates their pipelines and adds or removes functionality from them (and in most cases breaking the compatibility of LWRP shaders) before we can issue the corresponding update. If your version of LWRP does not load the shaders appropriately or the demo scenes inside the URP Add on folder show pink materials please be patient, as we will issue the corresponding patch usually within 1-2 days of a new LWRP release or contact us to let us know the details of the error to our [[support@irreverent-software.com|support email]]. | + | While we do our best to keep up to date with LWRP releases there may be times when Unity updates their pipelines and adds or removes functionality from them (and in most cases breaking the compatibility of LWRP shaders) before we can issue the corresponding update. If your version of Universal RP / HDRP does not load the shaders appropriately or the demo scenes inside the URP Add on folder show pink materials please be patient, as we will issue the corresponding patch usually within 1-2 days of a new LWRP release or contact us to let us know the details of the error to our [[support@irreverent-software.com|support email]]. |
</ | </ | ||
Line 172: | Line 174: | ||
\\ | \\ | ||
- | {{ : | + | {{ : |
\\ | \\ | ||
Line 180: | Line 182: | ||
\\ | \\ | ||
- | {{ : | + | {{ : |
\\ | \\ | ||
Line 202: | Line 204: | ||
\\ | \\ | ||
- | {{ : | + | {{ : |
\\ | \\ | ||
Line 210: | Line 212: | ||
\\ | \\ | ||
- | {{ : | + | {{ : |
\\ | \\ | ||
Line 336: | Line 338: | ||
==== Post FX Support ==== | ==== Post FX Support ==== | ||
- | ### | + | <WRAP justify> |
PIDI : Planar Reflections 3 comes with integrated support for the Post Process Stack v2.0 and the new Post Process system used in the Universal RP for Unity 2019.3. This new integrated support allows you to add Post Process Effects to your reflections in just a few clicks. | PIDI : Planar Reflections 3 comes with integrated support for the Post Process Stack v2.0 and the new Post Process system used in the Universal RP for Unity 2019.3. This new integrated support allows you to add Post Process Effects to your reflections in just a few clicks. | ||
- | ### | + | </ |
\\ | \\ | ||
Line 344: | Line 346: | ||
\\ | \\ | ||
- | ### | + | <WRAP justify> |
To enable Post FX support simply enable the corresponding setting in the **GENERAL SETTINGS** tab from the main UI of your Planar Reflections Renderer. An additional tab of settings called **POST FX SETTINGS** will appear. | To enable Post FX support simply enable the corresponding setting in the **GENERAL SETTINGS** tab from the main UI of your Planar Reflections Renderer. An additional tab of settings called **POST FX SETTINGS** will appear. | ||
- | ### | + | </ |
- | ### | + | <WRAP justify> |
There are two ways in which the Post FX can be set up for the reflections, | There are two ways in which the Post FX can be set up for the reflections, | ||
- | ### | + | </ |
- | ### | + | <WRAP justify> |
In most cases it will be best to set up specific settings for each reflection since not all the Post Process FX assigned to the standard Game Cameras will work correctly in the reflections. Any effect that depends on motion vectors (such as TAA, Motion Blur) or that depends on screen coordinates (Vignetting) may not work correctly within the reflection. | In most cases it will be best to set up specific settings for each reflection since not all the Post Process FX assigned to the standard Game Cameras will work correctly in the reflections. Any effect that depends on motion vectors (such as TAA, Motion Blur) or that depends on screen coordinates (Vignetting) may not work correctly within the reflection. | ||
- | ### | + | </ |
- | ### | + | <WRAP justify> |
Some other effects may be to expensive to compute and not necessary for the reflection itself, such as SSR or depth of field effects. In these cases, having a specific collection of Post FX Volumes for the reflections and separate from those for the game itself may make sense. | Some other effects may be to expensive to compute and not necessary for the reflection itself, such as SSR or depth of field effects. In these cases, having a specific collection of Post FX Volumes for the reflections and separate from those for the game itself may make sense. | ||
- | ### | + | </ |
\\ | \\ | ||
---- | ---- | ||
- | ==== Camera | + | ==== Reflection |
- | ### | + | <WRAP justify> |
- | In some cases you may want to simulate more accurate PBR reflections by using depth-based blur on them (which makes the objects | + | In some cases you may need to access the depth pass of the reflection, |
- | ### | + | </ |
- | ### | + | <WRAP justify> |
PIDI Planar Reflections 3 makes this process extremely easy by allowing you enable the depth features of the Reflections Renderer with just a toggle, the **CONTACT DEPTH SUPPORT** toggle. | PIDI Planar Reflections 3 makes this process extremely easy by allowing you enable the depth features of the Reflections Renderer with just a toggle, the **CONTACT DEPTH SUPPORT** toggle. | ||
- | ### | + | </ |
\\ | \\ | ||
Line 377: | Line 379: | ||
\\ | \\ | ||
- | ### | + | <WRAP justify> |
Enabling this feature will render an additional pass for each texture and store it in a **_ReflectionDepth** texture that can be used by different shaders to simulate a whole new range of effects. The texture contains the distance of each object relative to the surface of the reflective plane stored in a negative green space (the further away the objects are the greener the color gets and the closer the objects are the blacker the color) with the background and spaces without any objects being rendered in full green color. | Enabling this feature will render an additional pass for each texture and store it in a **_ReflectionDepth** texture that can be used by different shaders to simulate a whole new range of effects. The texture contains the distance of each object relative to the surface of the reflective plane stored in a negative green space (the further away the objects are the greener the color gets and the closer the objects are the blacker the color) with the background and spaces without any objects being rendered in full green color. | ||
- | ### | + | </ |
- | ### | + | <WRAP justify> |
To make a Reflections Caster use this depth texture and send it to the materials you just need to enable the **REFLECTION DEPTH** toggle in the Reflections caster component for the corresponding material. | To make a Reflections Caster use this depth texture and send it to the materials you just need to enable the **REFLECTION DEPTH** toggle in the Reflections caster component for the corresponding material. | ||
- | ### | + | </ |
\\ | \\ | ||
{{ : | {{ : | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | ==== Blurred Reflections Pass ==== | ||
+ | |||
+ | <WRAP justify> | ||
+ | Starting with version 3.5, PIDI Planar Reflections 3 includes a new feature called "Blur Pass". This feature allows you to apply a high quality Gaussian Blur filter to the reflections rendered by the asset right before assigning them to the material. This blur pass is applied by the caster on a per-object and per-material basis. | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | {{ : | ||
+ | \\ | ||
+ | |||
+ | <WRAP justify> | ||
+ | There are two ways of applying this blur pass, either to the Final Result of the reflection rendering process or as a separate pass to be stored in a new texture2D parameter called " | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | {{ : | ||
+ | \\ | ||
+ | |||
\\ | \\ | ||
---- | ---- | ||
Line 394: | Line 417: | ||
==== Create Custom Shaders ==== | ==== Create Custom Shaders ==== | ||
- | ### | + | <WRAP justify> |
While this guide will not provide any assistance in how to create shaders (there are far better resources to learn how to do this) we will cover here the basics of which parameters are needed in order to process the reflections as well as how should their coordinates be calculated in order to project them over a surface. | While this guide will not provide any assistance in how to create shaders (there are far better resources to learn how to do this) we will cover here the basics of which parameters are needed in order to process the reflections as well as how should their coordinates be calculated in order to project them over a surface. | ||
- | ### | + | </ |
- | ### | + | <WRAP justify> |
The main parameter needed for the reflections is a sampler2D parameter named _ReflectionTex. This will receive the output texture from the Reflections Renderer through the Reflections Caster. This texture comes ready to be projected using screen coordinates with an inverse X. | The main parameter needed for the reflections is a sampler2D parameter named _ReflectionTex. This will receive the output texture from the Reflections Renderer through the Reflections Caster. This texture comes ready to be projected using screen coordinates with an inverse X. | ||
- | ### | + | </ |
This is, screen based UVs whose X has been flipped by doing screenUV.x = 1-screenUV.x | This is, screen based UVs whose X has been flipped by doing screenUV.x = 1-screenUV.x | ||
- | ### | + | <WRAP justify> |
Additionally, | Additionally, | ||
- | ### | + | </ |
\\ | \\ | ||
Line 412: | Line 435: | ||
\\ | \\ | ||
- | ### | + | <WRAP justify> |
For LWRP and Universal RP shaders we recommend you to use Shadergraph as it will provide you great compatibility between different versions with little maintenance required. To ease the creation of custom shaders that use PIDI Planar Reflections we have provided a small subgraph called " | For LWRP and Universal RP shaders we recommend you to use Shadergraph as it will provide you great compatibility between different versions with little maintenance required. To ease the creation of custom shaders that use PIDI Planar Reflections we have provided a small subgraph called " | ||
- | ### | + | </ |