SHADER VIEWPORT · 3D SHADER DARK VIEWPORT WGSL v4 · CHAKRA PETCH · INSTRUMENT SANS · FIRA CODE Shader Viewport Anodized gunmetal & spectral refraction · 10px stages, 18px glass 10PX STAGE · 1PX SHEEN Pass Frame 1H 24H 7D PASS BUDGET · WGSL 8.3 ms 120 FPS Launch pass Inspect shader WGSL 4 LOCKED 8.3 MS

Shader Viewport

Pro

Shader Viewport is a UI guide written for AI. Hand it to Claude Code, Cursor, or another AI coding tool, and the pages it builds look like this.

Best for: 3D editors, shader decks, GPU dashboards

  1. Copy the promptClick "Copy prompt". It copies an English prompt — no need to read it.
  2. Paste into your AI coding toolWorks in Claude Code, Cursor, or Codex. It downloads this guide on its own.
  3. Say what you want to buildFor example, "build a 3D shader pipeline desk". Every page follows these rules.

Requires an AI coding tool that can run commands. The download link in the prompt works for 24 hours; come back here to copy a fresh one.

Examples

SHADER RESEARCH · 视口体验复盘2026.11 · ISSUE 04
01 · 新团队首周

首次迁移 3D 视口的七天,卡在材质节点导入

跟访 28 位图形与创意工程负责人,从新建场景到首帧 120fps 跑通,情绪低谷出现在第三步手动映射 PBR 贴图通道。

KLKai LinUX Telemetry · 2026-11-22 · 8 MIN READ
FIG 01 · 首周情绪曲线(−3 至 +3)最低点 · PBR 通道映射
+1.601 载入网格+0.802 建暗视口−2.203 贴图映射+2.604 实时 120fps−0.605 导出嵌入
31%
在贴图映射步中断
14 min
手动绑定中位耗时
45 sec
自动通道识别耗时
+2.3
预期满意度提升
02

改进优先级清单

按降流失排序
序号改进项具体改法预计收益状态
01glTF 材质通道自动识别拖拽 glTF 时按金属度与粗糙度后缀自动挂接 WGSL 槽位流失 −21pt开发中
02HUD 代码快照卡8px 磨砂代码浮层提供一键复制 React / WebGPU 嵌入代码嵌入 ×2.6已上线
03一键导出帧基准46px 底座直接放性能导出胶囊,减少 3 次抽屉切换满意 +1.5排期中
样例数据 · Shader Viewport 视口体验研究版式shaderviewport.dev/research/04
SHADER VIEWPORT· 战略会 · 保密 2027.01.18 · ZURICH / SF01 / 05
2027
WGSL ENGINE v4

从单帧离线烘培,
到浏览器实时 3D 暗视口

三件硬指标:压平 8.3ms 首帧着色编译、上线多视角节点图、开放云烘培 Runtime。

PASS FRAME // RAYMARCH STAGE120 FPS LOCK
2027 WGSL 4 2024 · 光栅 WebGL2 单通道 2026 · 暗视口 WebGPU 实时节点图 8.3 ms 中位帧渲染
2026 活跃视口
3.94M同比 +74%
在线渲染池
6,180净增 2,240
净收入留存
129%连续 4 季 >120%
2027 目标
$140MARR 翻一倍多
0.0 / 6.0s
SHADER VIEWPORT · BENCHMARK 09WGSL v4 · 2026.11
120FPS

换上 3D 暗视口,
帧渲染压进 8.3ms。

视口 3.94M编译 8.3ms稳定 99.98%
PASS THROUGHPUT · 月度实时渲染帧率对比(FPS)WEBGPU LOCK
548月上
668月下
729月上
869月下
10410月上
12010月下
99.9%GPU SYNC
00081624324048 ms
Shader Viewport 渲染实验室 · 8–10 月压测样本shaderviewport.dev
Base prompt + Web app suffix
React + Tailwind v4, replace components per STYLE.md

Components

85 components · 145 states
409variants
4templates
2themes

Brand guide

12 rules · from STYLE.md

Four-step anodized gunmetal with spectral refraction.

