2 * \file texture2d_modulate.glsl
3 * \brief Determine fragment color with 2D texture modulation,
4 * provides external function applyTexture() to fragment shader.
9 uniform sampler2D texture0;
12 vec4 applyTexture(const in vec4 texCoord, const in vec4 emissionAmbientDiffuse,
13 const in vec4 specular) {
14 vec4 texColor = texture(texture0, texCoord.st);
15 return clamp(emissionAmbientDiffuse * texColor + specular, 0., 1.);