The package samples that URP provides are:
URP Package Samples is a package sample for the Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary (URP). It contains example shaders, C# scripts, and other assets you can build upon, use to learn how to use a feature, or use directly in your application. For information on how to import URP Package Samples into your project, refer to Importing package samples.
Each example uses its own URP Asset so, if you want to build an example sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary, add the example’s URP Asset to your Graphics settings. If you don’t do this, Unity might strip shaders or render passes that the example uses.
The URP Package Samples/CameraStacking
folder contains examples for Camera Stacking. The following table describes each CameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary Stacking example in this folder.
Example | Description |
---|---|
Mixed field of view | The example in CameraStacking/MixedFOV demonstrates how to use Camera Stacking in a first-person application to prevent the character’s equipped items from clipping into the environment. This setup also makes it possible to have different fields of view for the environment camera and the equipped items camera. |
Split screen | The example in CameraStacking/SplitScreenPPUI demonstrates how to create a split-screen camera setup where each screen has its own Camera Stack. It also demonstrates how to apply post-processingA process that improves product visuals by applying filters and effects before the image appears on screen. You can use post-processing effects to simulate physical camera and film properties, for example Bloom and Depth of Field. More info post processing, postprocessing, postprocessSee in Glossary on world-space and screen-space camera UI(User Interface) Allows a user to interact with your application. Unity currently supports three UI systems. More info See in Glossary. |
3D skyboxA special type of Material used to represent skies. Usually six-sided. More info See in Glossary |
The example in CameraStacking/3D Skybox uses Camera Stacking to transform a miniature environment into a skybox. One overlay camera renders a miniature city and another renders miniature planets. The overlay cameras render to pixelsThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More infoSee in Glossary that the main camera did not draw to. With some additional scripted translation, this makes the miniature environment appear full size in the background of the main camera’s view. |
The URP Package Samples/Decals
folder contains examples for decals. The following table describes each decal example in this folder.
Example | Description |
---|---|
Blob shadows | The example in Decals/BlobShadow uses the Decal Projector component to cast a shadow under a character. This method of shadow rendering is less resource-intensive than shadow maps and is suitable for use on low-end devices. |
Paint splat | The example in Decals/PaintSplat uses a WorldSpaceUV Sub Graph and the Simple Noise Shader Graph node to create procedural decals. The noise in each paint splat uses the world position of the Decal Projector component. |
Proxy lighting | The example in Decals/ProxyLighting builds on the Blob shadows example and uses Decal Projectors to add proxy spotlights. These decals modify the emission of surfaces inside the projector’s volume.Note: To demonstrate the extent of its lighting simulation, this example disables normal real-time lighting. |
The URP Package Samples/LensFlares
folder contains lens flareA component that simulates the effect of lights refracting inside a camera lens. Use a Lens Flare to represent very bright lights or add atmosphere to your scene. More info
See in Glossary examples. The following table describes each lens flare example in this folder.
Example | Description |
---|---|
Sun flare | The LensFlares/SunFlare example demonstrates how to use the Lens Flare component to add a lens flare effect to the main directional light in the scene. |
Lens flare showroom | The LensFlares/LensFlareShowroom example helps you to author lens flares. To use it:1. In the Hierarchy window, select the Lens Flare GameObject. 2. In the Lens Flare component, assign a LensFlareDataSRP asset to the Lens Flare Data property. 3. Change the Lens Flare component and data properties and view the lens flare in the Game View. Note: If the text box is in the way, disable the Canvas in the scene. |
The URP Package Samples/Lighting
folder contains examples for lighting. The following table describes each lighting example in this folder.
Example | Description |
---|---|
Reflection probes | The example in Lighting/Reflection Probes uses reflection probesA rendering component that captures a spherical view of its surroundings in all directions, rather like a camera. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. More infoSee in Glossary to create reflection maps for a reflective sphere GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info See in Glossary. This sample shows how the Probe Blending and Box Projection settings can change the reflection within a scene that uses reflection probes. |
The URP Package Samples/RendererFeatures
folder contains examples for Renderer Features. The following table describes each Renderer Feature example in this folder.
Example | Description |
---|---|
Ambient occlusionA method to approximate how much ambient light (light not coming from a specific direction) can hit a point on a surface. See in Glossary |
The example in RendererFeatures/AmbientOcclusion uses a Renderer Feature to add screen space ambient occlusion (SSAO) to URP. For an example of how to set up this effect, refer to the SSAO_Renderer asset. |
Glitch effect | The example in RendererFeatures/GlitchEffect uses the Render Objects Render Feature and the Scene Color Shader Graph node to draw some GameObjects with a glitchy effect. For an example of how to set up this effect, refer to the Glitch_Renderer asset. |
Keep frame | The example in RendererFeatures/KeepFrame uses a custom Renderer Feature to preserve frame color between frames. The example uses this to create a swirl effect from a simple particle system.Note: The effect is only visible in Play Mode. |
Occlusion effect | The example in RendererFeatures/OcclusionEffect uses the Render Objects Renderer Feature to draw occluded geometry. The example achieves this effect without any code and sets everything up in the OcclusionEffect_Renderer asset. |
Trail effect | The example in RendererFeatures/TrailEffect uses the Renderer Feature from the Keep frame example on an additional camera to create a trail map. To do this, the additional camera draws depth to a RenderTexture. The Sand_Graph shader samples the map and displaces vertices on the ground. |
The URP Package Samples/Shaders
folder contains examples for shaders. The following table describes each shader example in this folder.
Example | Description |
---|---|
Lit | The example in Shaders/Lit demonstrates how different properties of the Lit shader affect the surface of some geometry. You can use the materials and textures as guidelines on how to set up materials in URP. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.