Fragment Context
This Context represents the fragment stage of a shader. You can add compatible Blocks to this Context to set properties for the final shader. Any Node you connect to a Block becomes part of the final shader's fragment function.
Compatible Blocks
This section lists the Blocks that are compatible with Fragment Contexts in the High Definition Render Pipeline (HDRP). Each entry includes:
- The Block's name.
- A description of what the Block does.
- Settings in the Graph Settings menu that the Block is relevant to. If you enable these settings, Shader Graph adds the Block to the Context; if you disable the setting, Shader Graph removes the Block from the Context. If you add the Block and do not enable the setting, Shader Graph ignores the Block and its connected Nodes when it builds the final shader.
- The default value that Shader Graph uses if you enable the Block's Setting Dependency then remove the Block from the Context.
Property | Description | Setting Dependency | Default Value |
---|---|---|---|
Ambient Occlusion | The material's ambient occlusion. This approximates occlusion for a fragment on a GameObject’s surface that has been cast by details present in the Material but not the mesh geometry. A value of 0 means the fragment is completely occluded and appears black. A value of 1 means the fragment is not occluded at all, and the ambient color does not change. | None | 1.0 |
Alpha | The Material's alpha value. This determines how transparent the material is. The expected range is 0 - 1. | None | 1.0 |
Alpha Clip Threshold | The alpha value limit that HDRP uses to determine whether to render each pixel. If the alpha value of the pixel is equal to or higher than the limit, HDRP renders the pixel. If the value is lower than the limit, HDRP does not render the pixel. The default value is 0.5. | Alpha Clipping enabled | 0.5 |
Alpha Clip Threshold Depth Postpass | The alpha value limit that HDRP uses for the transparent depth postpass. If the alpha value of the pixel is equal to or higher than this limit, HDRP renders the pixel. If the value is lower than the limit, HDRP does not render the pixel. The default value is 0.5. | • Alpha Clipping enabled • Transparent Depth Postpass enabled |
0.5 |
Alpha Clip Threshold Depth Prepass | The alpha value limit that HDRP uses for the transparent depth prepass. If the alpha value of the pixel is equal to or higher than this limit, HDRP renders the pixel. If the value is lower than the limit, HDRP does not render the pixel. The default value is 0.5. | • Alpha Clipping enabled • Transparent Depth Prepass enabled |
0.5 |
Alpha Clip Threshold Shadow | The alpha value limit that HDRP uses to determine whether it should render shadows for a pixel. If the alpha value of the pixel is equal to or higher than this limit, HDRP renders the pixel. If the value is lower than the limit, HDRP does not render the pixel. The default value is 0.5. | Use Shadow Threshold enabled | 0.5 |
Anisotropy | The direction of the anisotropy effect. Negative values make the effect vertical, and positive values make the effect horizontal. | • Anisotropy enabled | 0.0 |
Anisotropy B | The direction of the anisotropy effect for the secondary lobe. Negative values make the effect vertical, and positive values make the effect horizontal. | • Anisotropy enabled • Dual Specular lobe enabled |
1.0 |
Baked Back GI | The global illumination (GI) value to apply to the back face of the Mesh only. This replaces the built-in diffuse GI solution. This port only appears when you enable the Override Baked GI setting. |
Override Baked GI enabled | 0.0 |
Baked GI | The global illumination (GI) value to apply to the front face of the Mesh only. This replaces the built-in diffuse GI solution. | • Override Baked GI enabled | 0.0 |
Bent Normal | The bent normal of the fragment. HDRP uses bent normal maps to simulate more accurate ambient occlusion. Bent normals only work with diffuse lighting. | Material set to Eye, Fabric, Hair, Lit, or StackLit | CoordinateSpace.Tangent |
Base Color | The base color of the material. | None | Color.grey |
Coat Extinction | The HDR color that determines which color the coat absorbs the most. This property works with Coat Thickness to calculate an absorption coefficient. | • Material set to StackLit • Coat enabled |
Color.white |
Coat IOR | The index of refraction to use for the coating layer. | • Material set to StackLit • Coat enabled |
1.4 |
Coat Mask | The mask that simulates a clear coat effect on the Material to mimic materials like car paint or plastics. | • Material set to StackLit • Coat enabled |
0.0 |
Coat Normal Object Space | The normal, in object space, for the coat. | • Material set to StackLit • Coat enabled • Coat Normal enabled • Fragment Normal Space set to Object |
CoordinateSpace.Object |
Coat Normal Tangent Space | The normal, in tangent space, for the coat. | • Material set to StackLit • Coat enabled • Coat Normal enabled • Fragment Normal Space set to Tangent |
CoordinateSpace.Tangent |
Coat Normal World Space | The normal, in world space, for the coat. | • Material set to StackLit • Coat enabled • Coat Normal enabled • Fragment Normal Space set to World |
CoordinateSpace.World |
Coat Smoothness | The smoothness of the coat's specular lobe. The coat has no diffuse component, but this property affects the base layer's diffuse color. Decreasing this value also makes the base layer seem less smooth. | • Material set to StackLit • Coat enabled |
1.0 |
Coat Thickness | The intensity of the coat's absorption effect. This property works with Coat Extinction to calculate an absorption coefficient. A value of 0 produces no absorption and a value of 1 produces full absorption. | • Material set to StackLit • Coat enabled |
0.0 |
Depth Offset | The value that the Shader uses to increase the depth of the fragment by. This Block requires you to input the result of the Parallax Occlusion Mapping Node to produce a realistic result. | Depth Offset enabled | 0.0 |
Dielectric IOR | The index of refraction that determines the specular color of the material when the metallic value is 0. If the Material uses Subsurface Scattering or Transmission, this is only available if Use IOR from Diffusion Profile is unchecked. |
• Material set to StackLit • Base Color Parametrization set to Base Metallic |
1.5 |
Diffusion Profile | The Diffusion Profile to use for subsurface scattering and transmission. | • Material Type set to Subsurface Scattering or Translucent | 0.0 |
Distortion | The screen space, per-direction amount that HDRP distorts light that passes through the material. For example, if you set this to (1, 0), the output is offset by 1 pixel to the right. | • Distortion enabled | Vector2(0, 0) |
Distortion Blur | The blur intensity of the distortion effect. | • Distortion enabled | 0.0 |
Emission | The color of light to emit from this material's surface. Emissive materials appear as a source of light in your scene. | None | Color.black |
Hair Strand Direction | The direction that hair flows, from root to tip, when modelling with hair cards. | • Material set to Hair | Vector3(0, -1, 0) |
Haze Extent | The range of the haze or halo effect around the central specular highlight. | • Material set to StackLit • Duel Specular Lobe Parametrization set to Hazy Gloss |
3.0 |
Haziness | The intensity of the haze or halo effect. A value of 0 produces no haziness. A value of 1 produces the full haze effect. | • Material set to StackLit • Duel Specular Lobe Parametrization set to Hazy Gloss |
0.2 |
Hazy Gloss Max Dielectric F0 | The maximum intensity the specular highlight can be when Metallic is 0. As the metallic value increases, the maximum intensity relaxes towards 1. | • Material set to StackLit • Base Color Parametrization set to Base Metallic • Duel Specular Lobe Parametrization set to Hazy Gloss |
0.25 |
Iridescence Coat Fixup TIR | Sets the amount to adjust the internal iridescence model by so that the total internal reflection (TIR) angle is always the grazing angle. This means that the TIR region is always out of view, regardless of the overall coat and iridescence thickness. | • Material Type set to StackLit • Iridescence enabled • Coat enabled. |
0.0 |
Iridescence Coat Fixup TIR Clamp | The value to clamp the color flip phase to. This is at the grazing angle endpoint of the angular range. This makes it so that the oscillations only “elongate” towards the 0 degree viewing angle, which makes a lowered thickness more apparent. | • Material Type set to StackLit • Iridescence enabled • Coat enabled. |
0.0 |
Iridescence Mask | The strength of the iridescence effect. | • Material Type set to StackLit • Iridescence enabled. |
0.0 |
Iridescence Thickness | The thickness of the iridescence. This changes the gradient of color that the iridescence effect produces. Unit is micrometer multiplied by 3. A value of 1 is remapped to 3 micrometers or 3000 nanometers. | • Material Type set to StackLit • Iridescence enabled. |
0.0 |
Iris Normal Object Space | The normal of the eye's iris in object space. | • Material Type set to Eye • Iris Normal enabled • Fragment Normal Space set to Object |
CoordinateSpace.Object |
Iris Normal Tangent Space | The normal of the eye's iris in tangent space. | • Material Type set to Eye • Iris Normal enabled • Fragment Normal Space set to Tangent |
CoordinateSpace.Tangent |
Iris Normal World Space | The normal of the eye's iris in world space. | • Material Type set to Eye • Iris Normal enabled • Fragment Normal Space set to World |
CoordinateSpace.World |
Lobe Mix | The amount of mixing between the primary and secondary specular lobes. | • Duel Specular Lobe enabled • Duel SpecularLobe Parametrization set to Direct. |
0.3 |
MAOS Alpha | The opacity of the Metallic, Ambient Occlusion, and Smoothness values. | • Material Type set to Decal | 1.0 |
Mask | Specifies whether the current fragment represents the iris or the sclera. The Shader Graph only uses the x component of this Vector2. A value of 0 means the fragment represents the sclera, and a value of 1 means the fragment represents the iris. A value between 0 and 1 results in a linear blend between sclera and iris. | Material set to Eye | Vector2(1.0, 0) |
Metallic | The material's metallic value. This defines how "metal-like" the surface of your Material is (between 0 and 1). When a surface is more metallic, it reflects the environment more and its albedo color becomes less visible. At full metallic level, the surface color is entirely driven by reflections from the environment. When a surface is less metallic, its albedo color is clearer and any surface reflections are visible on top of the surface color, rather than obscuring it. | None | 0.0 |
Normal Tangent Space | The normal, in tangent space, for the material. | Fragment Normal Space set to Tangent | CoordinateSpace.Tangent |
Normal Object Space | The normal, in object space, for the material. | Fragment Normal Space set to Object | CoordinateSpace.Object |
Normal World Space | The normal, in world space, for the material. | Fragment Normal Space set to World | CoordinateSpace.World |
Normal Alpha | The blend factor for the Material’s normals. A decal modifies the normals of the Material the decal projects onto. A value of 0 means that the decal does not affect the normals of the surface it projects onto. A value of 1 means that the decal fully overrides the normals of the surface. | • Material set to Decal | 1.0 |
Refraction Color | The color that this refractive material tints light which passes through it. | • Refraction Model not set to None | 0.0 |
Refraction Distance | The thickness of the object at which the Refraction Color affects incident light at full strength. | • Refraction Model not set to None | 0.0 |
Refraction Index | The ratio between the speed of light in a vacuum and the speed of light in the medium of the material. Higher values produce more intense refraction. | • Refraction Model not set to None | 0.0 |
Rim Transmission Intensity | The intensity of back lit hair around the edge of the hair. Set this to 0 to completely remove the transmission effect. | • Material set to Hair | 0.2 |
Secondary Smoothness | The appearance of the secondary specular highlight. Increase this value to make the highlight smaller. | • Material set to Hair | 0.5 |
Secondary Specular Shift | The position of the secondary specular highlight. | • Material set to Hair | -0.1 |
Secondary Specular Tint | The color of the secondary specular highlight. | • Material set to Hair | Color.grey |
Shadow Tint | The shadow color and opacity. | • Material set to Unlit • Shadow Matte enabled |
Color.black |
Smoothness | The material's smoothness. Every light ray that hits a smooth surface bounces off at predictable and consistent angles. For a perfectly smooth surface that reflects light like a mirror, set this to a value of 1. Less smooth surfaces reflect light over a wider range of angles (because the light hits the bumps in the microsurface), so the reflections have less detail and spread across the surface in a more diffused pattern. | None | 0.5 |
Smoothness B | The smoothness of the second specular lobe. | • Material set to StackLit • Dual Specular Lobe enabled • Dual SpecularLobe Parametrization set to Direct. |
0.5 |
Specular Color | The material's specular color value. This defines the brightness and tint colour of specular highlights. If the Material uses Subsurface Scattering or Transmission, this is only available if Use IOR from Diffusion Profile is unchecked. |
None | Color.grey |
SO Fixup Max Added Roughness | The maximum roughness that the bent normal fixup process can add to reduce artifacts. | • Material set to StackLit • Specular Occlusion (from input AO) set to SPTD Integration Of Bent AO |
0.2 |
SO Fixup Strength Factor | The strength of the fixup process HDRP uses to reduce noise from bent normals. | • Material set to StackLit • Specular Occlusion (from input AO) set to SPTD Integration Of Bent AO |
1.0 |
SO Fixup Visibility Ratio Threshold | The occlusion threshold value below which HDRP modifies the bent normal. This helps to remove noise in the bent normals. If the occlusion input is above this value, HDRP does not modify the bent normals. | • Material set to StackLit • Specular Occlusion (from input AO) set to SPTD Integration Of Bent AO |
0.2 |
Specular AA Screen Space Variance | The strength of the geometric specular anti-aliasing effect between 0 and 1. Higher values produce a blurrier result with less aliasing. | Specular AA enabled | 0.0 |
Specular AA Threshold | The maximum value that HDRP subtracts from the smoothness value to reduce artifacts. | Specular AA enabled | 0.0 |
Specular Occlusion | A multiplier for the intensity of specular global illumination. | Specular Occlusion Mode set to Custom | 1.0 |
Specular Shift | The position of the primary specular highlight. | • Material set to Hair | 0.1 |
Specular Tint | The color of the primary specular highlight. | • Material set to Hair | Color.white |
Subsurface Mask | The strength of the screen-space blur effect across the Material. | Material set to Lit • Material Type set to Subsurface Scattering. |
1.0 |
Tangent Object Space | The direction of anisotropy in object space. This stretches the specular highlights in the given direction. | • Material set to Lit • Material Type set to Anisotropy • Fragment Normal Space set to Object Or • Material set to StackLit • Fragment Normal Space set to Object Or • Material set to Fabric and Material Type set to Silk • Fragment Normal Space set to Object |
CoordinateSpace.Object |
Tangent Tangent Space | The direction of anisotropy in tangent space. This stretches the specular highlights in the given direction. | • Material set to Lit • Material Type set to Anisotropy • Fragment Normal Space set to Tangent Or • Material set to StackLit • Fragment Normal Space set to Tangent Or • Material set to Fabric and Material Type set to Silk • Fragment Normal Space set to Tangent |
CoordinateSpace.Tangent |
Tangent World Space | The direction of anisotropy in world space. This stretches the specular highlights in the given direction. | • Material set to Lit • Material Type set to Anisotropy • Fragment Normal Space set to World Or • Material set to StackLit • Fragment Normal Space set to World Or • Material set to Fabric and Material Type set to Silk • Fragment Normal Space set to World |
CoordinateSpace.World |
Thickness | The thickness of the surface that HDRP uses to evaluate transmission. | • Material Type set to Subsurface Scattering and Transmission enabled. Or • Material Type set to Transluscent. Or • Refraction Model not set to None |
1.0 |
Transmittance | The fraction of specular lighting that penetrates the hair from behind. This is on a per-color channel basis, so you can use this property to set the color of penetrating light. Set this to (0, 0, 0) to stop any light from penetrating through the hair. Set this to (1, 1, 1) to have a strong effect with a lot of white light transmitting through the hair. | • Material set to Hair | Vector3(0.3, 0.195, 0.09) |