Dark-first anodized gunmetal (#111216 → #1a1c22 → #21242c → #292d38) replaces card borders and drop shadows with 1px horizontal top cyan→violet→magenta refraction, framing 18px frosted glass overlays (.hc-glass), 46px capsule docks (.hc-dock) and 36px spectral violet pills (#9d8cff); light mode shifts to cool titanium frost (#f3f4f8 / #4f46e5).

Rules
Four-step gunmetal & zero-left-bar rule3 rules
  1. 01
    Red line: zero left vertical accent bars anywhere.

    Never attach coloured left vertical bars to navs, cards, alerts, blockquotes, timelines or rows; express active state with .hc-capsule-active, --hc-well-active lift or full-perimeter --hc-rim-active.

  2. 02
    Zero drop shadows on resting cards — step planes + top 1px sheen.

    Step across canvas #111216, .hc-stage (10px radius + top 1px spectral sheen), .hc-well and active wells; reserve shadows strictly for .hc-glass overlays and .hc-primary.

  3. 03
    Three frosted viewport materials: 18px glass, 8px HUD, 46px dock.

    Dialogs and menus use .hc-glass (18px / 20px blur), code and tooltips use .hc-hud (8px / 14px blur), and floating navbars or action bars use .hc-dock (46px / 16px blur).

Actions, controls & 8-tier radii3 rules
  1. 04
    One .hc-primary spectral violet pill CTA per screen.

    Reserve 42px .hc-primary (36px radius) for the single primary action; secondary actions use gunmetal capsules, .hc-micro HUD keys or 39px circular .hc-orb triggers.

  2. 05
    Honour the 8-tier measured radius ladder.

    Micro keys 3px, HUD 8px, stages & fields 10px, icon wells 15px, glass 18px, chips 26px, pills 36px, docks 46px.

  3. 06
    Inputs use 42px / 10px .hc-field recessed slots.

    Fields and selects use .hc-field (42px height, 10px corners), stepping up on focus with --hc-rim-active and --hc-focus-ring.

Tokens & viewport graphics3 rules
  1. 07
    Zero hard-coded colours — consume semantic & --hc-* tokens.

    Never write hex literals — resolve through --background, --card, --hc-well, --hc-rim, --primary and --chart-1…5 for dark/light parity.

  2. 08
    Charts sit in viewport wells with Fira Code axes & .hc-hud tooltips.

    Mount charts in .hc-stage + .hc-viewport-grid (20px dot grid), 4px-capped bars, cyan/violet/magenta channels and 8px .hc-hud tooltips.

  3. 09
    Use signature.css utilities & honour prefers-reduced-motion.

    Compose with .hc-stage, .hc-prism, .hc-spec-rule and .hc-press; pulse and shimmer respect prefers-reduced-motion.

Typography & wireframe icons3 rules
  1. 10
    Upright bold Chakra Petch drives headings & KPI figures.

    Apply Chakra Petch 700 (-0.02em, tabular figures) strictly to .hc-display headings and .hc-figure KPIs — never prose or buttons.

  2. 11
    Instrument Sans 15px/1.48 for UI prose — never font-semibold.

    Follow the measured weight split: font-medium (500) for controls, labels and interactive rows; font-normal (400) for body prose; never 600.

  3. 12
    10.5px Fira Code micro-HUD & 1.5px Lucide wireframes.

    .hc-meta and .hc-micro run at 10.5px uppercase mono for headers and keycaps; all Lucide icons stay at strokeWidth=1.5.

Which component40 situations · from choose.md
SituationUse

The single primary action on the screen

default (.hc-primary): 42px spectral violet capsule (36px radius) + glow, one per screen

Secondary and supporting actions

secondary (gunmetal pill), outline, ghost, link, or xs (24px/3px .hc-micro key)

Circular icon-only viewport trigger

size="icon" renders a 39px circular .hc-orb trigger (icon-sm=31px, icon-xs=24px)

Destructive confirmations

Alert variant=destructive + Button destructive inside 18px .hc-glass Dialog

Don't do
  • Coloured left vertical accent bars on navs, cards, alerts, timelines, thoughts or blockquotes
  • Generic grey outer borders or drop shadows on resting cards (shadows belong to .hc-glass & .hc-primary)
  • Flattening the 8-tier measured radii (3/8/10/15/18/26/36/46px) back into generic rounded-md/lg
  • Using font-semibold (600) anywhere or spreading Chakra Petch 700 onto body paragraphs
  • Placing multiple solid .hc-primary CTAs on one screen or hard-coding hex values instead of tokens
  • Leaving Lucide icons at default 2px stroke instead of fine 1.5px wireframe weight
Signature looks
36px spectral pill CTA, gunmetal capsule & 39px .hc-orb.hc-primary · .hc-orb · .hc-micro

Measured 42px control height: single spectral violet capsule CTA with soft refraction glow, stepped gunmetal secondary pill, and 39px circular .hc-orb icon trigger.

26px recessed gunmetal segment rail & violet active pill.hc-well · .hc-capsule-active · --hc-r-chip

26px-radius recessed gunmetal rail (#21242c / #eaecf4); active option fills spectral violet with full-perimeter framing and zero left bar.

FRAME BUDGET60 FPS
6.4 ms
Iridescent 3D shader hero prism tile (.hc-prism).hc-prism · .hc-stage · .hc-figure

10px iridescent gradient (#181a26 → #27224a → #2a3659) with 1px top cyan→violet→magenta sheen, tabular Chakra Petch figure and ice-cyan positive delta.

Colors

31 tokens · anodized gunmetal dark-first & cool titanium frost light sets
Greys
Data colours
TokenUsed forLightDark
Four-step gunmetal stage & recessed wells
--backgroundDeep viewport canvas / cool titanium ground
#f3f4f8
#111216
--card10px anodized stage panel (.hc-stage)
#ffffff
#1a1c22
--popover18px frosted overlay base (.hc-glass)
#ffffff
#1a1c22
--hc-well15px recessed well for icons, plots & idle rails
#eaecf4
#21242c
--hc-well-activeStepped active well for hovers, switches & micro keys
#dfe2ee
#292d38
--secondarySecondary gunmetal capsule & quiet surface
#eaecf4
#21242c
--sidebar248px workstation sidebar rail
#ffffff
#16181e
--hc-code-bg8px frosted code & terminal HUD surface
#eaecf4
#1e2028
Ink, spectral primary, tint & borders
--foregroundPrimary headings, prose & tabular ink
#141621
#eef0f6
--muted-foregroundSecondary copy, axis ticks & timestamps
#52576b
#8e93a4
--primarySpectral violet primary CTA & focus rim
#4f46e5
#9d8cff
--primary-foregroundHigh-contrast ink on CTA (7.1:1 dark AAA)
#ffffff
#0c0b17
--hc-brand-hoverPrimary spectral capsule hover state
#4338ca
#b0a2ff
--hc-brand-textSpectral highlight ink, links & active readouts
#4338ca
#b8abff
--accentActive capsule tint fill (.hc-capsule-active)
#ebe9fe
#242042
--accent-foregroundHigh-contrast spectral ink inside tinted capsules
#3730a3
#c7beff
--borderStructural dividers & hairline table separators
#d9dce8
#2b2f3a
--input42px recessed input & select stroke
#b9bed4
#3b4050
Iridescent prism & semantic status
--hc-prism-fromPrism hero tile gradient start (.hc-prism)
#181a28
#181a26
--hc-prism-midPrism hero tile midpoint indigo
#282350
#27224a
--hc-prism-toPrism hero tile deep violet-blue end
#3b2d6b
#2a3659
--hc-on-prismHigh-contrast white ink on prism tile
#ffffff
#ffffff
--hc-successPass complete, locked FPS & positive delta
#0d9488
#34d399
--hc-warningCompile spike & VRAM pressure caution
#d97706
#fbbf24
--destructiveOOM fault & destructive text/stroke
#dc2626
#f87171
--hc-danger-fillSolid destructive confirmation fill
#dc2626
#dc2626
Chart 5-channel palette
--chart-1Channel 1 · Spectral violet primary
#4f46e5
#9d8cff
--chart-2Channel 2 · Refraction ice cyan
#0ea5e9
#38bdf8
--chart-3Channel 3 · Specular magenta
#ec4899
#f472b6
--chart-4Channel 4 · Locked emerald
#10b981
#34d399
--chart-5Channel 5 · Baseline gunmetal
#64748b
#8e93a4
Contrast
PairUseLightDark
foreground on backgroundBody on viewport canvas, 4.5:1 min
Aa16.4Pass
Aa16.4Pass
foreground on cardBody on stage card, 4.5:1 min
Aa18.0Pass
Aa14.9Pass
muted-foreground on cardMuted copy on stage, 4.5:1 min
Aa7.2Pass
Aa5.6Pass
muted-foreground on backgroundCaption on canvas, 4.5:1 min
Aa6.5Pass
Aa6.1Pass
primary-foreground on primarySpectral CTA, 4.5:1 min (dark 7.1:1 AAA)
Aa6.3Pass
Aa7.1Pass
hc-brand-text on cardSpectral ink on stage, 4.5:1 min
Aa7.9Pass
Aa8.4Pass
hc-brand-text on hc-wellActive spectral ink on well, 4.5:1 min
Aa6.7Pass
Aa7.6Pass
accent-foreground on accentActive capsule tint ink, 4.5:1 min
Aa8.3Pass
Aa9.0Pass
hc-on-prism on hc-prism-toPrism tile white ink, 4.5:1 min
Aa11.8Pass
Aa11.9Pass
hc-success on cardSuccess status ink, 3:1 min
Aa3.7Pass
Aa8.9Pass
hc-warning on cardWarning status ink, 3:1 min
Aa3.2Pass
Aa10.2Pass
destructive on cardDestructive status ink, 3:1 min
Aa4.8Pass
Aa6.2Pass

Type & scale

Chakra Petch · Instrument Sans · Fira Code
Hero Display52 / 55 · 700 · Chakra Petch
Shader Viewport
KPI Readout36 / 38 · 700 · Chakra Petch
120 FPS · 8.3 ms
Section Title22 / 26 · 700 · Chakra Petch
Raymarch Material Inspector
UI Prose15 / 22 · 400 · Instrument Sans
Four-step anodized gunmetal surfaces, 1px top spectral refraction, 18px frosted glass overlays and zero left bars.
Secondary Copy13 / 19 · 500 · Instrument Sans
Zurich GPU pool · 6,180 active WebGPU viewports · 8.3 ms median pass time
Micro HUD Meta10.5 / 15 · 500 · Fira Code +8%
WGSL v4 · 120 FPS LOCKED · 8.3 MS PASS
Radii
Micro HUD3px
Code HUD8px
Stage / Field10px
Icon Well15px
Frosted Glass18px
Pill CTA36px
Shadows
Spectral CTA glowReserved for the single primary capsule CTA (.hc-primary); resting cards keep zero shadow (--hc-glow)
0 8px 24px -6px rgb(157 140 255/.44)
Frosted glass shadowReserved for 18px dialogs, menus, sheets & 46px docks with 20px blur (--hc-glass-shadow)
0 22px 54px -10px rgb(0 0 0/.72)
Sizes
Micro HUD
24 · --hc-h-micro
SM control
35 · --hc-h-sm
Circular orb
39 · --hc-orb-sz
Default ctl
42 · --hc-h-ctl
LG control
51 · --hc-h-lg
Floating dock
57 · --hc-h-dock

Patterns

5 patterns · each completes one 3D shader workstation task
Sign in to Viewport
Access your WebGL shader scenes & GPU nodes.

24h scoped GPU session key.

Workstation sign in

Sign into the 3D shader workstation inside a 10px .hc-stage gunmetal card with 42px .hc-field slots

Saved Shaders

No active fragment passes

Start a blank PBR shader stage or drop a compiled Spline scene.

Empty viewport

Centre a .hc-stage + .hc-viewport-grid coordinate bay on a 58px .hc-well icon slot to guide first pass creation

⌘F
Pass IDShader ModuleStatusALU OpsFrame
#SV-104Iridescent Glass RimCompiled1322.1 ms
#SV-108Frosted HUD Blur 20Active941.4 ms
#SV-112Volumetric CausticsWarming2484.6 ms
Filterable shader table

Filter shader passes with a 26px gunmetal Segment, search by pass name, and scan right-aligned mono timings

Viewport Preferences
Configure real-time shader precision and default GPU backend.
Top 1px Spectral Sheen
Refraction highlight on anodized stage cards
Viewport preferences form

Toggle 44×24px spectral Switches and graphics backend Native Select inside a 10px .hc-stage card

Confirm pipeline purge?

Next viewport launch will recompile fragment shaders (~1.4 s).

Destructive confirm

House destructive actions in a top-sheen destructive Alert (zero left bar) and confirm in an 18px .hc-glass Dialog

Assets

3 fonts · 80 icons
Fonts
Shader Viewport 60.0 FPS
Chakra Petch500 / 600 / 700 · Upright geometric display headings & tabular KPI figures · SIL OFL 1.1styles/shader/fonts/ChakraPetch-700-latin.woff2
Aa Bb Cc 0123
Instrument Sans Variable400 to 700 · 15px UI body copy, controls & inspector labels · SIL OFL 1.1styles/shader/fonts/InstrumentSans-Variable-latin.woff2
#SV-104 · 2.1 MS · WEBGL 2
Fira Code Variable300 to 700 · 10.5px uppercase micro-HUD, table headers, shortcuts & GLSL code · SIL OFL 1.1styles/shader/fonts/FiraCode-Variable-latin.woff2
Icons lucide · ISC licence · 1.5px fine technical stroke · every icon used across Shader Viewport components & templates
apple
arrow-down
arrow-down-to-line
arrow-left
arrow-right
arrow-up
bar-chart3
bold
check
chevron-down
chevron-left
chevron-right
chevron-up
chevrons-up-down
circle-alert
clock
code
copy
credit-card
download
ellipsis
eye
file
file-archive
file-audio
file-code
file-spreadsheet
file-text
file-video
folder
folder-open
grid2x2
grip-horizontal
grip-vertical
hand
heading2
heart
house
image
inbox
info
italic
key-round
leaf
lightbulb
link2
list
list-ordered
loader2
mail
menu
message-square
minus
more-horizontal
octagon-x
package
panel-left
paperclip
pencil
plane
plus
quote
redo2
rotate-ccw
search
settings
share
smile
smile-plus
sparkles
square
star
strikethrough
text-align-start
trash2
triangle-alert
undo2
users
x
zap