nuclear@1: uniform sampler2D tex; nuclear@1: nuclear@1: varying vec3 vpos, norm; nuclear@1: varying vec2 texcoord; nuclear@1: nuclear@1: void main() nuclear@1: { nuclear@1: vec3 n = normalize(norm); nuclear@1: vec3 ldir = normalize(vec3(-0.5, 0.5, 2)); nuclear@1: nuclear@1: float ndotl = max(dot(n, ldir), 0.0); nuclear@1: nuclear@1: vec3 color = vec3(0.8, 0.8, 0.8) * ndotl; nuclear@1: nuclear@1: vec4 tex = texture2D(tex, texcoord.xy); nuclear@1: nuclear@1: nuclear@1: gl_FragColor.rgb = color * tex.rgb; nuclear@1: gl_FragColor.a = tex.a; nuclear@1: }