---
title: "Stylized Hatching Sample XPU"
canonical: "https://rmanwiki-27.pixar.com/space/REN27/662798337/Stylized%20Hatching%20Sample%20XPU"
format: markdown
---
![hatching-camera-range.png](media://c83f4cfd-b0c9-44c1-89b9-bfcfd488e2be)

***PxrStylizedHatchingSampleXPU*** is a Sample Filter (previously a Display Filter in RIS) that produces stylized hatching across a frame. 

It supports screen-space and triplanar projections; triplanar projection is read from the sample-level PxrStylizedControl (for higher-quality, sample-level filtering), while screen-space projection is computed in this sample filter. 

Use it to drive progressinve 8-layer hatching from packed 4‑packs or individual grayscale textures, blend the hatches by a normalized signal (diffuse / spec / depth / custom AOV), mask and colorize the result, and write the output to any AOV for compositing or lookdev.

Besides Hatching stylization, any progressive texture sets can be used for a variety of looks: **watercolor**, **sketch**, **scribble**, **painterly**.

### Highlights

- New Hatching Sample Filter for XPU (migrated from Display Filter)
- Projections: Screen Space and Triplanar
- Triplanar textures read from PxrStylizedControl at sample level for better filtering
- Support for Packed 2×RGBA (4-pack) or 8 Individual grayscale textures
- Weighted or Mix blending across 8 hatch levels, progressive compositing option
- Masking, colorization (albedo / NPRalbedo / swatch / custom AOV), gamma control
- Custom Output AOV

## Parameters

**Result**  
Choose what the filter outputs (Disable, Final Hatching, Signal, Blend, ScreenUV, Single Hatch Tex).  
Use when: pick Final Hatching for production output or use visualizers to inspect the underlying signal, blend, UVs or single hatch texture.  
Range: mapper — Disable:disable | Final Hatching:finalhatch | Signal:signal | Blend:blend | ScreenUV:screenuv | Single Hatch Tex:singlehatchtex  
Single Hatch Preview

**Single Hatch Tex**  
Preview a single hatching texture (1–8). Shown only when Result = Single Hatch Tex.  
Use when: debug or inspect an individual hatch texture from your pack or set.  
Range: integer slider 1 – 8  
Signals (page)

### **Signals (page)**

**Signal**  
Choose the input signal to drive hatch selection: beauty, diffuse, directSpecular, cameraRange (depth remap), or Custom AOV.  
Use when: select which lighting/depth signal determines hatch density and level.  
Range: mapper — Beauty:beauty | Diffuse:diffuse | Direct Specular:directSpecular | Camera Range:cameraRange | Custom AOV:aov

**Signal String**  
AOV name to use when Signal = Custom AOV.  
Use when: point to a color AOV to drive hatching (e.g., custom light pass).  
Range: string (AOV name)

**Camera Range Source**  
For Signal = Camera Range, choose P AOV (blue channel) or scalar Z AOV.  
Use when: select robust depth read mode for depth-driven hatching (Z is preferred for background handling).  
Range: mapper — P AOV (Blue):P | Z AOV:z

**Camera Range Min**  
Minimum Z for remapping cameraRange.  
Use when: set the near bound of depth remap.  
Range: number 0.0 – 2000.0

**Camera Range Max**  
Maximum Z for remapping cameraRange.  
Use when: set the far bound of depth remap.  
Range: number 0.0 – 2000.0

**White Shader Mode**  
How to compute the scalar signal: Mono (R), Average (RGB mean), Divide by albedo, or Divide by NPRalbedo.  
Use when: choose how to normalize lighting vs. material for hatch placement.  
Range: mapper — Mono:mono | Average:average | Div Albedo:divalbedo | Div NPRalbedo:divnpralbedo

**Invert Signal**  
Invert the remapped signal before hatching.  
Use when: reverse which tonal regions receive darker or lighter hatches.  
Range: boolean

**Signal Remap Min**  
Minimum value for remapping the scalar signal.  
Use when: clamp/lift the low bound of the signal mapping.  
Range: number 0.0 – 1.0

**Signal Remap Max**  
Maximum value for remapping the scalar signal.  
Use when: clamp the high bound of the signal mapping.  
Range: number 0.0 – 1.0

**Signal Gain**  
Multiply signal after remap (pre-gamma).  
Use when: boost or attenuate signal strength before gamma.  
Range: number 0.0 – 5.0

**Signal Gamma**  
Gamma applied to the signal after gain.  
Use when: shape contrast of the driving signal.  
Range: number 0.01 – 5.0

**Enable Signal Ramp**  
Toggle to remap the signal through a float spline ramp (floatRamp).  
Use when: apply a custom remap curve to fine-tune hatch thresholds.  
Range: boolean

**Signal Remap Spline**  
Float ramp control (visible when Enable Signal Ramp ON).  
Use when: edit knots and interpolation to create complex remap shapes.  
Range: floatRamp (knots/values & interpolation: linear | catmull-rom | bspline | constant)

### Textures (page)

**Hatching Texture Mode**  
Choose Packed (2 RGBA textures) or Individual (8 grayscale textures). Screen projection requires selecting texture mode.  
Use when: use packed 4‑channel atlases to reduce assets, or individual textures for explicit control.  
Range: mapper — Packed (2 RGBA):packed | Individual (8 Grayscale):individual

**Texture Set (stock library)**  
Pick a built-in texture set (library options). Note: library selection is currently not working in XPU.  
Use when: choose a predefined set for quick looks (if supported).  
Range: mapper (stock names)

**Hatching Tex 1to4**  
Asset path to the packed first RGBA (.tex) containing hatches 1–4 (visible when Packed).  
Use when: supply a 4‑pack atlas for the first four hatches.  
Range: texture asset path

**Hatching Tex 5to8**  
Asset path to the second packed RGBA (.tex) containing hatches 5–8 (visible when Packed).  
Use when: supply the second 4‑pack atlas.  
Range: texture asset path

**Hatch Tex 1 … Hatch Tex 8**  
Individual grayscale texture asset for each hatch (visible when Individual mode).  
Use when: supply explicit per-hatch textures for maximum control.  
Range: texture asset path (per texture)

**Brush Tex Remap Min**  
Remap minimum (black point) applied when remapping hatch texture values.  
Use when: raise black point to remove faint edge noise or soften textures.  
Range: number 0.0 – 1.0

**Brush Tex Remap Max**  
Remap maximum (white point) applied when remapping hatch texture values.  
Use when: lower white point to reduce mask contrast or compress dynamic range.  
Range: number 0.0 – 1.0

### Projections (page)

**Projection**  
Projection mode for reading hatching textures: Triplanar (read from PxrStylizedControl sample-level AOVs) or Screen (compute UV here).  
Use when: choose Triplanar to use higher-quality sample-level triplanar maps from PxrStylizedControl; choose Screen to compute projection and frequency here.  
Range: mapper — Triplanar:triplanar | Screen:screen

**Triplanar AOV 1-3**  
AOV containing packed triplanar hatches 1–3 (R,G,B). Visible when Projection = Triplanar.  
Use when: point to the sample-level AOV produced by PxrStylizedControl for hatches 1–3.  
Range: string (AOV name)

**Triplanar AOV 4-6**  
AOV containing packed triplanar hatches 4–6 (R,G,B).  
Use when: point to sample-level AOV produced by PxrStylizedControl for hatches 4–6.  
Range: string (AOV name)

**Triplanar AOV 7-8**  
AOV containing packed triplanar hatches 7–8 (R,G).  
Use when: point to sample-level AOV produced by PxrStylizedControl for hatches 7–8.  
Range: string (AOV name)

**Hatching Frequency**  
Frequency multiplier (tiling) for screen projection lookup. Visible when Projection = Screen.  
Use when: control the density/scale of hatch textures across the screen-space projection.  
Range: number 0.0 – 5.0

**Frequency Step**  
Additive per-texture frequency offset (phase difference) for the 8 hatching textures; 0 = no offset. Visible for Screen.  
Use when: stagger frequencies between hatch levels to reduce moiré and create phase variation.  
Range: number -1.0 – 1.0

**Frequency Step Jitter**  
Random jitter added to each hatch texture UVs to reduce moiré; recommended 0.01–0.05. Visible when Frequency Step ≠ 0 and Projection = Screen.  
Use when: break regular patterns that cause interference; small amounts are sufficient.  
Range: number 0.0 – 0.1

**Progressive Texture**  
If enabled (Screen only), each hatch texture is composited as min(previous, current) to create progressive fill.  
Use when: build darker hatching progressively from lightest to darkest for traditional ink/hatch layering.  
Range: boolean

**Darkest Texture Black**  
Treat the last hatch texture as black (and a virtual first white may be used).  
Use when: include virtual black/white levels as endpoints for blending behavior.  
Range: boolean

### Blending (page)

**Blend Mode**  
How to blend across hatch textures: Mix (select between two neighboring textures) or Weighted (bell-curve across multiple).  
Use when: choose simple two-way interpolation (Mix) or smooth multi-level blending (Weighted).  
Range: mapper — Mix:mix | Weighted:weighted

**Blend Overlap**  
Width of the bell-curve blend in Weighted mode.  
Use when: increase to broaden blending across more hatch levels, decrease to tighten transitions.  
Range: number 0.125 – 1.0

**Blend Hold**  
Hold amount at center of each hatch level for Weighted mode (0 = none).  
Use when: preserve plateau regions at specific hatch centers for stepped or banded effects.  
Range: number 0.0 – 1.0

### Masking (page)

**Use Mask AOV**  
Enable masking by a specified Mask AOV.  
Use when: restrict hatching to particular regions using an external mask.  
Range: boolean

**Mask AOV**  
AOV name to use as mask if Use Mask AOV is enabled.  
Use when: supply the mask AOV (e.g., NPRmask) to gate hatching.  
Range: string (AOV name)

**Hatching Mask**  
Global mask multiplier (0 = off, 1 = full). Mask is multiplied by this value.  
Use when: globally attenuate or boost the hatching contribution.  
Range: number 0.0 – 1.0

### Coloring (page)

**Colorize**  
How to colorize hatch: Swatch, albedo AOV, NPRalbedo, NPRalbedo2/3, or Custom AOV.  
Use when: color hatches from surface albedo, an NPR albedo, a chosen swatch, or a custom color pass.  
Range: mapper — Swatch:swatch | albedo AOV:albedo | NPRalbedo:NPRalbedo | NPRalbedo2:NPRalbedo2 | NPRalbedo3:NPRalbedo3 | Custom AOV:customAOV

**Custom AOV**  
AOV to use as the color source when Colorize = Custom AOV.  
Use when: colorize hatching from any rendered color AOV.  
Range: string (AOV name)

**Hatch Color**  
Color swatch used when Colorize = Swatch (black becomes Hatch Color, white becomes BG Color).  
Use when: choose a single color for hatch strokes.  
Range: color swatch

**BG Color**  
Background color used as the white endpoint when colorizing.  
Use when: set the background/white color to blend toward when mixing hatch color.  
Range: color swatch

**Hatch Gamma**  
Gamma applied to the hatching result before colorization.  
Use when: shape tonal response of hatch intensity before mapping to color.  
Range: number 0.01 – 5.0

### Compositing (page)

**Output AOV**  
AOV to write the hatching output into (default Ci). The filter writes composited color into this AOV for downstream use.  
Use when: export hatch result to a dedicated AOV for compositing or grading.  
Range: string (AOV name)

**Ignore Alpha for BG**  
If enabled, the background ignores its alpha when compositing or writing outputs.  
Use when: composite hatches over BG regardless of BG alpha.  
Range: boolean


**Notes**  
Read-only text listing required AOVs and setup hints (diffuse, directSpecular, albedo, NPRalbedo, NPRmask, P or z for camera range, triplanar hatch AOVs when using Triplanar, etc.).  
Use when: quick reference to ensure necessary AOVs and upstream nodes (PxrStylizedControl) are present.  


**Quick usage tips**

- Use Projection = Triplanar with PxrStylizedControl upstream for higher-quality triplanar filtering; use Screen if you want frequency/phase control inside the sample filter.
- Start with Hatching_Texture_Mode = Packed for fewer textures on disk; switch to Individual for bespoke control.
- Use Camera Range signal for depth-driven hatching (set Camera_Range_Min/Max to your scene range).
- For crisp banding use Blend Mode = Mix; for smooth multi-level transitions use Weighted with Blend_Overlap tuned.
- Use Use Mask AOV to confine hatching to characters or specific regions (NPRmask).
- Write output to a dedicated AOV (Out_AOV) so the hatch pass can be graded independently.