Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: conformance/shaders/misc/shared-a.frag

Issue 8344024: Remove older revision of webgl conformance tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/webgl/sdk/tests/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « conformance/shaders/misc/shared.vert ('k') | conformance/shaders/misc/shared-b.frag » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // shared fragment shader should succeed.
2 precision mediump float;
3 uniform vec4 lightColor;
4 varying vec4 v_position;
5 varying vec2 v_texCoord;
6 varying vec3 v_surfaceToLight;
7
8 uniform vec4 ambient;
9 uniform sampler2D diffuse;
10 uniform vec4 specular;
11 uniform float shininess;
12 uniform float specularFactor;
13 // #fogUniforms
14
15 vec4 lit(float l ,float h, float m) {
16 return vec4(1.0,
17 max(l, 0.0),
18 (l > 0.0) ? pow(max(0.0, h), m) : 0.0,
19 1.0);
20 }
21 void main() {
22 vec4 diffuseColor = texture2D(diffuse, v_texCoord);
23 vec4 normalSpec = vec4(0,0,0,0); // #noNormalMap
24 vec3 surfaceToLight = normalize(v_surfaceToLight);
25 vec3 halfVector = normalize(surfaceToLight);
26 vec4 litR = lit(1.0, 1.0, shininess);
27 vec4 outColor = vec4(
28 (lightColor * (diffuseColor * litR.y + diffuseColor * ambient +
29 specular * litR.z * specularFactor * normalSpec.a)).rgb,
30 diffuseColor.a);
31 // #fogCode
32 gl_FragColor = outColor;
33 }
34
OLDNEW
« no previous file with comments | « conformance/shaders/misc/shared.vert ('k') | conformance/shaders/misc/shared-b.frag » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698