Version: Unity 6.1 Alpha (6000.1)
Language : English
Examples of writing a custom shader in URP
Write an unlit basic shader in URP

Create a sample scene in URP

To follow the examples in this section:

  1. Install URP into an existing Unity project, or create a new project using the Universal Project Template.

  2. In the sample 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
    , create a 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
    to test the shadersA program that runs on the GPU. More info
    See in Glossary
    on; for example, a capsule.

    Sample GameObject
    Sample GameObject
  3. Create a new Material and assign it to the capsule.

  4. Create a new Shader asset and assign it to the Material of the capsule. When following an example, open the shader asset to edit the Unity shader source file. Replace the code in the source file with the code in the example.

To start writing URP shaders, continue to section URP unlit basic shader.

Examples of writing a custom shader in URP
Write an unlit basic shader in URP