-
-
Notifications
You must be signed in to change notification settings - Fork 53
Lit shader
BACK > Shaders
The Lit Shader lets you render real-world surfaces like stone, wood, glass, plastic, and metals in photo-realistic quality. Your light levels and reflections look lifelike and react properly across various lighting conditions, for example bright sunlight, or a dark cave. This Shader uses the most computationally heavy shading model in Universal RP.
The Surface Options control how Universal RP renders the Material on a screen.
Property | Description |
---|---|
Workflow Mode | Use this drop-down menu to choose a workflow that fits your Textures, either Metallic and Specular. When you have made your choice, the main Texture options in the rest of the Inspector now follow your chosen workflow. For information on metallic or specular workflows, see this Manual page for the Standard built-in Shader in Unity. |
Blending Mode | Use this drop-down to determine how URP calculates the color of each pixel of the decal by blending the Material with the underlying object. Alpha uses the Material’s alpha value to change how transparent the decal is. 0 is fully transparent. 1 appears fully opaque, but the decal is still rendered during the Transparent render pass. Premultiply applies a similar effect to the Material as Alpha, but preserves reflections and highlights, even when your decal is transparent. This means that only the reflected light is visible. For example, imagine transparent glass. Additive adds an extra layer to the underlying object, where the decal makes it only brighter. This is good for holograms. Multiply multiplies the color of the Material with the color of the underlying objects. This creates a darker effect, like when you view an through tinted glass. |
Alpha Clipping | Makes your decal act like a Cutout Shader. Use this to create a transparent effect with hard edges between the opaque and transparent areas. For example, to create blades of grass. To achieve this effect, URP does not render alpha values below the specified Threshold, which appears when you enable Alpha Clipping. You can set the Threshold by moving the slider, which accepts values from 0 to 1. All values above your threshold are fully opaque, and all values below your threshold are invisible. For example, a threshold of 0.1 means that URP doesn't render alpha values below 0.1. The default value is 0.5. |
The Surface Inputs describe the surface itself. For example, you can use these properties to make your surface look wet, dry, rough, or smooth.
Note: If you are used to the Standard Shader in the built-in Unity render pipeline, these options are similar to the Main Maps settings in the Material Editor.
Property | Description |
---|---|
Color | Adds color to the decal surface, also known as the diffuse map. To assign a Texture to the Color setting, click the object picker next to it. This opens the Asset Browser, where you can select from the Textures in your Project. Alternatively, you can use the color picker. The color next to the setting shows the tint on top of your assigned Texture. To assign another tint, you can click this color swatch. The decal uses the Texture’s alpha channel or color for transparency. |
Metallic / Specular | Shows a map input for your chosen Workflow Mode in the Surface Options. For the Metallic workflow, the decal gets its color from the Color assigned above. Use the slider to control how metallic the decal appears. 1 is fully metallic, like silver or copper, and 0 is fully dielectric, like plastic or wood. You can generally use values in between 0 and 1 for dirty or corroded metals. For the Specular setting, you can assign a texture to it by clicking the object picker next to it. This opens the Asset Browser, where you can select from the Textures in your Project. Alternatively, you can use the color picker. For both workflows, you can use the Smoothness slider to control the spread of highlights on the decal. 0 gives a wide, rough highlight. 1 gives a small, sharp highlight like glass. Values in between produce semi-glossy looks. For example, 0.5 produces a plastic-like glossiness. |
Normal | Adds a normal map to the decal. With a normal map, you can add surface details like bumps, scratches and grooves. To add the map, click the object picker next to it. The normal map picks up ambient lighting in the environment. The float value next to the setting is a multiplier for the effect of the Normal. Low values decrease the effect of the normal map. High values create stronger effects. |
Occlusion | Select an occlusion map. This simulates shadows from ambient light and reflection, which makes lighting look more realistic as less light reaches corners and crevices of objects. To select the occlusion map, click the object picker next to it. |
Emission | Makes the surface look like it emits lights. To assign an Emission texture, click the object picture next to it. This opens the Asset Browser, where you can select from the textures in your Project. For Emission color, you can choose the color picker](https://docs.unity3d.com/Manual/EditingValueProperties.html) to assign a tint on top of the color. This can be more than 100% white, which is useful for effects like lava, that shines brighter than white while still being another color. If you have not assigned an Emission texture, the Emission setting only uses the tint you’ve assigned in Emission color. |
The Advanced settings affect the underlying calculations of your rendering. They do not have a visible effect on your surface.
Property | Description |
---|---|
Specular Highlights | Enable this to allow your decal to have specular highlights from direct lighting, for example Directional, Point, and Spot lights. This means that your Material reflects the shine from these light sources. Disable this to leave out these highlight calculations, so your decal renders faster. By default, this feature is enabled. |
Environment Reflections | Sample reflections using the nearest Reflection Probe, or, if you have set one in the Lighting window, the Lighting Probe. If you disable this, you will have fewer Shader calculations, but this also means that your decal has no reflections. |