一键导入
inspector-polish
Inspector polish patterns for reflection-driven property editors — right-aligned labels, drag-to-scrub, consistent spacing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Inspector polish patterns for reflection-driven property editors — right-aligned labels, drag-to-scrub, consistent spacing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when working on 3D-specific rendering — deferred chain, G-buffer, clustered shading, Stratum GI, ReGIR, SVGF/A-SVGF, TAA, shadow techniques, depth/HZB, anything 3D-specific. ALWAYS load titan-rendering-core first; this skill assumes core conventions. Loads Titan-specific overrides for realtime-rendering. NOT for 2D rendering or editor panels.
Use when diagnosing a Titan renderer artifact — flicker, ghosting, fireflies, banding, light leaks, seams, boil, NaN/Inf, aliasing, smear/trails, dark voids, shadow artifacts, GI instability, denoiser/TAA issues. The frame-isolation-first debugging method: capture 60Hz, diff frames / A-B vs classical, consult literature, isolate via systematic-debugging, propose (and prove) a fix, record empirically. NOT for landing the production fix (hand to titan-rendering-3d-agent), 2D rendering, or editor panels.
Use when working in titan-rendering-frame-graph, titan-rendering-core, or titan-rendering-post-process-core — frame graph DAG, RenderTarget, DevicePool, PostProcessHook, CameraFrameData, HDR intermediate, tonemap, color management. Foundational layer shared between current 3D and future 2D rendering. Loads Titan-specific overrides for realtime-rendering. NOT for 3D-specific concerns (deferred chain, GI, shadows) — load titan-rendering-3d after this.
When a Titan bench tool using Renderer3d lacks on_resize → renderer.resize(), depth_prepass_view and HZB occlusion resources are never created — DepthPrepass, HzbBuild, and SceneCull passes silently skip, and taps produce no output
When adding a camera UBO shared between Rust and WGSL, verify field-by-field that the CPU layout matches the WGSL struct — especially packed vec4 fields where reordering silently breaks the shader
When building a depth prepass for reverse-Z HZB occlusion culling, use Greater compare (not Always) — the closest fragment must win so the HZB stores the nearest occluding surface, not the farthest
| name | inspector-polish |
| description | Inspector polish patterns for reflection-driven property editors — right-aligned labels, drag-to-scrub, consistent spacing. |
| source | auto-skill |
| extracted_at | 2026-06-14T09:27:25.957Z |
Titan's reflection-driven inspector (reflect_inspector.rs) renders properties for any #[derive(Reflect)] component. Each field type maps to a "row" widget (drag value, checkbox, text edit, vec2/vec3/quat).
Pro tools (Maya, Unity, Unreal) use right-aligned labels for a clean vertical scanning edge. Apply to all inspector row widgets:
fn drag_value_row<T>(ui: &mut egui::Ui, label: &str, value: &mut T, speed: f32) -> InspectorResponse
where T: egui::emath::Numeric {
let mut acc = InspectorResponse::default();
ui.horizontal(|ui| {
// Right-aligned label
let label_width = ui.available_width() * 0.4;
ui.allocate_ui_with_layout(
egui::vec2(label_width, ui.spacing().interact_size.y),
egui::Layout::right_to_left(egui::Align::Center),
|ui| {
ui.label(
egui::RichText::new(label)
.size(style::type_scale::CAPTION)
.color(style::palette::text_secondary()),
);
},
);
ui.add_space(style::space::SM);
let r = ui.add(egui::DragValue::new(value).speed(speed));
acc = InspectorResponse::from_egui(&r);
});
acc
}
Apply the same pattern to vec2_row, vec3_row, vec4_row, quat_euler_row, checkbox_row, text_edit_row:
All field rows use:
style::space::SM (8px) gap between label and controlstyle::type_scale::CAPTION (11px) for labelsstyle::palette::text_secondary() for label colorPer the spec:
egui::CollapsingHeader) ✓DragValue already supports scrubbing (click-drag on the value). No additional work needed.