sparkengine-rendering-rhi-rendergraph-and-shaders

Documents SparkEngine's RHI backends, RenderGraph contracts, and shader compilation workflows.

31|3|Updated Jul 26, 2025
One-click install
npx skills add https://github.com/Krilliac/SparkEngine --skill sparkengine-rendering-rhi-rendergraph-and-shaders-krilliac
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sparkengine-rendering-rhi-rendergraph-and-shaders
Source: https://github.com/Krilliac/SparkEngine/tree/main/.claude/skills/sparkengine-rendering-rhi-rendergraph-and-shaders
Command: npx skills add https://github.com/Krilliac/SparkEngine --skill sparkengine-rendering-rhi-rendergraph-and-shaders-krilliac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It gives engineers a verified, single source of truth for SparkEngine's rendering layer so they avoid misusing RenderGraph handles, misjudging backend readiness, or misconfiguring shader compilation when writing or debugging GPU code. ## Core Features & Use Cases - Backend selection and capability truth: Explains RHI backend ownership (D3D11/D3D12/Vulkan/OpenGL/Metal/NullRHI), the SPARK_RHI_BACKEND override, and which backends are certified versus experimental per the readiness ledger. - RenderGraph contract reference: Details SSA handle versioning, validation errors that throw logic_error, aliasing rules, dead-pass culling, and analysis-only headless mode for tests. - Shader workflow guidance: Covers runtime D3DCompile on Windows, the cross-compile matrix, disk cache, hot reload status, and SparkShaderCompiler CLI usage. - Use Case: When a RenderGraph pass fails with "resource version has multiple producers", consult this Skill to learn that Write() returns a new versioned handle that must be threaded forward to subsequent passes. ## Quick Start Ask the assistant to explain why your RenderGraph pass was culled or how to force the NullRHI backend for a headless test run.

Frequently Asked Questions about sparkengine-rendering-rhi-rendergraph-and-shaders

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does RenderGraph throw "resource version has multiple producers"?▼

This error means two passes wrote the same resource version, usually because a stale pre-write handle was reused. Write() returns a handle with version+1, and that returned handle must be passed to all subsequent readers and writers.

How do I force a specific graphics backend in SparkEngine?▼

Set the SPARK_RHI_BACKEND environment variable to d3d11, d3d12, vulkan, opengl, or null before launching. Setting it to null forces the headless NullRHIDevice, which is the supported approach for CI and GPU-less runs.

Why was my RenderGraph pass culled and never executed?▼

Passes are culled unless they call builder.SideEffect(), write an imported resource, or feed a surviving pass. Check graph.GetStats().culledPasses and DebugVisualize() to confirm which condition your pass missed.

Does SparkEngine support ray tracing on Windows?▼

DXR is wired end-to-end for D3D12 with pre-compiled DXIL shaders, but GPU-level certification is still open under gate G09. HybridRT does not run on Windows because AcquireHybridRTBindings() returns an empty struct, so the pass exits early.

Can RenderGraph run tests without a GPU?▼

Yes, the RenderGraph constructor accepts an optional device pointer. Without a device it compiles and executes pass callbacks in analysis-only mode, returning nullptr for transient resources, which is how TestRenderGraph.cpp runs contract tests headlessly.

Is shader hot reload active in the shipped engine?▼

No, ShaderHotReload::Initialize has no production caller, so file-watch recompilation never occurs in the shipped engine. The shader disk cache is initialized and is what the shader daemon attaches to.