mcpField
C
cli-anything-renderdoc

cli-anything-renderdoc

github.com/hkuds開発57.6k490 回インストール5 週間前に更新
リポジトリ

cli-anything-renderdoc について

cli-anything-renderdocは、RenderDocのGPUフレームキャプチャをヘッドレスで調査・分析するコマンドラインスキルです。キャプチャのイベント、テクスチャ、シェーダー、パイプライン状態、リソースを扱うグラフィックス開発者やエージェント向けです。

主な機能

  1. 01キャプチャのメタデータとサムネイルの確認
  2. 02描画アクションの検索と集計
  3. 03テクスチャのエクスポートとピクセル確認
  4. 04パイプライン状態の確認とシェーダー出力
  5. 05バッファー、メッシュ、GPUカウンターの調査
  6. 06キャプチャと比較用プレビューの生成

活用シーン

  1. 01GPUキャプチャ内の描画呼び出しの追跡
  2. 02シェーダーソースまたは逆アセンブリの出力
  3. 03描画イベントやキャプチャの比較
  4. 04機械可読なキャプチャレポートの作成

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/hkuds/cli-anything --skill cli-anything-renderdoc

インストール後、Claude Code で/cli-anything-renderdocを入力して読み込まれたか確認します。

詳細

RenderDoc CLI スキル

RenderDoc の GPU フレームキャプチャ(.rdc ファイル)をヘッドレスでコマンドライン解析します。

機能

  • キャプチャの検査: メタデータ、セクション、サムネイル、フォーマット変換
  • アクションツリー: ドローコール、クリア、ディスパッチ、マーカーの一覧表示/検索/フィルタリング
  • テクスチャ操作: 一覧表示、検査、エクスポート(PNG/JPG/DDS/HDR/EXR)、ピクセルピッキング
  • パイプラインステート: 任意のイベントにおけるシェーダー/RT/ビューポートの完全なステート
  • シェーダー解析: シェーダーを人間が読める形式(HLSL/GLSL/逆アセンブリ)でエクスポート、定数バッファの読み戻し
  • リソース検査: バッファ/テクスチャの列挙、生データの読み取り
  • メッシュデータ: 頂点シェーダーの入力/出力のデコード
  • GPU カウンター: ハードウェアパフォーマンスカウンターの列挙と取得

コマンドグループ

capture
cli-anything-renderdoc -c frame.rdc capture info          # Metadata + sections
cli-anything-renderdoc -c frame.rdc capture thumb -o t.png # Extract thumbnail
cli-anything-renderdoc -c frame.rdc capture convert -o out.rdc --format rdc
actions
cli-anything-renderdoc -c frame.rdc actions list           # All actions
cli-anything-renderdoc -c frame.rdc actions list --draws-only  # Draw calls only
cli-anything-renderdoc -c frame.rdc actions summary        # Counts by type
cli-anything-renderdoc -c frame.rdc actions find "Shadow"  # Search by name
cli-anything-renderdoc -c frame.rdc actions get 42         # Single action
textures
cli-anything-renderdoc -c frame.rdc textures list
cli-anything-renderdoc -c frame.rdc textures get <id>
cli-anything-renderdoc -c frame.rdc textures save <id> -o out.png --format png
cli-anything-renderdoc -c frame.rdc textures save-outputs 42 -o ./renders/
cli-anything-renderdoc -c frame.rdc textures pick <id> 100 200
pipeline
cli-anything-renderdoc -c frame.rdc pipeline state 42

# Export shader in human-readable form
# Text shaders (GLSL/HLSL) → saved directly
# Binary shaders (DXBC/SPIR-V) → embedded source (HLSL/GLSL) or disassembly
cli-anything-renderdoc -c frame.rdc pipeline shader-export 42 --stage Fragment
cli-anything-renderdoc -c frame.rdc pipeline shader-export 42 --stage Vertex -o ./shaders/

cli-anything-renderdoc -c frame.rdc pipeline cbuffer 42 --stage Vertex --index 0

