< Previous | Contents | Next >
_tex2DSamplerVec4(tex, sampler, x, y) and _tex2DSamplerVecN(tex, sampler, x, y, order) read a float4 vector of RGBA color values from a given texture tex at the specified x and y coordinates, using the coordinate space, pixel filtering, and edge behavior modes given to an additional sampler, which is set up with the AddSampler() function.
_tex2DSamplerVecN() also takes an order parameter, which is a bitmask describing which channels to read. Pass 15 to return all four RGBA channels, or pass 1 to read just the alpha value and return it in all four RGBA channels.