Hello, I've recently encountered a bug reproducing on multiple samsung devices (galaxy s25 ultra, galaxy s24, galaxy a23) when texts added to a BatchedText would not display. After debugging I localized the problem to the following shader code
vec4 bounds = aTroikaGlyphBounds;
bounds.xz += uTroikaPositionOffset.x;
bounds.yw -= uTroikaPositionOffset.y;
uTroikaPositionOffset is supposed to be a uniform, but BatchedMesh material derivation rewrites it to a simple vec2 global variable. If uTroikaIsOutline is set to true, it is initialized from a texture data, but for a regular non-outline pass it is left uninitialized. For same reason, instead of defaulting to vec2(0, 0), it defaults to vec2(0, 1). I was able to confirm this by passing it as varying to the fragment shader and visualizing it as glFragColor = vec4(vTroikaPositionOffset, 0.0, 1.0); which showed green.
I'm not sure if this is some sort of a regression in samsung chrome for android, but the simplest fix would be to initialize uTroikaPositionOffset = vec2(0., 0.); at the start of main function of a vertex shader.
Hello, I've recently encountered a bug reproducing on multiple samsung devices (galaxy s25 ultra, galaxy s24, galaxy a23) when texts added to a BatchedText would not display. After debugging I localized the problem to the following shader code
uTroikaPositionOffsetis supposed to be a uniform, but BatchedMesh material derivation rewrites it to a simple vec2 global variable. IfuTroikaIsOutlineis set to true, it is initialized from a texture data, but for a regular non-outline pass it is left uninitialized. For same reason, instead of defaulting to vec2(0, 0), it defaults to vec2(0, 1). I was able to confirm this by passing it as varying to the fragment shader and visualizing it asglFragColor = vec4(vTroikaPositionOffset, 0.0, 1.0);which showed green.I'm not sure if this is some sort of a regression in samsung chrome for android, but the simplest fix would be to initialize
uTroikaPositionOffset = vec2(0., 0.);at the start of main function of a vertex shader.