Tier 4 Series 306

306G: The Graphics Exam

Capstone Exam
Pilot Record
Student Profile
"The simulation visuals are failing. The ocean is freezing the CPU, the shaders are using heavy branching logic, and the asteroid field is killing the frame rate. Identify the three critical rendering failures."

Target Asset for Audit

FRAGILE_CODE_DETECTED
using UnityEngine;

public class OceanRenderer : MonoBehaviour {
    public MeshFilter oceanMesh;
    
    void Update() {
        // Audit Requirement: Lesson 306C (Vertex Shader)
        // Error 1: CPU Vertex Animation
        Vector3[] verts = oceanMesh.mesh.vertices;
        for(int i=0; i<verts.Length; i++) {
            verts[i].y = Mathf.Sin(Time.time + verts[i].x);
        }
        oceanMesh.mesh.vertices = verts;

        // Audit Requirement: Lesson 306D (Instancing)
        // Error 2: Material cloning
        GetComponent<Renderer>().material.color = Color.blue;
    }

    // Shader Code Snippet included in exam context:
    // float4 frag(v2f i) : SV_Target {
    //    // Audit Requirement: Lesson 306B (HLSL)
    //    // Error 3: Branching
    //    if (i.uv.x > 0.5) return float4(1,0,0,1);
    //    else return float4(0,0,1,1);
    // }
}

Supervisor's Certification

Authenticated Pilot
pilot_bf3320d89a9749d5
Session Secure

Failure Point #1

Vertex Bottleneck

The ocean vertices are being animated on the CPU. Command the AI to move this logic to the GPU.

Failure Point #2

Batch Breaking

The script accesses .material, creating unique instances. Command the AI to use Property Blocks.

Failure Point #3

Shader Branching

The fragment shader uses an if/else statement. Command the AI to use HLSL math functions.