Commit Graph
9 Commits
Author SHA1 Message Date
shenleiandClaude Opus 5.5 df87bc64eb Drop the extra full-screen copy at render scale < 1
The SDL_GPU pipeline renders into its own view-sized colour target and
already composites it over the whole render target, so routing it through
gpu_scene_texture cost one extra same-size copy per frame. The scaled
intermediate is now used only by the SDL geometry fallback; the hardware
composite upscales with linear filtering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:19:51 +09:00
shenleiandClaude Opus 5.5 45644183b0 render: read every draw's transform from the instance buffer
The per-batch transforms are already uploaded to the storage buffer, so
draws use firstInstance = batch index and the 288-byte uniform header is
pushed once per frame; fragment params are pushed only on change.
Texture eviction sorts inactive images once instead of rescanning the
map per evicted image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:36:23 +09:00
shenleiandClaude Opus 5.5 5079c71f2e render: batch texture and mesh uploads into the frame command buffer
Texture() and Resident() stage their bytes on the CPU; Render copies
everything in one transfer buffer and copy pass (plus mip generation)
at the start of its own command buffer instead of acquiring and
submitting a command buffer per resource.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:35:26 +09:00
shenleiandClaude Opus 5.5 aaee4c8f70 render: pack HardwareVertex from 88 to 48 bytes
Colour as UBYTE4_NORM, normals as SHORT4_NORM (unit direction, the
shader renormalises), bones as UBYTE4 and weights as USHORT4_NORM.
Shader inputs keep their float/uint types, so the shaders are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:33:19 +09:00
shenleiandClaude Opus 5.5 f03f63e700 render: draw tri-groups as index sub-ranges of one resident mesh
Render3DDraw/HardwareBatch carry first_index/index_count; resident
meshes are uploaded once per model and groups draw with firstIndex.
Bumps sdk to 9ec7fa1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:27:05 +09:00
shenleiandClaude Opus 5.5 d5333745c5 Generate mip chains for GPU scene textures
Textures were created with one level while the sampler requested linear
mip filtering (and max_lod defaulted to 0). Allocate the full chain,
generate it after upload, and let the sampler use it, so minified
terrain and props stop shimmering and read less bandwidth. Budget
accounting includes the extra third.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:20:29 +09:00
shenleiandClaude Opus 5.5 837ccc2f31 Share GPU skinning palette per instance; push it once per change
Render3DDraw/HardwareBatch hold the SDK's shared palette instead of
copying 16 floats per bone per draw, and HardwareScene re-pushes the
uniform only when the palette pointer changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:12:14 +09:00
shenleiandClaude Opus 5.5 66955ef6ad Fix MSL ambiguous conditional across address spaces in hardware scene shader
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:08:13 +09:00
shenandshen 281418f351 Fix cross-platform rendering and optimize frame performance
Correct selection orientation, game-entry lifecycle, mounted NPCs, labels and skill panels. Add the native GPU scene path, resident geometry, bounded texture and Python caches, and collision broad phase.

Pin the independently maintained Metin2 SDK through a submodule and document reproducible setup. Include rendering regressions and macOS packaging improvements.

Validation: client Debug build and 12 targeted client tests passed; SDK build and all 14 SDK tests passed.
2026-10-11 17:55:53 -07:00