Stencil Shader Unity by jesusatgar - 1

Shaders & Effects

Read/write stencil shaders for Unity

Unknown VersionUnknown LicenseUpdated 46 days agoCreated on May 19th, 2020
Go to source

stencilShader

Read/write stencil shaders for Unity for nice magic-window like effects.

How to use:

Apply the Write shader to the material of the object you would like to hide behind the window. Apply the Read shader to the material of the window itself.

Modify both materials “Stencil Reference Value” value to the same “i.e: 1”. You can use different reference values for different objects.

See the result: The object behind the window will be only available to be seen when the users’ camera is “looking” in the direction of both objects. This makes some cool magic or trippy effects for your Unity projects. Looks even nicer on VR projects, where users can move freely around the object.

Result

Show all projects by jesusatgar