Note: This page is subject to change during the 2019.1 beta cycle.
Lightweight Render Pipeline Asset
To use the Lightweight Render Pipeline (LWRP), you have to create a LWRP Asset and assign the asset in the Graphics settings.
The LWRP Asset controls several graphical features and quality settings for the Lightweight Render Pipeline. It is a scriptable object that inherits from ‘RenderPipelineAsset’. When you assign the asset in the Graphics settings, Unity switches from the built-in render pipeline to the LWRP. You can then adjust the corresponding settings directly in the LWRP, instead of looking for them elsewhere.
You can have multiple LWRP assets and switch between them. For example, you can have one with Shadows on and one with Shadows off. If you switch between the assets to see the effects, you don’t have to manually toggle the corresponding settings for shadows every time. You cannot, however, switch between HDRP/SRP and LWRP assets, as the render pipelines are incompatible.
In the LWRP, you can configure settings for:
The General settings control the core part of the pipeline rendered frame.
|Depth Texture||Enable this to make the LWRP render a depth texture by default for all cameras in your Scene. If you want to use Post Processing, Soft Particles, or Shader effects that depend on Scene depth, you must enable this. When this is enabled, you can access the Depth Texture in your custom shaders and in shader code via the
|Opaque Texture||Enable this to create a
|Opaque Downsampling||Set the sampling mode on the opaque texture to one of the following:
None: Produces a copy of the opaque pass in the same resolution as the camera.
2x Bilinear: Produces a half-resolution image with bilinear filtering.
4x Box: Produces a quarter-resolution image with box filtering. This produces a softly blurred copy.
4x Bilinear: Produces a quarter-resolution image with bi-linear filtering.
These settings control the quality level of the LWRP. This is where you can make performance better on lower-end hardware or make graphics look better on higher-end hardware.
Tip: If you want to have different settings for different hardware, you can configure these settings across multiple Lightweight Render Pipeline assets, and switch them out as needed.
|HDR||Enable this to allow rendering in High Dynamic Range (HDR) by default for every camera in your Scene. With HDR, the brightest part of the image can be greater than 1. This gives you a wider range of light intensities, so your lighting looks more realistic. With it, you can still see details and experience less saturation even with bright light. This is useful if you want a wide range of lighting or to use bloom effects. If you’re targeting lower-end hardware, you can disable this to skip HDR calculations and get better performance. You can override this for individual cameras in the Camera Inspector.|
|MSAA||Use Multi Sample Anti-aliasing by default for every Camera in your Scene while rendering. This softens edges of your geometry, so they’re not jagged or flickering. In the drop-down menu, select how many samples to use per pixel: 2x, 4x, or 8x. The more samples you choose, the smoother your object edges are. If you want to skip MSAA calculations, or you don’t need them in a 2D game, select Disabled. You can override this for individual cameras in the Camera Inspector.|
|Render Scale||This slider scales the render target resolution (not the resolution of your current device). Use this when you want to render at a smaller resolution for performance reasons or to upscale rendering to improve quality. This only scales the game rendering. UI rendering is left at the native resolution for the device.|
These settings affect the lights in your Scene.
If you disable some of these settings, the relevant keywords are stripped from the shader variables. If there are certain settings that you know for certain you won’t use in your game or app, you can disable them to improve performance and reduce build time.
|Main Light||These settings affect the main Directional Light in your Scene. You can select this by assigning it as a Sun Source in the Lighting Inspector. If you don’t assign a sun source, the LWRP treats the brightest directional light in the Scene as the main light. You can choose between Pixel Lighting and None. If you choose None, LWRP doesn’t render a main light, even if you’ve set a sun source.|
|Cast Shadows||Check this box to make the main light cast shadows in your Scene.|
|Shadow Resolution||This controls how large the shadow map texture for the main light is. High resolutions give sharper, more detailed shadows. If memory or rendering time is an issue, try a lower resolution.|
|Additional Lights||Here, you can choose to have additional lights to suppliment your main light. Choose between Vertex Lights, Pixel Lights, Both, or None.|
|Per Object Limit||This slider sets the limit for how many additional lights can affect each GameObject.|
|Cast Shadows||Check this box to make the additional lights cast shadows in your Scene.|
|Shadow Resolution||This controls the size of the textures that cast directional shadows for the additional lights. This is a sprite atlas that packs up to 16 shadow maps. High resolutions give sharper, more detailed shadows. If memory or rendering time is an issue, try a lower resolution.|
These settings affect how shadows look and behave. They also impact performance, so this is where you can make tweaks to get the best balance between visual quality and shadow rendering speed.
|Distance||This controls how far ahead of the camera objects cast shadows, in Unity units. After this distance, LWRP doesn’t render shadows. For example, the value 100 means that objects more than 100 meters away from the camera do not cast shadows. Use this in large, open worlds, where rendering shadows far away can consume lots of memory. Or use it in top-down games with limited view distance.|
|Cascades||Select the number of cascades for shadows. A high number of cascades gives you more detailed shadows nearer the camera.The options are: None, Two Cascades and Four Cascades. If you’re experiencing performance issues, try lowering the amount of cascades. You can also configure the distance for shadows in the section below the setting. Further away from the camera, shadows become less detailed.|
|Soft Shadows||If you have enabled shadows for either Main Light or Additionanal Light, you can enable this to add a smoother filtering on the shadow maps. This gives you smooth edges on shadows. When enabled, the render pipeline performs a 5x5 Tent filter on desktop platforms and a 4 Tap filter on mobile devices. When disabled, the render pipeline samples the shadow once with default hardware filtering. If you disable this feature, you’ll get faster rendering, but sharper, possibly pixelated, shadow edges.|
This section allows you to fine tune less commonly changed settings, which impact deeper rendering features and shader combinations.
|Dynamic Batching||Enable Dynamic Batching, to make the render pipeline automatically batch small dynamic objects that share the same Material. This is useful for platforms and graphics APIs that do not support GPU instancing. If your targeted hardware does support GPU instancing, disable Dynamic Batching. You can change this at run time.|