Skip to content

Clear every frame (in-game trails) and add a GL probe to diagnostics - #23

Merged
matthewcodergamer merged 1 commit into
masterfrom
render360/iphone-baseline-lowmem
Oct 10, 2026
Merged

matthewcodergamer merged 1 commit into
masterfrom
render360/iphone-baseline-lowmem

Conversation

@matthewcodergamer

Copy link
Copy Markdown
Owner

Problem

In game, moving the camera leaves stacked, ghosted copies of geometry, and colours run to white/blue/cyan. Still frames (main menu, pause screen) look right, so something from earlier frames is surviving into later ones.

Changes

  • +gl_clear 1. The client clears the colour buffer at the start of every view, so nothing from a previous frame can carry over.

  • GL probe in the render worker. It shadows the state the engine sets through WebGL. On frames 5, 30, 120, 300 and 600, then every 900th frame, it logs a [Render360 GL] line into Copy diagnostics with:

    • draws, blended draws and their blend factors
    • draws without depth test or depth writes
    • every clear, with the scissor and mask state it ran under
    • framebuffer switches
    • glGetError

    The probe needs no per-draw GPU queries. One test run on the phone will show what the engine is actually doing.

Checks

  • node --check emscripten/pre.js passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qy5DKdwTqGQqScWvJyNcft


Generated by Claude Code

…tics

In game, moving the camera leaves stacked, ghosted copies of geometry and
colours run to white/blue/cyan, while still frames (menu, pause) look
right: something from earlier frames survives into later ones.

- Run with gl_clear 1, so the client clears the colour buffer at the
  start of every view and nothing from a previous frame can carry over.
- Add a GL probe in the render worker: it shadows the state the engine
  sets through WebGL and, for a few frames (5, 30, 120, 300, 600, then
  every 900), logs draws, blended draws and their factors, draws without
  depth test or depth writes, every clear with the scissor/mask state it
  ran under, framebuffer switches and glGetError, as "[Render360 GL]"
  lines in Copy diagnostics. It needs no GPU queries per draw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qy5DKdwTqGQqScWvJyNcft
@matthewcodergamer
matthewcodergamer merged commit e972b3e into master Oct 10, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
portal-iphone-staging — f5fec1f5 Deployed Oct 10, 2026 by matthewcodergamer via Deploy iPhone staging page #328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants