<<< The fragment shader code | Index | The fragment shader code, cont. >>> |
Sampling is a process of fetching data from the texture object. The sampling is done in the fragment shader as part of the lighting computation:
|
|
Note: the return value of GLSL texture() call is a vec4, regardless of the image format of the texture, which may be 1D, 2D, 3D, etc.
<<< The fragment shader code | Index | The fragment shader code, cont. >>> |