All notable changes to this package will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Show Additional Properties
on each section.General
section has been renamed to Rendering
.BaseShaderGUI.DrawAdditionalFoldouts
to BaseShaderGUI.FillAdditionalFoldouts
.FinalPostProcessPass
to AfterRenderingPostProcessing
event from AfterRendering
. This allows user pass to execute before and after FinalPostProcessPass
and CapturePass
to capture everything.ScriptableRenderPass
.CameraData
.Render Type
property. A Base Camera can be initialized with either the Skybox or Solid Color, and can combine its output with that of one or more Overlay Cameras. An Overlay Camera is always initialized with the contents of the previous Camera that rendered in the Camera Stack.[MainTexture]
and [MainColor]
shader property attributes to URP shader properties. These will link script material.mainTextureOffset and material.color to _BaseMap
and _BaseColor
shader properties.ScriptableRendererFeature.SetActive(bool)
to set whether a Renderer Feature will execute, ScriptableRendererFeature.isActive
can be used to check the current active state of the Renderer Feature.
additional steps to the 2D Renderer setup page for quality and platform settings.SceneDepth
node didn't work with XR single-pass (double-wide) rendering. See case 1123069.HDRP
string in their path to be stripped from the build.UniversalRenderPipelineLightEditor.cs
tries to access SceneView.lastActiveSceneView
.Volume Trigger
was set.mad()
in SMAA shader for OpenGL.SHADERGRAPH_AMBIENT_SKY
, SHADERGRAPH_AMBIENT_EQUATOR
and SHADERGRAPH_AMBIENT_GROUND
variables to be uninitialized.Configure
method. case 1259750GetMainLightShadowParams
. This returns a half4 for the main light that packs shadow strength in x component and shadow soft property in y component.GetAdditionalLightShadowParams
. This returns a half4 for an additional light that packs shadow strength in x component and shadow soft property in y component.Debug Level
option to the Render Pipeline Asset. With this, you can control the amount of debug information generated by the render pipeline.ScriptableRenderer
that the Camera renders with via C# using UniversalAdditionalCameraData.SetRenderer(int index)
. This maps to the Renderer List on the Render Pipeline Asset.ScriptableRendererData
on the Render Pipeline Asset as opposed to a renderer type. These are available to all Cameras and are included in builds.ScriptableRendererData
on the Render Pipeline Asset._Time
did not animate in the scene. 1175396RenderPipelineManager.DoRenderLoop
case 1156241Opaque Color
pass to never render at half or quarter resolution.ForwardRendererData
was reset each time rendering happened.ScriptableRendererFeature
script. To do so in the Editor, click on Asset > Create > Rendering > Lightweight Render Pipeline > Renderer Feature.ScriptableRendererFeature
and ScriptableRenderPass
API docs.Assets/Create/Rendering/Lightweight Render Pipeline/Forward Renderer
. This creates an Asset in your Project. You can add additional features to it and drag-n-drop the renderer to either the pipeline Asset or to a camera.ScriptableRendererFeature
to the ScriptableRenderer
to extend it with custom effects. A feature is an ScriptableObject
that can be drag-n-dropped in the renderer and adds one or more ScriptableRenderPass
to the renderer.ScriptableRenderer
now exposes interface to configure lights. To do so, implement SetupLights
when you create a new renderer.ScriptableRenderer
now exposes interface to configure culling. To do so, implement SetupCullingParameters
when you create a new renderer.ScriptableRendererData
contains rendering resources for ScriptableRenderer
. A renderer can be overridden globally for all cameras or on a per-camera basis.ScriptableRenderPass
now has a RenderPassEvents
. This controls where in the pipeline the render pass is added.ScriptableRenderPass
now exposes ConfigureTarget
and ConfigureClear
. This allows the renderer to automatically figure out the currently active rendering targets.ScriptableRenderPass
now exposes Blit
. This performs a blit and sets the active render target in the renderer.ScriptableRenderPass
now exposes RenderPostProcessing
. This renders post-processing and sets the active render target in the renderer.ScriptableRenderPass
now exposes CreateDrawingSettings
as a helper for render passes that need to call ScriptableRenderContext.DrawRenderers
.RegisterShaderPassName
from ScriptableRenderPass
. Instead, CreateDrawingSettings
now takes one or a list of ShaderTagId
.ScriptableRenderer
, ScriptableRenderPass
, and render pass injection is now out of preview.SetRenderTarget
from ScriptableRenderPass
. You should never call it. Instead, call ConfigureTarget
, and the renderer automatically sets up targets for you.RenderFullscreenQuad
from ScriptableRenderer
. Use CommandBuffer.DrawMesh
and RenderingUtils.fullscreenMesh
instead.RenderPostProcess
from ScriptableRenderer
. Use ScriptableRenderPass.RenderPostProcessing
instead.postProcessingContext
property from ScriptableRenderer
. This is now exposed in RenderingUtils.postProcessingContext
.GetCameraClearFlag
from ScriptableRenderer
.IRendererData
that contains all resources used in rendering. Then create an IRendererSetup
that creates and queues ScriptableRenderPass
. Change the renderer type either in the Pipeline Asset or in the Camera Inspector.IBeforeRender
interface.MaterialPostprocessor
.LWRP_X_Y_Z_OR_NEWER
. For example, LWRP_5_3_0_OR_NEWER
defines version 5.3.0.IAfterDepthPrePass
interface.IgnoreProjector
tag.Pipeline Asset
. Under Advanced
, toggle SRP Batcher
.unity_LightIndicesOffsetAndCount
to unity_PerObjectLightData
.unity_4LightIndices0
and unity_4LightIndices1
are now declared as unity_PerObjectLightIndices
array.UnityEngine.Experimental.Rendering.LightweightPipeline
to UnityEngine.Rendering.LWRP
.UnityEditor.Experimental.Rendering.LightweightPipeline
to UnityEditor.Rendering.LWRP
.LWRPAdditionalLightData
component to a Light
to override the default depth and normal shadow bias.You can now log the amount of shader variants in your build. To do so, go to the Pipeline Asset
. Under Advanced
, select and set the Shader Variant Log Level
.
Removed the supportedShaderFeatures
property from LWRP core. The shader stripper now figures out which variants to strip based on the current assigned pipeline Asset in the Graphics settings.
The following error does not appear in console anymore: ("Begin/End Profiler section mismatch")
When you select a material with the Lit shader, this no longer causes the following error in the console: ("Material doesn't have..."). case 1092354
In the Simple Lit shader, per-vertex additional lights are now shaded properly.
Shader variant stripping now works when you're building a Project with Cloud Build. This greatly reduces build times from Cloud Build.
Dynamic Objects now receive lighting when the light mode is set to mixed.
MSAA now works on Desktop platforms.
The shadow bias value is now computed correctly for shadow cascades and different shadow resolutions. case 1076285
When you use Area Light with LWRP, Cast Shadows no longer overlaps with other UI elements in the Inspector. case 1085363
Read/write XRGraphicsConfig -> Read-only XRGraphics interface to XRSettings.
RenderingData
struct now holds a reference to CullResults
.opaqueSortMode
setting.GetMainLight
and GetAdditionalLight
functions can now compute shadow attenuation and store it in the new shadowAttenuation
field in LightData
struct.VertexPositionInputs
struct that contains vertex position in difference spaces (world, view, hclip).GetVertexPositionInputs
function to get an initialized VertexPositionInputs
.GetPerObjectLightIndex
function to return the per-object index given a for-loop index.GetShadowCoord
function that takes a VertexPositionInputs
as input.RenderingData
struct is now read-only.ScriptableRenderer
always performs a Clear before calling IRendererSetup::Setup.
ScriptableRenderPass::Execute
no longer takes CullResults
as input. Instead, use RenderingData
as input, since that references CullResults
.IRendererSetup_Setup
no longer takes ScriptableRenderContext
and CullResults
as input.Local Lights
nomenclature to Additional Lights
.SpotAttenuation
function to AngleAttenuation
._SHADOWS_ENABLED
keyword to _MAIN_LIGHT_SHADOWS
_SHADOWS_CASCADE
keyword to _MAIN_LIGHT_SHADOWS_CASCADE
_VERTEX_LIGHTS
keyword to _ADDITIONAL_LIGHTS_VERTEX
._LOCAL_SHADOWS_ENABLED
to _ADDITIONAL_LIGHT_SHADOWS
GetLight
function to GetAdditionalLight
.GetPixelLightCount
function to GetAdditionalLightsCount
.attenuation
to distanceAttenuation
in LightData
.GetLocalLightShadowStrength
function to GetAdditionalLightShadowStrength
.SampleScreenSpaceShadowMap
functions to SampleScreenSpaceShadowmap
.MainLightRealtimeShadowAttenuation
function to MainLightRealtimeShadow
.Directional
and Local
to MainLight
and AdditionalLights
.GetLocalLightShadowSamplingData
function to GetAdditionalLightShadowSamplingData
.lightIndex
and substractiveAttenuation
from LightData
.ComputeShadowCoord
function. GetShadowCoord
is provided instead.LightweightPipeline
references in API and classes are now named LightweightRenderPipeline
.Lightweight
prefix.Lit
, ParticlesLit
, and TerrainLit
.SimpleLit
, and ParticlesSimpleLit
.InputSurfacePBR.hlsl
, InputSurfaceSimple.hlsl
, and InputSurfaceUnlit
to LitInput.hlsl
, SimpleLitInput.hlsl
, and UnlitInput.hlsl
. These files were moved from the ShaderLibrary
folder to theShaders
.LightweightPassLit.hlsl
and LightweightPassLitSimple.hlsl
to LitForwardPass.hlsl
and SimpleLitForwardPass.hlsl
. These files were moved from the ShaderLibrary
folder to Shaders
.LightweightPassMetaPBR.hlsl
, LightweightPassMetaSimple.hlsl
and LighweightPassMetaUnlit
to LitMetaPass.hlsl
, SimpleLitMetaPass.hlsl
and UnlitMetaPass.hlsl
. These files were moved from the ShaderLibrary
folder to Shaders
.LightweightPassShadow.hlsl
to ShadowCasterPass.hlsl
. This file was moved to the Shaders
folder.LightweightPassDepthOnly.hlsl
to DepthOnlyPass.hlsl
. This file was moved to the Shaders
folder.InputSurfaceTerrain.hlsl
to TerrainLitInput.hlsl
. This file was moved to the Shaders
folder.LightweightPassLitTerrain.hlsl
to TerrainLitPases.hlsl
. This file was moved to the Shaders
folder.ParticlesPBR.hlsl
to ParticlesLitInput.hlsl
. This file was moved to the Shaders
folder.InputSurfacePBR.hlsl
to LitInput.hlsl
. This file was moved to the Shaders
folder.InputSurfaceUnlit.hlsl
to UnlitInput.hlsl
. This file was moved to the Shaders
folder.InputBuiltin.hlsl
to UnityInput.hlsl
.LightweightPassMetaCommon.hlsl
to MetaInput.hlsl
.InputSurfaceCommon.hlsl
to SurfaceInput.hlsl
.ScriptableRenderer.fullscreenMesh
.###Changed
Multiple shadow casting lights are supported. Currently only 1 directional + 4 spots light shadows.
Directional Lights are always considered a main light in shader. They have a fast shading path with no branching and no indexing.
GetMainLight() is provided in shader to initialize Light struct with main light shading data.
Directional lights have a dedicated shadowmap for performance reasons. Shadow coord always comes from interpolator.
MainLigthRealtimeShadowAttenuation(float4 shadowCoord) is provided to compute main light realtime shadows.
Spot and Point lights are always shaded in the light loop. Branching on uniform and indexing happens when shading them.
GetLight(half index, float3 positionWS) is provided in shader to initialize Light struct for spot and point lights.
Spot light shadows are baked into a single shadow atlas.
Shadow coord for spot lights is always computed on fragment.
Use LocalLightShadowAttenuation(int lightIndex, float3 positionWS) to comppute realtime shadows for spot lights.