with one click
wgsl-no-imports
Titan WGSL shaders are self-contained — no
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Titan WGSL shaders are self-contained — no
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
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 | wgsl-no-imports |
| description | Titan WGSL shaders are self-contained — no |
| source | auto-skill |
| extracted_at | 2026-06-15T04:10:33.966Z |
Titan's WGSL shaders do not use any import/include/module system. Each
.wgsl file is fully self-contained. Shared helper functions (edge-stop
weights, pack/unpack, luminance) must be inlined in each shader that needs
them.
Why: Titan uses naga_oil for shader preprocessing but does not enable
its import system. No #import or #include directives are used anywhere
in the existing shader corpus. The compilation path is
include_str!("shaders/foo.wgsl") → raw WGSL string → wgpu
create_shader_module.
How to apply:
reblur_common.wgsl) as
documentation, then copy-paste the needed functions into each shader.reblur_common.wgsl file that's never compiled serves as the canonical
source of truth for formulas; individual shaders carry inlined copies.#import reblur_common; or any similar directive — Titan
has no mechanism to resolve it and the shader will fail to compile.Correct pattern:
// In reblur_preblur.wgsl — INLINE the helpers:
fn luminance(rgb: vec3<f32>) -> f32 {
return dot(rgb, vec3(0.2126, 0.7152, 0.0722));
}
@compute @workgroup_size(8, 8)
fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
let l = luminance(center.rgb);
// ...
}
Wrong pattern:
#import reblur_common; // No such mechanism — will fail