# Compare pipeline state between two events
# Default output: same directory as the capture file  ;  use -o to override
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc
cli-anything-renderdoc -c frame.rdc pipeline diff 100 200              # same capture
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc -o result.json
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc --no-compact
resources
cli-anything-renderdoc -c frame.rdc resources list
cli-anything-renderdoc -c frame.rdc resources buffers
cli-anything-renderdoc -c frame.rdc resources read-buffer <id> --format float32
mesh
cli-anything-renderdoc -c frame.rdc mesh inputs 42 --max-vertices 10
cli-anything-renderdoc -c frame.rdc mesh outputs 42
counters
cli-anything-renderdoc -c frame.rdc counters list
cli-anything-renderdoc -c frame.rdc counters fetch --ids 1,2,3

プレビューバンドル

RenderDoc のプレビューサポートは、ライブのクリエイティブプレビューではなく、 正確なキャプチャ検査のためのものです。

# List preview recipes
cli-anything-renderdoc -c frame.rdc --json preview recipes

# Capture a preview bundle for the active capture or a specific event
cli-anything-renderdoc -c frame.rdc --json preview capture --recipe quick --event-id 42

# Capture a diff preview bundle for two events or captures
cli-anything-renderdoc -c frame.rdc --json preview diff 100 200
cli-anything-renderdoc -c a.rdc --json preview diff 100 200 --capture-b b.rdc

# Return the latest existing bundle for the capture
cli-anything-renderdoc -c frame.rdc --json preview latest --recipe quick

一般的なプレビューバンドルの内容:

  • キャプチャのサムネイル
  • 出力ターゲットの画像
  • pipeline_state.json
  • action_summary.json

差分バンドルにはさらに以下が含まれます:

  • A/B サムネイル
  • A/B 出力ターゲットの画像
  • pipeline_diff.json

RenderDoc は現在、ライブプレビューセッションを公開していません。代わりに、 各キャプチャ/差分バンドルは安定したレシピレベルの trajectory.json に追記されます。

ビューアーコマンド:

cli-hub previews inspect /path/to/bundle
cli-hub previews html /path/to/bundle -o page.html
cli-hub previews open /path/to/bundle

JSON モード

すべてのコマンドは機械可読な出力のための --json をサポートしています:

cli-anything-renderdoc -c frame.rdc --json actions summary

環境変数

変数説明
RENDERDOC_CAPTUREデフォルトのキャプチャファイルパス
PYTHONPATHRenderDoc のパスを含める必要があります

エージェント利用時の注意事項

  • シェーダーを抽出するには pipeline shader-export を使用してください — バイナリシェーダー(DXBC/SPIR-V)の場合は、埋め込まれた HLSL/GLSL ソースを自動エクスポートするか、逆アセンブリにフォールバックします。テキストシェーダー(GLSL/HLSL)の場合は、生のソースを直接保存します
  • キャプチャ API ごとのシェーダーフォーマット:
    • D3D11 → DXBC バイナリ。埋め込まれた HLSL ソース(.hlsl)またはバイトコード asm(.dxbc.asm)としてエクスポートされます
    • OpenGL/GLES → GLSL ソーステキスト(.glsl)。すでに人間が読める形式です
    • Vulkan → SPIR-V バイナリ。埋め込まれた GLSL ソース(.glsl)または SPIR-V asm(.spv.asm)としてエクスポートされます
  • 2 つのイベントを比較するには pipeline diff を使用してください — JSON ファイルを書き出し、パスのみを出力します。2 つ目のキャプチャには -b を使用してください
  • プログラムから利用する場合は常に --json を指定してください
  • キャプチャの複雑さを把握するには、まず actions summary を使用してください
  • 実際のレンダリングに注目するには actions list --draws-only を使用してください
  • エージェントが生のリプレイ呼び出しだけでなく、ポータブルで正確な検査バンドルを必要とする場合は、preview capture または preview diff を使用してください
  • 永続的なキャプチャ/差分履歴が必要な場合は、プレビュー JSON から _trajectory_path を読み取ってください
  • すでに生成されたバンドルを検査/開く場合にのみ cli-hub previews ... を使用してください
  • パイプラインステートにはアクション一覧のイベント ID が必要です
  • テクスチャの保存でサポートされる形式: png、jpg、bmp、tga、hdr、exr、dds
  • バッファデータは hex、float32、uint32、または生のバイトとしてデコードできます

コメント