How Games Keep Players Visible Behind Walls (Unity Shader) @SunnyValleyStudio
How Games Keep Players Visible Behind Walls (Unity Shader)  @SunnyValleyStudio
Uploaded October 2026 | Updated November 2026, 3 hours ago
Keep your player visibleโ€”even behind walls! In this Unity 6.6 URP tutorial, weโ€™ll build a cutout shader using Shader Graph and a short C# script.

Youโ€™ll learn how to create a circular mask, correct its aspect ratio, make it follow your character, and add a depth comparison suited to flat dungeon layouts. Weโ€™ll also keep the effect out of Scene view and test it with a camera rotating around the player.

๐Ÿ“ฆ Free starter project:
patreon.com/sunnyvalleystudio/posts/free-starter-172973829

โœจ Completed project โ€” available to Patreon supporters:
patreon.com/sunnyvalleystudio/posts/cutout-shader-173073021

๐ŸŽจ Assets: KayKit Dungeon Pack by Kay Lousberg
kaylousberg.itch.io/kaykit-dungeon-pack

ยทยทยทยทยท Learn more ยทยทยทยทยท
Learn more from my courses:
courses.sunnyvalleystudio.com
ยทยทยทยทยท Get in touch ยทยทยทยทยท

๐—›๐—ฎ๐˜ƒ๐—ฒ ๐—ฎ๐—ป๐˜† ๐—พ๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป๐˜€? ๐—๐—ผ๐—ถ๐—ป ๐˜๐—ต๐—ฒ ๐——๐—ถ๐˜€๐—ฐ๐—ผ๐—ฟ๐—ฑ!
discord.gg/RQEtYHz

๐—ฃ๐—Ÿ๐—˜๐—”๐—ฆ๐—˜ ๐˜€๐˜‚๐—ฝ๐—ฝ๐—ผ๐—ฟ๐˜ ๐˜๐—ต๐—ฒ ๐—ฐ๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น:
patreon.com/sunnyvalleystudio

Chapters:
0:00 See-through wall effect preview
0:14 Starter project and Cinemachine setup
0:41 Create the Lit Shader Graph
1:14 Base Map and material setup
2:04 Apply the material and exclude doors
2:56 Cutout center and radius
3:23 Screen Position and the center offset
4:14 Keep the circle round at any aspect ratio
5:15 Build the circular mask with Length and Step
5:48 Test the cutout and identify the issues
6:18 Add global shader properties
7:05 Depth comparison and ignoring height
7:47 Build the depth check in Shader Graph
8:56 Branch logic and the Scene view toggle
9:42 Create the PlayerCutout C# script
10:21 Camera rendering callbacks
11:16 Update the cutout center and target depth
12:33 Assign the target and test the finished effect
13:16 Completed project download

#Unity #ShaderGraph #GameDev
How Games Keep Players Visible Behind Walls (Unity Shader)How to edit Grayed Out elements in UI Toolkit in UnityCreating AI for NPC in Unity just got Easier! Behavior Graph in 60 secHow to hide Objects That Block the Camera โ€” Unity Shader TrickUnderstanding Reference and Value types- C# Basics for Unity Beginners: #6Unity 2D Animations in SECONDS? - Aseprite Importer packageBest Import Settings for Music & Sound Effects in Unity #unitytipsFor Loop and Arrays - C# Basics for Unity Beginners: #7Unity VR Tutorial: Prevent Head Clipping by adding Push-Back effectWhy Color Sampling Breaks in Unity 6 (And How to Fix It)Outline effect in Unity in 60 sec using Shader GraphRetro Pixelated Effect in Unity 3D under 60 Seconds!
Sunny Valley Studio |

How Games Keep Players Visible Behind Walls (Unity Shader)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER