EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.42k stars 2.92k forks source link

spine-player (ts) rendering fails on Android Chrome #2600

Closed MattJustMatt closed 3 months ago

MattJustMatt commented 3 months ago

chromium [ERROR:gles2_cmd_decoder.cc(9550)] [.WebGL-0x201b50e00]RENDER WARNING: texture bound to texture unit 0 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?

This error only occurs on Android Chrome. iOS and other Chrome browsers are fine.

If it's helpful here is the spine files we're loading into the spine player: https://drive.google.com/drive/folders/1yaaUu8YwgJMDeUjUFq8zPtXimnxutI6b?usp=sharing

And our spine init config:


new SpinePlayer("container", {
        jsonUrl: "https://thumbnails.r2.allout.game/playercharacter-3.json",
        atlasUrl: "https://thumbnails.r2.allout.game/playercharacter-3.atlas.txt",
        animations: ["Player_Shop/Idle"],
        showControls: false,
        backgroundColor: "#00000000",
        alpha: true,
        preserveDrawingBuffer: true,
        showLoading: false,
        defaultMix: 1,
        viewport: {
          x: -350,
          y: -100,
          width: 600,
          height: 700,
          padLeft: "0%",
          padRight: "15%",
          padTop: "8%",
          padBottom: "0%",
          // debugRender: true,
        },
        // nobody knows
        scale: 2,
        success: (player: SpinePlayer) => {
          setSkins(skins);
          setReady(true);
        },
      });
davidetan commented 3 months ago

I've noticed that your atlas is huge: 8192 × 2348. That's probably your issue. Try to reduce its size keeping max width/height <= 4096. Try also 2048 if that does not work.

davidetan commented 3 months ago

I'll close this one. If the solution above does not solve your problem, you can write a new message here :)