Following up from @kglr 's answer here, I'd like to understand how TextureCoordinateFunction[] works within SurfaceAppearance[]. I'm using
g = Graphics[{White, Thickness[.5], Line /@ Table[{{0, y}, {1, y}}, {y, 0, 20}]},
Background -> Black, PlotRangePadding -> 0];
Graphics3D[{SurfaceAppearance["TextureShading", Texture[g]],
Tube[BSplineCurve[KnotData[{3, 1}, "SpaceCurve"] /@ Subdivide[0, 2 Pi, 100],
SplineClosed -> True], 1]}, Boxed -> False, ImageSize -> Medium,
ViewPoint -> {0.2, 0.2, 3.3}, ViewVertical -> {0, -1, .25}]
but the texture doesn't seem to be aligning correctly. It is turning out like this
rather than this
I have tried applying the TextureCoordinateFunction[] directive inside SurfaceAppearance[], but it doesn't seem to work.