GPT Image 2.5 Flare & Sunburst are live on EvoLinkTry GPT Image 2.5
A metal sphere with smooth and faceted surfaces divided by glass
Use Cases

How to Debug Rendering Artifacts with Code and Screenshots

EvoLink Team
EvoLink Team
Product Team
October 16, 2026
6 min read

Your object appears in the wrong place, but the shader compiles. A screenshot shows the symptom; the code shows several plausible causes. Asking AI to “fix the image” without the camera, matrices, or expected result encourages a convincing guess.

Supply a reproducible scene and ask for one testable hypothesis at a time. Compare pixels and execution state from the same revision, then use a numeric or render test to decide whether the proposed fix addresses the defect.

Prepare a rendering evidence pack

Include the renderer/API, relevant shader stages, uniform values, geometry, viewport, camera, expected result, actual frame, and reproduction action. Record graphics errors and compile/link diagnostics as observations, not a summary saying “everything is fine.”

EvidenceUseful contentWhat a screenshot alone cannot establish
Expected and actual frameSame camera and resolution, marked affected regionWhich transform or state caused the difference
Shader and uniformsExact revision, matrix convention, valuesWhether the host uploaded the intended values
Draw setupGeometry, attribute layout, depth/cull/blend stateWhich objects were actually drawn
ReproductionMinimal scene and stepsWhether a suggested patch fixes another scene

A missing texture and incorrect lighting may look similar at thumbnail size. Supply an uncompressed crop where practical and avoid changing the camera between comparison frames.

A transform-order example with a checkable expectation

The fictional scene uses column-vector multiplication. Positions must move from object space through model, view, and projection transforms, in that order. The intended expression is projection * view * model * position, with the rightmost transform applied first.

Suppose the shader contains:

gl_Position = uProjection * uModel * uView * vec4(position, 1.0);
The supplied contract says the model translates x by 2, the view rotates 90 degrees around z, and the projection scales x and y by 0.2. For the local point (1,0,0,1), the intended clip result is (0,0.6,0,1):
Model:      (1,0) -> (3,0)
View:       (3,0) -> (0,3)
Projection: (0,3) -> (0,0.6)
Wrong order: View (1,0)->(0,1), Model ->(2,1), Projection ->(0.4,0.2)
This arithmetic tests the supplied hypothesis independently of whether the image looks attractive. Khronos describes the vertex transformation stages. Matrix layout in host memory and multiplication conventions still need their own check; changing the order is not a universal repair for every renderer.

Ask for a hypothesis, reproduction, and minimal patch

Investigate the supplied rendering mismatch.
Use the shader, host state, expected behavior, actual frame, and revision.
Treat images as observations, not proof of a particular root cause.

Return:
1. observed symptom and the evidence supporting it;
2. ranked hypotheses, with a discriminating test for each;
3. the smallest test for the leading hypothesis;
4. a patch only if the test supports the claim;
5. missing uniforms, state, or context that prevent a conclusion.

Use the stated matrix/vector convention.
Do not rewrite the renderer, change the camera to hide the symptom,
or claim tests were run if you only proposed them.
Inputs: evidence pack and required transform contract.

For this example, the candidate patch is:

gl_Position = uProjection * uView * uModel * vec4(position, 1.0);
On the EvoLink Gemini 4 page, use the Agent or API path for the code review. Attach the actual frame only using the documented image format. You can compare another model through the same gateway with the same evidence pack; model agreement does not replace the test.

For the first code request, provide the stated transform convention and failing shader. Ask for one hypothesis and the minimal patch, then use the numeric fixture to distinguish (0,0.6) from (0.4,0.2) before testing the real frame.

Run a small numeric check before judging the frame

The following JavaScript mirrors the two-dimensional part of this example's transforms:

const model = ([x, y]) => [x + 2, y];
const view = ([x, y]) => [-y, x];
const projection = ([x, y]) => [x * 0.2, y * 0.2];
const correct = projection(view(model([1, 0])));
const wrong = projection(model(view([1, 0])));
if (Math.abs(correct[0]) > 1e-9 || Math.abs(correct[1] - 0.6) > 1e-9) {
  throw new Error("Unexpected reference transform");
}
if (Math.abs(wrong[0] - correct[0]) < 1e-9 &&
    Math.abs(wrong[1] - correct[1]) < 1e-9) {
  throw new Error("Fixture does not distinguish transform order");
}
This validates the arithmetic, not GPU uniform upload or the delivered rendering. For WebGL, check the actual matrix uniform API and its layout requirements. Then render the minimal scene with fixed camera, resolution, and state, comparing the test point and object position before and after.

When the same screenshot could mean another bug

SymptomDiscriminating check
Position changes with camera motionVerify transforms and uploaded values against a known point
Object disappears from one sideInspect winding/culling and view orientation
Correct position but wrong occlusionInspect depth attachment, clear, and comparison state
A texture looks stretched or reversedInspect UVs, image orientation, and sampler data
Only high-density displays differCompare drawing-buffer size with viewport and CSS size

Change one condition at a time. Turning off culling may reveal geometry but does not establish that disabling it is the correct final fix. Save the experiment and its interpretation separately.

Keep a regression scene with the fix

Retain a case where translation and rotation do not commute; identity matrices would hide the bug in this example. Add normal camera motion and representative geometry after the minimal case passes. Compare the same scene revision and note any remaining artifact as a separate issue.

If the dispute is about whether a reviewer's finding is valid, use the code-review verification workflow.

FAQ

Can a screenshot identify the exact root cause?

Usually it supplies a symptom and a location. The code, state, and reproduction distinguish competing causes.

Does a compiled shader prove the math is correct?

No. Valid expressions can apply transformations in the wrong order.

Should I try every suggested patch at once?

Use one hypothesis and test at a time so the result has an interpretable cause.

Does the JavaScript check verify the GPU output?

It checks the stated arithmetic. Rendering and host-state validation are separate steps.

Should the model receive the entire repository?

Start with the scene and relevant state needed to reproduce the mismatch. Add dependencies when a hypothesis requires them.

What belongs in the final bug record?

Revision, inputs, expected and observed behavior, experiment, accepted patch, regression checks, and remaining uncertainty.

Sources

Connect AI models through one API

Compare models and current pricing, then follow the API documentation to integrate your chosen model.