Fighting Game · Guides & deep dives

V2 Shader Cooking

A guides & deep dives document in the Fighting Game library.

0sections1 minread

On this page

V2/ue/Tools/plan-v2-shader-cooking.py expands V2/ue/Build/Cooking/v2-shader-cooking.json into deterministic Unreal commandlet commands for shader source sets and compiler targets.

Source coverage is WGSL and GLSL. The compiler targets emit SPIR-V for Vulkan, DXIL for DX12, MSL for Metal, and normalized WGSL for WebGPU. Each command includes entry points, permutation dimensions, reflection output, a deterministic cache key, and a dependency sidecar ending in *.v2deps.json.

Required gates:

  • shader-cooking-plan-generated
  • shader-cooking-spirv-targets
  • shader-cooking-dxil-targets
  • shader-cooking-msl-targets
  • shader-cooking-wgsl-targets
  • shader-cooking-permutation-commands

The primary metrics are cook.shader.spirv_target_count, cook.shader.dxil_target_count, cook.shader.msl_target_count, cook.shader.wgsl_target_count, and cook.shader.permutation_command_count. The CI validator is:

bash
python3 V2/ue/Tools/check-v2-shader-cooking.py