Nodes/Jovimetrix/πŸ”† Pixel Shader Image (jov)
ComfyUI Node

πŸ”† Pixel Shader Image (jov)

Run your own math across an existing image

By AmoranoΒ·Created 3 years agoΒ·Updated 12 months agoΒ· 397
πŸ”† Pixel Shader Image (jov)
  • image
  • image
  • mask
β—„R1. - np.minimum(1, np.sqrt((($u-0.5)**2 + ($v-0.5)**2) * 2))β–Ί
β—„Gβ€”β–Ί
β—„Bβ€”β–Ί
β—„width256β–Ί
β—„height256β–Ί

This is the image-feeding sibling of Jovimetrix's Pixel Shader node. Where the plain Pixel Shader generates a picture purely from formulas, Pixel Shader Image takes a real image input and applies per-pixel math to it, with the same $u/$v normalized-coordinate system so your expressions can mix pixel position with the source pixels. If you want a vignette burned into an actual photo, or a gradient-masked version of a render, this is the node that does it in one step.

The workflow is: connect image (required), then write one expression per output channel in R, G, and B - each a multiline string evaluated at every pixel, using $u and $v (0–1 across the frame) alongside the pixel data from the source. The default Red expression, a radial gradient (1. - np.minimum(1, np.sqrt((($u-0.5)**2 + ($v-0.5)**2) * 2))), shows the coordinate math in action; multiply that against the incoming pixels and you get a soft-edged falloff applied to the source rather than a flat blob. width and height control the working canvas, and the node emits image and mask outputs, so the result doubles as a texture or a mask.

The genuinely useful patterns: a vignette (bright center, dark edges) keyed to $u/$v distance, a horizontal fade for blending two shots, a spotlight cone for compositing. Because the mask output comes free, you can generate a soft selection from the same math that shades the image - no second node, no type conversion.

Now the honest part, because this is a legacy node. The lowercase "(jov)" suffix marks it as an older Jovimetrix build, and it's no longer in the current pack source. Jovimetrix v2.0 (April 2025) split its shader machinery into the separate Jovi_GLSL package, and this numpy-style software shader didn't make the cut as a maintained node. If you've loaded a workflow that references it and ComfyUI reports it missing, that's the cause - you'd either pin an older Jovimetrix version (with the pack's explicit "don't update past 1.7.48" caveat) or reimplement the math with a Jovi_GLSL node. Because the exact expression variables beyond $u/$v aren't documented in the surviving README, expect to confirm the syntax against whatever old build you're running.

Installing it means installing the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Amorano/Jovimetrix.git
pip install -r Jovimetrix/requirements.txt

or search "Jovimetrix" in ComfyUI Manager and restart. The dependencies are the shared pack set - numpy, opencv-contrib-python, Pillow, matplotlib, the cozy-comfyui helpers - no model downloads. Worth a play if you already have an old install handy; just don't expect it to be maintained forward.

CategoryJOVIMETRIX πŸ”ΊπŸŸ©πŸ”΅

Inputs (6)

NameTypeDefaultDescription
imageIMAGEβ€”
RoptSTRING1. - np.minimum(1, np.sqrt((($u-0.5)**2 + ($v-0.5)**2) * 2))β€”
GoptSTRINGβ€”
BoptSTRINGβ€”
widthoptINT25632–8192β€”
heightoptINT25632–8192β€”

Outputs (2)

NameTypeDescription
imageIMAGEβ€”
maskMASKβ€”