You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't a bug, but rather a suggestion for making the cube example more helpful for noobs (like me).
In the cube example, a_tex_coord is an ivec2/[i8; 2], which led me to assume that it is supposed to be an index. Of course, if I knew how texture() works in fragment shaders, I would have known better -- but I didn't, because I'm a noob. I assumed that a_tex_coord was a 2d-index into my texture, rather than a point in the unit square.
Perhaps a_tex_coord should be changed to be of the type vec2 in GLSL and [f32; 2] in Rust? Having it be an integer is useful only in the case of a texture of size no greater than 2x2, which is a rare use-case.
If there's no reason against making this change, I'll gladly open a PR myself. But I have the suspicion that I simply don't have the relevant context, and that there's a good reason the code is as-is.
The text was updated successfully, but these errors were encountered:
This isn't a bug, but rather a suggestion for making the cube example more helpful for noobs (like me).
In the cube example,
a_tex_coord
is anivec2
/[i8; 2]
, which led me to assume that it is supposed to be an index. Of course, if I knew howtexture()
works in fragment shaders, I would have known better -- but I didn't, because I'm a noob. I assumed thata_tex_coord
was a 2d-index into my texture, rather than a point in the unit square.Perhaps
a_tex_coord
should be changed to be of the typevec2
in GLSL and[f32; 2]
in Rust? Having it be an integer is useful only in the case of a texture of size no greater than 2x2, which is a rare use-case.If there's no reason against making this change, I'll gladly open a PR myself. But I have the suspicion that I simply don't have the relevant context, and that there's a good reason the code is as-is.
The text was updated successfully, but these errors were encountered: