Fix ant rendering GLSL version mismatch causing phantom food carry

The ant rendering ShaderMaterial was missing glslVersion: THREE.GLSL3
while every other material in the project had it. The vert shader used
varying (GLSL1) and the frag used in (GLSL3), causing vIsCarryingFood
to receive garbage values — making all ants appear to carry food from
the first frame regardless of actual state.

Also reverts the debug +20 cell spawn height offset.
This commit is contained in:
Jared Miller 2026-03-12 10:25:34 -04:00
parent 5d25218433
commit c8a07d0783
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C
2 changed files with 3 additions and 2 deletions

View file

@ -99,6 +99,7 @@ export default class ScreenScene extends AbstractScene {
vertexShader: vertexShaderAnts, vertexShader: vertexShaderAnts,
fragmentShader: fragmentShaderAnts, fragmentShader: fragmentShaderAnts,
transparent: true, transparent: true,
glslVersion: THREE.GLSL3,
}); });
this.createInstancedAntsMesh(); this.createInstancedAntsMesh();

View file

@ -3,8 +3,8 @@ precision highp int;
#define PI 3.1415926535897932384626433832795 #define PI 3.1415926535897932384626433832795
varying vec2 vUv; out vec2 vUv;
varying float vIsCarryingFood; out float vIsCarryingFood;
uniform sampler2D tData; uniform sampler2D tData;