AI Command Lab // Flight Simulator
306C: The Vertex Pulse
Initial AI Output (Fragile)
// AI-Generated Code: CPU Bottleneck
void Update() {
Mesh mesh = GetComponent<MeshFilter>().mesh;
Vector3[] verts = mesh.vertices;
// Audit Fail: Looping through 10,000 vertices on the CPU every frame.
for(int i=0; i<verts.Length; i++) { ... }
mesh.vertices = verts;
}
Initial AI Prompt
"You ask the AI: "Make the flag wave in the wind.""
Pilot Comm Link
Mission Objective: A skilled Navigator directs the AI to move Vertices on the GPU.
Optimized Protocol
// Corrected: Zero CPU Cost // HLSL Vertex Function output.positionOS.y += sin(_Time.y * _Speed + input.positionOS.x);