silhouette cutout shader

Learn about the silhouette cutout shader

Open the other demo scene

Double click on /Scenes/Demo Shadow Capture Studio Marble Bust.unity

Play and test

Press Play. Click the object to start the puzzle, then rotate it to match the shadow.

circle-info

Reset Puzzle to watch closely again. You'll notice that in this scene, I'm using a VFX to animate the shadow to fit snugly over the silhouette.

Look at the hierarchy

Check out Quad Display Area With Silhouette Cutout. This GameObject has a special material, shader and script on it which lets us have only 1 GameObject to display both the canvas display area and the silhouette.

Go to the game config to adjust this animation. You can move the slider, then play the puzzle again to see the effects of your new change. This value has been tuned specifically for this demo scene.

Why does this display mode exist?

This display mode exists because if you modify the position/rotation of the light/camera/frame your shadow may not fall precisely over the silhouette texture. This display mode allieviates frustrations when adjusting scene values to get the shadow vs silhouette to line up perfectly.

For example, you may end up with something like this: Notice the slight outline of the silhouette. If you're encountering this and it bothers you, I recommend you use this display mode.

Last updated