I see in some sample shaders theres a sampler2d _MainTex and theres a float4 _MainTex_ST although i dont see it being used anywhere. What does _ST do, where in the documents is such stuff explained i looked everywhere.
Okay, after some deepsearch _ST is used in the TRANSFORM_TEX function in UnityCG.cginc / Transforms float2 UV by scale/bias property #define TRANSFORM_TEX(tex,name) (tex.xy * name##_ST.xy + name##_ST.zw) I think the shaderlab needs better documentation about the include files and tidying up on related topics.
This is used to specify tiling and offset for each texture. See the tiling and offset parameters next to each texture box? Their values are contained in this _ST variable to be used in TRANSFORM_TEX.
S and T are commonly used variables for texturing in a variety of shader languages. If each element in 3D space has an x/y/z coordinate, there's a corresponding 2D S/T coordinate.... this is also often termed UV. S goes across the X axis typically, and T would go along the Y axis.
Okay, i get it. It was confusing at first. Finally, this _ST thing is only used in one specific unity function TRANSFORM_TEX which just multiplies the uv with tiling and offset values as pilyala already mentioned. Thanks.
That kind of makes sense...but ST is usually screenspace and UV is model (not talking about Unity, just generally). Hmm. Interesting that it's set up like that.
S and T are just more consecutive letters in the alphabet. They often get used for texture space, or parameterized surface space, but they do not have a standard definition. In this case, they're two numbers that get applied to UV coordinates, so they get the next two letters.