RSS

(root)/iphone/common : 61 : Jigs/source/jigsawPiece.fs

To get this branch, use:
bzr branch /browse/iphone/common

« back to all changes in this revision

Viewing changes to Jigs/source/jigsawPiece.fs

Dömötör Gulyás
2010-01-18 09:03:51
Revision ID: dognotdog@gmail.com-20100118080351-ib2knxvk4w8ssw3h
made common a nested tree

Show diffs side-by-side

added added

removed removed

1
 
/*
2
 
 *  jigsawPiece.fs
3
 
 *  Jigs
4
 
 *
5
 
 *  Created by döme on 04.08.2009.
6
 
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
7
 
 *
8
 
 */
9
 
 
10
 
precision highp float;
11
 
 
12
 
uniform sampler2D       tex0;
13
 
uniform vec4            color;
14
 
 
15
 
varying highp vec3 N;
16
 
varying highp vec2 tx0;
17
 
varying highp vec4 epos;
18
 
 
19
 
void main()
20
 
{
21
 
        vec3 NN = normalize(N);
22
 
//      vec3 lightdir = normalize(epos.xyz); // point light centered at eye
23
 
        vec3 lightdir = vec3(0.0,0.0,-1.0); // directional light
24
 
 
25
 
        lowp vec4 tex0color = texture2D(tex0, tx0);
26
 
        
27
 
        gl_FragColor = vec4(tex0color.rgb, tex0color.a)*color;
28
 
//      gl_FragColor = vec4(1.0,1.0,1.0,1.0);
29
 
//      float diffuse = -dot(NN, lightdir)*(float(gl_FrontFacing)*2.0 - 1.0);
30
 
//      gl_FragColor = vec4(tex0color.rgb*(0.7*diffuse + 0.3), tex0color.a);
31
 
}

Loggerhead 1.17 is a web-based interface for Bazaar branches