
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.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 linesLine Color: Three contour coloring modesLine Thickness: calculated in screen spaceEmissive Mode On/OffChoose from three contour coloring modes:Gradient between Min and Max line colorsMin Color OnlyMax Color OnlyThe shader also supports:A transparent base color or texture (Base Map)Specular highlights for a polished appearanceAdjustable Zero and Max line positionsSmooth rendering even beyond defined color bounds by clamping to Min/Max colorsWith 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 2022Unity 6000.0 (Unity 6.0)Unity 6000.2 (Unity 6.2)Render Pipeline: Universal Render PipelineContour Axes: Independently toggle X, Y, Z axesCoordinate Space: Switch between Local and World spaceLine Interval: Adjustable spacing between contour linesLine Thickness: Adjustable and screen-space based (remains constant during zoom/scale)Line Color Control:Zero (Min) and Max position settings per axisGradient rendering from Min to Max colorsOptional flat color rendering (Min-only / Max-only)Emissive Mode On/OffBase Appearance:Base color with alpha supportOptional base texture (Base Map)Lighting Support:Specular highlights Key FeaturesRender contour lines along any or all of the X, Y, Z axesUse Local Space or World Space for line positioningFully adjustable line thickness and color gradientsAdjustable line interval for controlling spacing between contour linesScreen-space line thickness — stays visually consistent regardless of camera zoom or object scaleGradient coloring based on Zero (Min) and Max positionsClamp gradient beyond range with Min/Max color continuityChoose between Gradient, Min Color Only, or Max Color OnlyApply transparent base color and Base Map textureSpecular lighting for realistic highlightsPerfect for stylized rendering, scientific data, topographical maps, and visual effectsLightweight and optimized for real-time applications