Version: Unity 6.0 (6000.0)
言語 : 日本語
Canvas shader graph reference for URP
Fullscreen shader graph reference for URP

Decal shader graph reference for URP

Explore the properties and settings you can use to customize the default Decal shader graph in the Universal Render Pipeline (URP).

You can assign a Material that uses a Decal Shader Graph to a GameObject directly. For example, you can use a Quad as the Decal GameObject.

Contexts

The default Fragment Context contains the following Blocks. Which Blocks display might change depending on the graph settings.

Fragment Context

Input Type Description
Base Color Vector3 Sets the base color of the material. The default is Color.grey.
Alpha Float Sets the alpha of the material. The range is 0 to 1. The default is 1.
Normal (Tangent Space) Vector3 Defines the normal of the material in tangent space.
Normal Alpha Float Defines the mask that controls where the decal’s normal displays.
Metallic Float Defines the metallic value of the material, where 0 is non-metallic and 1 is metallic.
Ambient Occlusion Float Defines the ambient occlusion of the material. Expected range 0 - 1.
Smoothness Float Defines the smoothness of the material. Expected range 0 - 1.
MAOS Alpha Float Defines the mask that controls where the decal’s metal, ambient occlusion, and smoothness display.

Graph Settings

Explore the shader graph settings you can use to customize the Fragment context.

For more details about graph settings that are common to all shader graph shaders, refer to Graph Settings tab.

Setting Description
Affect BaseColor Affects the base color with the shader.
Most decals make use of this option.
An exception is a surface damage effect, where you might want to manipulate other properties, such as normals.
Affect Normal Affects normals with the shader. Use the Blend property to blend the normals of the decal with the normals of the surface it’s projected to. If the Blend property is disabled, the decal overrides the normals all over the surface it’s projected to.
Use case: add damage effects to materials, for example, bullet holes or cracks.
Blend Blends the normals of the decal with the normals of the surface it’s projected to.
Affect MAOS Affects normals with the shader.
Use the Blend property to blend the normals of the decal with the normals of the surface it’s projected to.
If the Blend property is disabled, the decal overrides the normals all over the surface it’s projected to.
Use cases:
  • Override smoothness to highlight puddles or wet paint.
  • Override metallic values with lower values to render rust.
  • Override AO to give the decal more depth.
Affect Emission Affects the emission values to make surfaces seem like they are emitting light, or to make surfaces seem like they are being lit by light.
Supports LOD Cross Fade Allow objects with LODs to cross fade from one LOD to the next without causing issues with decals, ensuring that decals applied to objects cross fading between LODs continue to display correctly.
Angle Fade Fades out the effects of the decal at the specified surface normal angle. This prevents decals projected in 2D along a particular axis or direction from stretching. Otherwise, the object’s surface deviates from the decal projection direction.
Custom Editor GUI Renders a custom editor GUI in the Inspector window of the material. Enter the name of the GUI class in the field. For more information, refer to Control material properties in the Inspector window.

Additional resources

Canvas shader graph reference for URP
Fullscreen shader graph reference for URP