While in GLSL 100 you'd get a color from a texture by using the appropriate methods, such asĀ texture2D, in GLSL 300 ES, shaders automatically detect the type based on the sampler type in use. For example, consider the following in GLSL 100:
uniform sampler2D uSome2DTexture;
uniform samplerCube uSomeCubeTexture;
void main(void) {
vec4 color1 = texture2D(uSome2DTexture, ...);
vec4 color2 = textureCube(uSomeCubeTexture, ...);
}
This would be updated to the following in GLSL 300 ES:
uniform sampler2D uSome2DTexture;
uniform samplerCube uSomeCubeTexture;
void main(void) {
vec4 color1 = texture(uSome2DTexture, ...);
vec4 color2 = texture(uSomeCubeTexture, ...);
}