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:
parent
5d25218433
commit
c8a07d0783
2 changed files with 3 additions and 2 deletions
|
|
@ -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();
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue