Skip to content

Commit

Permalink
fix(BatchedText): Fix texel read for taller data texture
Browse files Browse the repository at this point in the history
  • Loading branch information
lojjic committed Nov 9, 2024
1 parent afcf40d commit 57f3b0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/troika-three-text/src/BatchedText.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function createBatchedTextMaterial (baseMaterial) {
vec4 troikaGetTexel(float i) {
float w = ${texSizeUniformName}.x;
vec2 uv = (vec2(mod(i, w), floor(i / w)) + 0.5) / w;
vec2 uv = (vec2(mod(i, w), floor(i / w)) + 0.5) / ${texSizeUniformName};
return texture2D(${texUniformName}, uv);
}
vec3 troikaFloatToColor(float v) {
Expand Down

0 comments on commit 57f3b0b

Please sign in to comment.