Skip to content

Render screens via texture + shader; fix GraphicalAPI off-by-ones; glibc lua runtime - #28

Merged
rabiesland merged 1 commit into
redtoast:live-1.21.1from
SpartanSf:shader-screen-rendering
Sep 18, 2026
Merged

rabiesland merged 1 commit into
redtoast:live-1.21.1from
SpartanSf:shader-screen-rendering

Conversation

@SpartanSf

Copy link
Copy Markdown
Collaborator

Screen rendering overhaul

Replaces the per-sector rectangle rendering for computer GUIs (RGBGraphicsScreen) and in-world color displays (ColorDisplayRenderer) with a single textured quad driven by a new core shader:

  • New neetcomputers:screen_display shader (assets/neetcomputers/shaders/core/) performs the 3x nearest-neighbor upscale + bilinear downscale entirely on the GPU via texelFetch.
  • Sectors are rasterized once into a dedicated mipmap-free NativeImageBackedTexture (graphics/client/ScreenTexture), uploaded only when the frame changes. Sector encoding is unchanged on the wire.
  • Fixes missing / half-drawn pixels and shimmer caused by rectangle seams, rasterization rules and block-atlas mipmaps. Falls back to the vanilla textured shader if the custom program hasn't loaded.

GraphicalAPI off-by-one fixes

  • fill() opaque fast path dropped the last row (i < y2 instead of i <= y2), leaving 1px black gaps (e.g. black lines between terminal rows). Reproduced with the real classes (60 gap rows on a 60-row terminal simulation) and verified 0 after the fix.
  • writeLine() never painted its endpoint; clone() built the layer 1px too small in each dimension.

Linux x86-64 natives rebuilt for glibc

The bundled yslua.so/bridge.so were linked against musl (NEEDED libc.musl-x86_64.so.1) and failed to link on glibc distros (Failed to link NeetComputer lua runtime for platform linux-amd64). Rebuilt from Neet-YSLua via scripts/build-all.sh linux-x86_64; new binaries only need libm/libc/libstdc++/libgcc_s. Smoke-tested with dlopen, JNI symbols + version handshake verified, full ./gradlew build passes.

…ibc lua runtime

- Replace per-sector rectangle rendering with a single textured quad
  driven by the new neetcomputers:screen_display core shader (3x
  nearest upscale + bilinear downscale on the GPU). Fixes missing /
  half-drawn pixels and shimmer from rectangle seams and atlas mipmaps.
- Fix off-by-one in GraphicalAPI.fill opaque path (dropped the last
  row, leaving black lines between terminal rows), writeLine endpoint,
  and clone layer size.
- Rebuild linux-x86_64 natives against glibc (were musl-linked and
  failed to link on glibc distros).
@rabiesland
rabiesland merged commit bb8db49 into redtoast:live-1.21.1 Sep 18, 2026
1 check passed
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