Skip to content

Unity shader and scripts for rendering solid clipped geometry

License

Notifications You must be signed in to change notification settings

gkjohnson/unity-clip-shader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity-clip-shader

example

Unity shader and scripts for rendering solid geometry clipped by a plane

Use

Draws the geometry with a double sided stencil pass and draws a quad afterward to give the illusion of solid geometry. The geometry must be manifold or water-tight with no duplicate triangles or edges.

Add a ClipRenderer component to the GameObject to be rendered, and attach a Clip Plane/Basic material. The ClipRenderer component should be considered a replacement for the built-in Renderer component.

Clip Material Options

Use World Space

Whether or not the plane provided to the material should be used in the local object space or in world space.

Plane Vector

A vector defining a plane in space. The XYZ vector defines the plane's normal, while the W component defines the distance from the origin.

About

Unity shader and scripts for rendering solid clipped geometry

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published