This file provides guidance to WARP (warp.dev) when working with code in this repository.
- There was no existing
AGENTS.md,WARP.md,CLAUDE.md, Cursor rules, or Copilot instructions in this repo at the time this file was generated. - The runtime path is centered on
src/main.rs->src/bevy_app.rs->src/editor_ui.rs+src/ui/*+src/shader_renderer.rs. - The repo contains many similarly named/legacy modules (for example
editor_ui_original.rs,complete_*,temp_*,working_*). Prefer files that are actually wired intobevy_app::run_appandlib.rsexports.
cargo checkcargo buildcargo build --release
cargo run(usesdefault-run = "isf-shaders")cargo run --bin isf-shaderscargo run --bin isf-shaders -- --cli(forces CLI mode)cargo run --bin ui-analyzercargo run --bin ui-analyzer-enhanced
cargo testcargo test --lib- Run a single test by name:
cargo test <test_name> - Run one specific test with output:
cargo test <test_name> -- --nocapture
cargo fmt --allcargo clippy --all-targets --all-features -- -D warnings
src/main.rsdecides GUI vs CLI:- GUI path:
run_gui()->bevy_app::run_app() - CLI path:
run_cli()supports shader conversion, diagnostics, and subsystem test modes.
- GUI path:
Cargo.tomldefines multiple binaries (isf-shaders,ui-analyzer,ui-analyzer-enhanced, etc.), withisf-shadersas default.
src/bevy_app.rsis the main composition root:- Creates the Bevy
App, window/render settings, and core plugins (EguiPlugin, node graph, timeline, audio/MIDI, outputs, analyzer, etc.). - Inserts key shared resources (
EditorUiState, timeline/audio/renderer-related state). - Registers startup/update systems, especially:
- UI orchestration (
editor_ui_system) - async WGPU renderer initialization
- shader scan background system
- resize/time synchronization systems.
- UI orchestration (
- Creates the Bevy
src/ui/state.rsis the central UI state model (EditorUiState) used across the app.src/editor_ui.rsorchestrates top-level egui behavior:- menu/status/side panels
- shader discovery and loading
- conversion hooks (ISF/GLSL/HLSL to WGSL paths)
- preview compile/render path via the shared renderer.
src/ui/central_panel.rsswitches central workspace tabs:- Preview, Node Graph, 3D Editor, Timeline.
src/shader_renderer.rsowns low-level WGPU rendering:- WGPU device/queue setup
- uniform/parameter buffers
- render pipeline caching
- texture readback to CPU pixels for egui preview.
editor_ui::compile_and_render_shader(...)bridges UI state and renderer:- maps parameter values (reflection-based when available)
- calls
ShaderRenderer::render_frame - updates cached egui texture for preview display.
src/bevy_node_graph_integration_enhanced.rsprovides:- graph resource/state, editor UI, interactions
generate_wgsl()for graph-to-shader code generation.
- Toolbar action Generate WGSL writes generated code into
EditorUiState.draft_codeand requests apply, feeding the same preview renderer path used by manually edited WGSL.
- Shader browsing/scanning is primarily in
editor_ui.rs, with recursive collection fromassets,shaders, and ISF locations. - ISF parsing/loading is in
src/isf_loader.rs; higher-level conversion path is insrc/isf_converter.rs. - Multi-language converter modules live in
src/converter/and are used by menu actions and CLI paths.
- Main docs entry points:
docs/SHADER_STUDIO_COOKBOOK.mddocs/APPLICATION_USAGE_GUIDE_COMPLETE.mddocs/WGSL_SHADER_STUDIO_ARCHITECTURE.mddocs/COMPREHENSIVE_DOCUMENTATION_INDEX.md
- Treat README status sections as potentially stale; verify behavior against code paths in
bevy_app.rsandeditor_ui.rsbefore making architectural assumptions.