app.nzapp
AppsProjectsReposPullsChatIntegrationsGatewayModelsEvalsToolsDatasetsMCPDeploysPricingBlogDocsAssistantsCharactersArtMusic
Sign inStart building
Agent stack
Cloud coding agentAgents SDKIntegrationsBrowser agentMonitors & auto-agentsSchedulersAgent skillsMCP serversDeep research
Models & API
AI GatewayModel catalogModel evalsModel spacesPlaygroundText to imageImage to 3DText to 3DMusic & SFXAudio editorMedia optimizerAI art & libraryChatAPI referenceSchemaBecome a provider
Compute & hosting
DeploysAddonsPostgres hostinggobed vector searchSite hostingAnalyticsCog GPU hostingRL trainingBuilds & CIWorkersTask queuesDomainsGit hosting
Tools
AI toolsDrawDiffusion canvasLive DrawWriteSheetsArtifactsVideo studioNotebooksDatasets
Learn
DocsBlogEval guidesPrompt libraryCLIAlternativesPapersAI charactersArt gallerySecurityConsulting
Company
PricingEnterpriseSettingsBillingStatusInvestorsCreate accountTerms of ServicePrivacy Policy
app.nzapp.nz

AI agent cloud for coding, deploys, model routing, and research. Built for teams shipping software.

Built in New Zealand by App AI NZ.

Social
X / TwitterGitHubYouTube
The app.nz network
GpuBrainPapersReading TimemojojojoNetwrckText-Generator.ioCodex InfinityOpenPathsCuteDSLAI Art GeneratorAIArt-Generator.artSiteSimSimplexGenDictatorFlowWebFiddleRing.nzChatGibidyBitBankExperimentFlowEvangelerHires.nzHow.nzV5 GamesAddicting Word GamesBig Multiplayer ChessWord SmashingreWord GameMultiplication Master
© 2026 App AI NZ Ltd. All rights reserved.All systems normalTermsPrivacy
Blog
July 22, 2026·8 min read·app.nz

ComfyUI lab 7: Write inspectable shader looks

Use coordinate and channel math for deterministic color transforms before reaching for another diffusion pass.

Listen to this article

On-device voice

Uses the voice built into your browser; no article text leaves this page.

Audio narration is not supported by this browser.

Diffusion is expensive and nondeterministic. Many finishing operations—channel mixing, vignettes, gradients, masks, scanlines, palette shifts—are ordinary pixel math and should remain ordinary pixel math.

Read the image contract

A ComfyUI IMAGE is normally a batch shaped B × H × W × C, with floating values from zero to one. The shader node exposes red, green, blue, normalized x/y coordinates, and time t. Its expression returns either one grayscale plane or an RGB tuple. Output is clipped into the valid range.

The supplied expression mixes a little blue into red, preserves green, and lifts blue for a cool editorial grade. Every coefficient is inspectable. Set all channels to (r,g,b) for an identity test; change one coefficient at a time; compare histograms and skin tones.

Animate parameters, not code

For motion, keep the expression stable and vary t or another scheduled input. A sine function can drive a pulse, x/y can define spatial wipes, and an audio-derived value can modulate strength. Do not concatenate arbitrary code strings per frame when one parameter expresses the change.

Shader math cannot restore clipped highlights or infer missing objects. Use it where the desired output is a known transformation of existing pixels, and use a generative model only where new content is genuinely required.

Run the lab

  • Open this graph in Comfy Studio
  • Download the exact API-format workflow
  • CLI: app comfy download shader-style-lab

Record the graph JSON, input assets, seed where relevant, model or service version, custom-node commit, and final artifact together. That bundle—not a screenshot—is the reproducible creative unit.

Open-source map

  • Open shader node — MIT numpy expression node used by the graph
  • RyanOnTheInside — Advanced reactive effects and particle systems

Creative Systems Labs: 7 of 12. Previous: Build style as a system Next: Prototype frame transforms safely

Build what you just read

Ship agents, models, and apps on one cloud.

Start with free credits, then use the same platform from the web app, CLI, desktop app, or MCP.

Start building freeRead the docs

Keep reading

ComfyUI lab 6: Build style as a system

Separate content, composition, light, palette, and finish; compare prompt, LoRA, IPAdapter, and deterministic transforms.

ComfyUI lab 8: Prototype frame transforms safely

Understand image tensor shape, range, batch semantics, and the boundary between a prototype code block and a maintained node.

ComfyUI lab 11: Design a text-to-3D handoff

Prompt for geometry rather than beauty, generate a GLB, and inspect silhouette, topology, scale, and material assumptions.