/[libvob]/libvob/vob/fillet/light3d.py
ViewVC logotype

Diff of /libvob/vob/fillet/light3d.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by tjl, Sat Jun 28 13:42:37 2003 UTC revision 1.15 by tjl, Sat Jun 28 14:35:39 2003 UTC
# Line 60  edgefp = GL.createProgram(cg.compile(""" Line 60  edgefp = GL.createProgram(cg.compile("""
60  void main(  void main(
61      float4 incol: COLOR0,      float4 incol: COLOR0,
62      float4 qpos : TEXCOORD0,      float4 qpos : TEXCOORD0,
63      uniform sampler2D tex0,      float4 wpos : WPOS,
64        uniform samplerRECT tex0,
65      out float4 col : COLOR) {      out float4 col : COLOR) {
66      // float2 tc = wpos.xy / 1024.0;      // float2 tc = wpos.xy / 1024.0;
67      // tc.y = tc.y + 1 - 768 / 1024.0;      // tc.y = tc.y + 1 - 768 / 1024.0;
68      float2 tc = qpos.xy;      // float2 tc = qpos.xy;
69      tc.y = 1-tc.y;      // tc.y = 1-tc.y;
70      // tc.y = tc.y * 768 / 1024;      // tc.y = tc.y * 768 / 1024;
71      // tc.y += (1-768/1024.0);      // tc.y += (1-768/1024.0);
72        float2 tc = wpos.xy;
73    
74      float d = tex2D(tex0, tc).w;      float d = texRECT(tex0, tc).x;
75      float d1 = tex2D(tex0, tc + float2(0,2/1024.0)).x;  //    float d1 = tex2D(tex0, tc + float2(0,2/1024.0)).x;
76      float d2 = tex2D(tex0, tc + float2(0,-2/1024.0)).x;  //    float d2 = tex2D(tex0, tc + float2(0,-2/1024.0)).x;
77      float d3 = tex2D(tex0, tc + float2(2/1024.0,0)).x;  //    float d3 = tex2D(tex0, tc + float2(2/1024.0,0)).x;
78      float d4 = tex2D(tex0, tc + float2(-2/1024.0,0)).x;  //    float d4 = tex2D(tex0, tc + float2(-2/1024.0,0)).x;
79    /*
80      float4 color;      float4 color;
81      float lim = .001;      float lim = .001;
82      float diff = (      float diff = (
# Line 93  void main( Line 95  void main(
95      color.w = diff > 0 ? 1 : 0;      color.w = diff > 0 ? 1 : 0;
96      color.w = 1;      color.w = 1;
97    
98      color.xyz = (d-.53) * 100 + .5;  */
99        float4 color;
100        color.xyz = d;
101        color.xyz = (d-.53) * 40 + .5;
102      // 10000 *abs(d1-d);      // 10000 *abs(d1-d);
103        /*
104      float f = max(      float f = max(
105          abs(d1-d),          abs(d1-d),
106          max(          max(
# Line 102  void main( Line 108  void main(
108              max(              max(
109                  abs(d3-d),                  abs(d3-d),
110                  abs(d4-d))));                  abs(d4-d))));
111    */
112        color.w = 1;
113    
114      col = color;      col = color;
115  }  }
116            
117  """, "arbfp1"))  """, "fp30"))
   
118    
119  commonkeys = [  commonkeys = [
120              SlideLin("angle", 1, .05, "tan(meet angle)", "+", "-"),              SlideLin("angle", 1, .05, "tan(meet angle)", "+", "-"),

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26