I want a material/shader that makes an object glow (with visible outline). It needs to be URP compatible, and not require messing with rendering features or post processing stack. Unity 2022 is the target. I will add (and later remove) this material from game object render's in order to highlight a particular object that's being interacted with in-game.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Create a new Material and assign this shader to it
Adjust the properties:
Glow Color: The color of the glow effect
Glow Intensity: How bright the glow appears
Outline Width: Thickness of the outline
Outline Color: Color of the outline
To apply dynamically in code:
csharp
public class ObjectHighlighter : MonoBehaviour
{
public Material glowMaterial;
private Material originalMaterial;
private Renderer objectRenderer;
void Start()
{
objectRenderer = GetComponent<Renderer>();
originalMaterial = objectRenderer.material;
}
public void EnableGlow()
{
objectRenderer.material = glowMaterial;
}
public void DisableGlow()
{
objectRenderer.material = originalMaterial;
}
}
This shader works by rendering the object twice - first with an expanded outline pass, then with a glowing surface pass that uses fresnel lighting to create the glow effect. It's fully URP compatible and doesn't require any special rendering features or post-processing setup.
User
that works ok with a cube, but fails with a meshrenderer that has multiple materials. I need to be able to apply the effect to the entire mesh.
Assistant
You're right - when a mesh has multiple materials, you need to handle all of them. Here are two approaches to solve this:
Approach 1: Store and Replace All Materials
csharp
public class ObjectHighlighter : MonoBehaviour
{
public Material glowMaterial;
private Material[] originalMaterials;
private Renderer objectRenderer;
void Start()
{
objectRenderer = GetComponent<Renderer>();
// Store all original materials
originalMaterials = objectRenderer.materials;
}
public void EnableGlow()
{
// Create array filled with glow material for each slot
Material[] glowMaterials = new Material[originalMaterials.Length];
for (int i = 0; i < glowMaterials.Length; i++)
{
glowMaterials[i] = glowMaterial;
}
objectRenderer.materials = glowMaterials;
}
public void DisableGlow()
{
objectRenderer.materials = originalMaterials;
}
}
Approach 2: Add Additional Renderer (Recommended)
This approach overlays the glow effect without replacing the original materials:
csharp
User
that works. Is there anything we can do so that the glowing lines show thru objects, like if the effect is applied to an object that is behind a wall? Again, without render features etc.
Assistant
Yes! You can modify the shader to render through objects by adjusting the ZTest property. Here's the updated shader that will show the glow effect even when the object is behind walls:
Updated Shader Code:
hlsl
User
ok, that shows thru like it should, but instead of an subtle edge effect around the outline, it's now covering almost the entire object in white lines
Assistant
The issue is that the shader is now rendering 4 passes and they're overlapping, creating too much coverage. Let me give you a simpler, cleaner version that just adds the through-walls capability to the original shader:
Simplified Through-Walls Shader:
hlsl
User
you've managed to make it slightly transparent, but it's not better. it's almost like you've inverted teh desired effect, with the surfaces shaded and the intersections not. I don't really need or want interior edges highlighted, just the outer ones.
Assistant
You're absolutely right - the issue is that the outline pass is expanding the mesh outward from ALL faces (including interior ones), and the surface pass is filling in areas it shouldn't. Let me give you a much cleaner approach that only highlights the true outer silhouette:
Clean Silhouette-Only Shader:
hlsl
User
that's pretty close to what I want, but is it possible to make it so that the added lines are occluded by the object itself, just not the rest of the world? I'm able to see the front and back of the object which looks pretty weird.
Assistant
Yes! You can fix that by using the original object's depth to occlude the back-facing outline. Here's the solution using a two-pass approach:
Updated Shader:
hlsl
User
that's pretty close to what I want, but is it possible to make it so that the added lines are occluded by the object itself, just not the rest of the world? I'm able to see the front and back of the object which looks pretty weird.
Assistant
Yes! You can fix that by using the original object's depth to occlude the back-facing outline. Here's the solution using a two-pass approach:
Updated Shader:
hlsl
User
that compiles but now there's no effect, ie no outline or anything
Assistant
You're right - the issue is that the depth-only pass is interfering with the outline rendering. Let me give you a simpler approach that works with the existing object renderer:
Corrected Shader:
hlsl
User
so far this was the best effect of all that's been done, but it still renders lines too think, and doesn't self occlude: Shader "Custom/SilhouetteGlow"
{
Properties
{
_OutlineWidth ("Outline Width", Range(0, 0.1)) = 0.03
_OutlineColor ("Outline Color", Color) = (1,1,1,1)
_OccludedAlpha ("Occluded Alpha", Range(0, 1)) = 0.3
}
code
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" }
// Outline pass - only the silhouette
Pass
{
Name "SilhouetteOutline"
Tags { "LightMode"="SRPDefaultUnlit" }
Cull Front
ZWrite Off
ZTest Always
Blend SrcAlpha OneMinusSrcAlpha
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Attributes
{
float4 positionOS : POSITION;
float3 normalOS : NORMAL;
};
struct Varyings
{
float4 positionHCS : SV_POSITION;
float3 normalWS : TEXCOORD0;
float3 viewDirWS : TEXCOORD1;
};
CBUFFER_START(UnityPerMaterial)
float4 _OutlineColor;
float _OutlineWidth;
float _OccludedAlpha;
CBUFFER_END
Varyings vert(Attributes input)
{
Varyings output;
VertexNormalInputs normalInputs = GetVertexNormalInputs(input.normalOS);
VertexPositionInputs positionInputs = GetVertexPositionInputs(input.positionOS.xyz);
// Only expand along normals that face away from camera (silhouette edges)
float3 viewDirWS = GetWorldSpaceViewDir(positionInputs.positionWS);
float3 normalWS = normalInputs.normalWS;
// Expand the vertex position
float3 expandedPositionWS = positionInputs.positionWS + normalWS * _OutlineWidth;
output.positionHCS = TransformWorldToHClip(expandedPositionWS);
output.normalWS = normalWS;
output.viewDirWS = viewDirWS;
return output;
}
half4 frag(Varyings input) : SV_Target
{
// Fade outline based on viewing angle to reduce interior edge visibility
float3 normalWS = normalize(input.normalWS);
float3 viewDirWS = normalize(input.viewDirWS);
float viewDot = abs(dot(normalWS, viewDirWS));
// Only show outline on edges that are more perpendicular to view
float edgeFactor = 1.0 - smoothstep(0.2, 0.8, viewDot);
half4 color = _OutlineColor;
color.a *= _OccludedAlpha * edgeFactor;
return color;
}
ENDHLSL
}
}
Assistant
You're right, that version had the best effect. Let me modify it to add self-occlusion while keeping the clean outline. The key is to add a depth-writing pass that runs first, then have the outline respect that depth:
public class ObjectHighlighter : MonoBehaviour
{
public Material glowMaterial;
private GameObject glowObject;
private Renderer originalRenderer;
void Start()
{
originalRenderer = GetComponent<Renderer>();
}
public void EnableGlow()
{
if (glowObject != null) return; // Already glowing
// Create duplicate object for glow effect
glowObject = new GameObject("GlowEffect");
glowObject.transform.SetParent(transform);
glowObject.transform.localPosition = Vector3.zero;
glowObject.transform.localRotation = Quaternion.identity;
glowObject.transform.localScale = Vector3.one;
// Copy mesh
MeshFilter originalMeshFilter = GetComponent<MeshFilter>();
if (originalMeshFilter != null)
{
MeshFilter glowMeshFilter = glowObject.AddComponent<MeshFilter>();
glowMeshFilter.mesh = originalMeshFilter.mesh;
}
// Add renderer with glow material for all submeshes
MeshRenderer glowRenderer = glowObject.AddComponent<MeshRenderer>();
Material[] glowMaterials = new Material[originalRenderer.materials.Length];
for (int i = 0; i < glowMaterials.Length; i++)
{
glowMaterials[i] = glowMaterial;
}
glowRenderer.materials = glowMaterials;
// Ensure glow renders on top
glowRenderer.sortingOrder = originalRenderer.sortingOrder + 1;
}
public void DisableGlow()
{
if (glowObject != null)
{
DestroyImmediate(glowObject);
glowObject = null;
}
}
void OnDestroy()
{
DisableGlow();
}
}
For SkinnedMeshRenderer objects:
csharp
public class SkinnedObjectHighlighter : MonoBehaviour
{
public Material glowMaterial;
private GameObject glowObject;
private SkinnedMeshRenderer originalRenderer;
void Start()
{
originalRenderer = GetComponent<SkinnedMeshRenderer>();
}
public void EnableGlow()
{
if (glowObject != null) return;
glowObject = new GameObject("GlowEffect");
glowObject.transform.SetParent(transform);
glowObject.transform.localPosition = Vector3.zero;
glowObject.transform.localRotation = Quaternion.identity;
glowObject.transform.localScale = Vector3.one;
// Copy skinned mesh renderer
SkinnedMeshRenderer glowRenderer = glowObject.AddComponent<SkinnedMeshRenderer>();
glowRenderer.sharedMesh = originalRenderer.sharedMesh;
glowRenderer.bones = originalRenderer.bones;
glowRenderer.rootBone = originalRenderer.rootBone;
// Apply glow material to all submeshes
Material[] glowMaterials = new Material[originalRenderer.materials.Length];
for (int i = 0; i < glowMaterials.Length; i++)
{
glowMaterials[i] = glowMaterial;
}
glowRenderer.materials = glowMaterials;
glowRenderer.sortingOrder = originalRenderer.sortingOrder + 1;
}
public void DisableGlow()
{
if (glowObject != null)
{
DestroyImmediate(glowObject);
glowObject = null;
}
}
}
Universal version that handles both:
csharp
public class UniversalObjectHighlighter : MonoBehaviour
{
public Material glowMaterial;
private GameObject glowObject;
private Renderer originalRenderer;
public void EnableGlow()
{
if (glowObject != null) return;
originalRenderer = GetComponent<Renderer>();
if (originalRenderer == null) return;
glowObject = new GameObject("GlowEffect");
glowObject.transform.SetParent(transform);
glowObject.transform.localPosition = Vector3.zero;
glowObject.transform.localRotation = Quaternion.identity;
glowObject.transform.localScale = Vector3.one;
if (originalRenderer is MeshRenderer)
{
SetupMeshGlow();
}
else if (originalRenderer is SkinnedMeshRenderer)
{
SetupSkinnedMeshGlow();
}
}
private void SetupMeshGlow()
{
MeshFilter originalMeshFilter = GetComponent<MeshFilter>();
MeshFilter glowMeshFilter = glowObject.AddComponent<MeshFilter>();
glowMeshFilter.mesh = originalMeshFilter.mesh;
MeshRenderer glowRenderer = glowObject.AddComponent<MeshRenderer>();
ApplyGlowMaterials(glowRenderer);
}
private void SetupSkinnedMeshGlow()
{
SkinnedMeshRenderer originalSkinned = originalRenderer as SkinnedMeshRenderer;
SkinnedMeshRenderer glowRenderer = glowObject.AddComponent<SkinnedMeshRenderer>();
glowRenderer.sharedMesh = originalSkinned.sharedMesh;
glowRenderer.bones = originalSkinned.bones;
glowRenderer.rootBone = originalSkinned.rootBone;
ApplyGlowMaterials(glowRenderer);
}
private void ApplyGlowMaterials(Renderer renderer)
{
Material[] glowMaterials = new Material[originalRenderer.materials.Length];
for (int i = 0; i < glowMaterials.Length; i++)
{
glowMaterials[i] = glowMaterial;
}
renderer.materials = glowMaterials;
renderer.sortingOrder = originalRenderer.sortingOrder + 1;
}
public void DisableGlow()
{
if (glowObject != null)
{
DestroyImmediate(glowObject);
glowObject = null;
}
}
}
I recommend Approach 2 (additional renderer) because it preserves the original materials and gives you more control over the effect. The glow overlay will cover the entire mesh regardless of how many materials it has.
ZTest Always: The first and third passes use ZTest Always to render even when behind other objects
Dual passes: Each effect (outline and glow) has two passes - one that renders through walls and one with normal depth testing
Occluded Alpha: New property to control transparency when the object is behind walls
Depth comparison: Uses the camera's depth buffer to determine if the object is occluded and adjusts alpha accordingly
New material property:
Occluded Alpha: Controls how transparent the glow becomes when the object is behind walls (0 = invisible, 1 = full opacity)
This creates a nice effect where the glow is fully visible when the object is in front, but becomes more transparent when behind walls, giving that classic "x-ray vision" highlight effect you see in many games.
Both passes use ZTest Always to show through walls
Uses the _OccludedAlpha property to control overall transparency when behind objects
Maintains the original outline thickness and glow behavior
The key difference is that I removed the depth buffer sampling complexity and the duplicate passes. Now you get the same clean outline effect as before, but it shows through walls with reduced opacity controlled by the _OccludedAlpha parameter.
Try setting _OccludedAlpha to around 0.3-0.5 for a nice subtle through-wall effect.
Shader "Custom/SilhouetteGlow"
{
Properties
{
_OutlineWidth ("Outline Width", Range(0, 0.1)) = 0.03
_OutlineColor ("Outline Color", Color) = (1,1,1,1)
_OccludedAlpha ("Occluded Alpha", Range(0, 1)) = 0.3
}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" }
// Outline pass - only the silhouette
Pass
{
Name "SilhouetteOutline"
Tags { "LightMode"="SRPDefaultUnlit" }
Cull Front
ZWrite Off
ZTest Always
Blend SrcAlpha OneMinusSrcAlpha
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Attributes
{
float4 positionOS : POSITION;
float3 normalOS : NORMAL;
};
struct Varyings
{
float4 positionHCS : SV_POSITION;
float3 normalWS : TEXCOORD0;
float3 viewDirWS : TEXCOORD1;
};
CBUFFER_START(UnityPerMaterial)
float4 _OutlineColor;
float _OutlineWidth;
float _OccludedAlpha;
CBUFFER_END
Varyings vert(Attributes input)
{
Varyings output;
VertexNormalInputs normalInputs = GetVertexNormalInputs(input.normalOS);
VertexPositionInputs positionInputs = GetVertexPositionInputs(input.positionOS.xyz);
// Only expand along normals that face away from camera (silhouette edges)
float3 viewDirWS = GetWorldSpaceViewDir(positionInputs.positionWS);
float3 normalWS = normalInputs.normalWS;
// Expand the vertex position
float3 expandedPositionWS = positionInputs.positionWS + normalWS * _OutlineWidth;
output.positionHCS = TransformWorldToHClip(expandedPositionWS);
output.normalWS = normalWS;
output.viewDirWS = viewDirWS;
return output;
}
half4 frag(Varyings input) : SV_Target
{
// Fade outline based on viewing angle to reduce interior edge visibility
float3 normalWS = normalize(input.normalWS);
float3 viewDirWS = normalize(input.viewDirWS);
float viewDot = abs(dot(normalWS, viewDirWS));
// Only show outline on edges that are more perpendicular to view
float edgeFactor = 1.0 - smoothstep(0.2, 0.8, viewDot);
half4 color = _OutlineColor;
color.a *= _OccludedAlpha * edgeFactor;
return color;
}
ENDHLSL
}
}
}
This approach:
Only has one pass - just the outline
No surface filling - eliminates the interior shading problem
Edge detection - uses the dot product between normal and view direction to only show outline on true silhouette edges
Clean silhouette - gives you just the outer glow outline you want
The edgeFactor calculation ensures that only edges that are roughly perpendicular to the camera view get the outline effect, which naturally filters out most interior edges and gives you a clean outer silhouette.
Try this version - it should give you exactly what you're looking for: a clean glowing outline around the outer edges of the object that shows through walls.
Shader "Custom/SilhouetteGlowOccluded"
{
Properties
{
_OutlineWidth ("Outline Width", Range(0, 0.1)) = 0.03
_OutlineColor ("Outline Color", Color) = (1,1,1,1)
_OccludedAlpha ("Occluded Alpha", Range(0, 1)) = 0.3
}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline"="UniversalPipeline" }
// First pass - Write object depth (invisible)
Pass
{
Name "DepthWrite"
Tags { "LightMode"="SRPDefaultUnlit" }
Cull Back
ZWrite On
ZTest LEqual
ColorMask 0 // Don't write to color buffer
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Attributes
{
float4 positionOS : POSITION;
};
struct Varyings
{
float4 positionHCS : SV_POSITION;
};
Varyings vert(Attributes input)
{
Varyings output;
output.positionHCS = TransformObjectToHClip(input.positionOS.xyz);
return output;
}
half4 frag(Varyings input) : SV_Target
{
return half4(0,0,0,0);
}
ENDHLSL
}
// Second pass - Outline that respects object depth
Pass
{
Name "SilhouetteOutline"
Tags { "LightMode"="SRPDefaultUnlit" }
Cull Front
ZWrite Off
ZTest Always
Blend SrcAlpha OneMinusSrcAlpha
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Attributes
{
float4 positionOS : POSITION;
float3 normalOS : NORMAL;
};
struct Varyings
{
float4 positionHCS : SV_POSITION;
float3 normalWS : TEXCOORD0;
float3 viewDirWS : TEXCOORD1;
float4 screenPos : TEXCOORD2;
float4 originalPos : TEXCOORD3;
};
CBUFFER_START(UnityPerMaterial)
float4 _OutlineColor;
float _OutlineWidth;
float _OccludedAlpha;
CBUFFER_END
TEXTURE2D_X_FLOAT(_CameraDepthTexture);
SAMPLER(sampler_CameraDepthTexture);
Varyings vert(Attributes input)
{
Varyings output;
VertexNormalInputs normalInputs = GetVertexNormalInputs(input.normalOS);
VertexPositionInputs positionInputs = GetVertexPositionInputs(input.positionOS.xyz);
// Store original position for depth comparison
output.originalPos = TransformObjectToHClip(input.positionOS.xyz);
// Expand the vertex position for outline
float3 expandedPositionWS = positionInputs.positionWS + normalInputs.normalWS * _OutlineWidth;
output.positionHCS = TransformWorldToHClip(expandedPositionWS);
output.normalWS = normalInputs.normalWS;
output.viewDirWS = GetWorldSpaceViewDir(positionInputs.positionWS);
output.screenPos = ComputeScreenPos(output.positionHCS);
return output;
}
half4 frag(Varyings input) : SV_Target
{
// Sample depth buffer
float2 screenUV = input.screenPos.xy / input.screenPos.w;
float sceneDepth = SAMPLE_TEXTURE2D_X(_CameraDepthTexture, sampler_CameraDepthTexture, screenUV).r;
float outlineDepth = input.positionHCS.z;
float originalDepth = input.originalPos.z / input.originalPos.w;
// Convert to linear depth for comparison
sceneDepth = LinearEyeDepth(sceneDepth, _ZBufferParams);
outlineDepth = LinearEyeDepth(outlineDepth, _ZBufferParams);
originalDepth = LinearEyeDepth(originalDepth, _ZBufferParams);
// Fade outline based on viewing angle
float3 normalWS = normalize(input.normalWS);
float3 viewDirWS = normalize(input.viewDirWS);
float viewDot = abs(dot(normalWS, viewDirWS));
float edgeFactor = 1.0 - smoothstep(0.2, 0.8, viewDot);
// Check if outline is behind the original object surface
if (outlineDepth > originalDepth + 0.001) // Small bias to avoid z-fighting
{
discard;
}
half4 color = _OutlineColor;
// If behind other world geometry, use occluded alpha
if (outlineDepth > sceneDepth)
{
color.a *= _OccludedAlpha;
}
color.a *= edgeFactor;
return color;
}
ENDHLSL
}
}
}
Updated C# script to handle the depth writing:
csharp
public class UniversalObjectHighlighter : MonoBehaviour
{
public Material glowMaterial;
private GameObject glowObject;
private Renderer originalRenderer;
public void EnableGlow()
{
if (glowObject != null) return;
originalRenderer = GetComponent<Renderer>();
if (originalRenderer == null) return;
glowObject = new GameObject("GlowEffect");
glowObject.transform.SetParent(transform);
glowObject.transform.localPosition = Vector3.zero;
glowObject.transform.localRotation = Quaternion.identity;
glowObject.transform.localScale = Vector3.one;
if (originalRenderer is MeshRenderer)
{
SetupMeshGlow();
}
else if (originalRenderer is SkinnedMeshRenderer)
{
SetupSkinnedMeshGlow();
}
}
private void SetupMeshGlow()
{
MeshFilter originalMeshFilter = GetComponent<MeshFilter>();
MeshFilter glowMeshFilter = glowObject.AddComponent<MeshFilter>();
glowMeshFilter.mesh = originalMeshFilter.mesh;
MeshRenderer glowRenderer = glowObject.AddComponent<MeshRenderer>();
ApplyGlowMaterials(glowRenderer);
}
private void SetupSkinnedMeshGlow()
{
SkinnedMeshRenderer originalSkinned = originalRenderer as SkinnedMeshRenderer;
SkinnedMeshRenderer glowRenderer = glowObject.AddComponent<SkinnedMeshRenderer>();
glowRenderer.sharedMesh = originalSkinned.sharedMesh;
glowRenderer.bones = originalSkinned.bones;
glowRenderer.rootBone = originalSkinned.rootBone;
ApplyGlowMaterials(glowRenderer);
}
private void ApplyGlowMaterials(Renderer renderer)
{
Material[] glowMaterials = new Material[originalRenderer.materials.Length];
for (int i = 0; i < glowMaterials.Length; i++)
{
glowMaterials[i] = glowMaterial;
}
renderer.materials = glowMaterials;
// Ensure glow renders after original object
renderer.sortingOrder = originalRenderer.sortingOrder + 1;
}
public void DisableGlow()
{
if (glowObject != null)
{
DestroyImmediate(glowObject);
glowObject = null;
}
}
}
This solution:
First pass writes depth of the original object geometry (invisible)
Second pass renders outline but discards fragments that are behind the original object
Still shows through world geometry but respects the object's own depth
Clean silhouette without seeing through the object itself
Now you'll get a clean outline that shows through walls but doesn't show the back faces of the object itself.
First pass: Writes the object's depth to the depth buffer but doesn't draw anything visible (ColorMask 0)
Second pass: Uses ZTest Greater so the outline only shows where it's farther from the camera than the object itself
This means:
The outline will show through walls and other objects in the world
But the outline will be hidden behind the object itself
You'll only see the front-facing silhouette, not the back edges bleeding through
The ZTest Greater in the second pass ensures that outline pixels are only drawn when they're farther from the camera than the object's surface that was written in the first pass.
Actually, let me give you an even simpler approach that should work better. The issue is that we're trying to be too clever with depth testing. Let's use a different strategy:
This version uses a different approach - it only expands vertices that are on back-facing surfaces (relative to the camera), which naturally prevents the outline from appearing in front of the object. The silhouette detection in the fragment shader further refines which parts of the outline are visible.
Important: You'll also need to update your C# script to ensure the original object renders first. The glow effect object should have a slightly higher sorting order:
csharp
private void ApplyGlowMaterials(Renderer renderer)
{
Material[] glowMaterials = new Material[originalRenderer.materials.Length];
for (int i = 0; i < glowMaterials.Length; i++)
{
glowMaterials[i] = glowMaterial;
}
renderer.materials = glowMaterials;
// Make sure glow renders after the original object
renderer.sortingOrder = originalRenderer.sortingOrder + 1;
// Ensure original object writes depth first
originalRenderer.sortingOrder = originalRenderer.sortingOrder; // Keep original order
}
The key changes:
First pass: Writes the object's depth to the depth buffer (invisible)
Second pass: Uses ZTest Greater so outline only shows where it's farther than the object
Sorting: The glow object renders after the original, so the depth from the original object is already written
This should give you the clean silhouette effect you liked, but with proper self-occlusion so you don't see the back edges bleeding through the front of the object.