Subversion Repositories AndroidProjects

Rev

Rev 1744 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifdef GL_ES
precision mediump float;
#endif

uniform sampler2D uDiffuse;

varying vec3 vNormal;
varying vec2 vTexCoord;

void main()
{
        float diffuseIntensity = max(0.0, dot(normalize(vNormal), -normalize(vec3(-1, -1, 1))));

        vec4 texColor = texture2D(uDiffuse, vTexCoord);
        vec4 finalColor = texColor * vec4(vec3(diffuseIntensity), 1.0);;
        
        gl_FragColor = finalColor;
        
        /*gl_FragColor = texColor * vec4(diffuseIntensity, diffuseIntensity, diffuseIntensity, 1.0);*/
}