Contour Line Shader(URP)
A flexible and stylized Contour Line Shader for UPR. Easily render contour lines along the X, Y, and Z axes with gradient coloring, local/world space control, and full visual customization.
by CodeWee
Price History +
- The Contour Line Shader is a powerful shader designed for the Universal Render Pipeline that visualizes mesh geometry with clean and customizable contour lines. Whether you’re developing stylized environments, scientific visualizations, or data-driven graphics, this shader enables you to display evenly spaced lines along the X, Y, and Z axes of your models with full control.
- You can enable contour lines along any combination of axes (X, Y, Z), and customize line thickness(screen-space consistent), line interval and coloring options. Set gradient colors based on Zero (minimum) and Maximum contour line positions, and choose whether to base these positions on Local Space (object-relative) or World Space.
- Line thickness is calculated in screen space, not world space, so the visual width of contour lines remains consistent regardless of zoom level or object scale.
- Line Options:
- Line Interval: Adjustable spacing between contour lines
- Line Color: Three contour coloring modes
- Line Thickness: calculated in screen space
- Emissive Mode On/Off
- Choose from three contour coloring modes:
- Gradient between Min and Max line colors
- Min Color Only
- Max Color Only
- The shader also supports:
- A transparent base color or texture (Base Map)
- Specular highlights for a polished appearance
- Adjustable Zero and Max line positions
- Smooth rendering even beyond defined color bounds by clamping to Min/Max colors
- With full axis and color control, Contour Line Shader gives you artistic freedom and technical precision—all in one asset.
- Supports the following Unity versions:
- Unity 2022
- Unity 6000.0 (Unity 6.0)
- Unity 6000.2 (Unity 6.2)