/[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.17 by tjl, Sun Jun 29 08:26:51 2003 UTC revision 1.18 by tjl, Sun Jun 29 08:29:34 2003 UTC
# Line 57  void main( Line 57  void main(
57  ]  ]
58    
59  edgefp = GL.createProgram(cg.compile("""  edgefp = GL.createProgram(cg.compile("""
60    float dep(float2 tc, uniform samplerRECT tex0) {
61        float4 dotvec = {
62                1./(256*256)
63                ,
64                1./(256)
65                ,
66                1
67                ,
68                0
69                };
70        float4 d = texRECT(tex0, tc);
71        return dot(d, dotvec);
72    }
73    
74  void main(  void main(
75      float4 incol: COLOR0,      float4 incol: COLOR0,
76      float4 qpos : TEXCOORD0,      float4 qpos : TEXCOORD0,
# Line 71  void main( Line 85  void main(
85      // tc.y += (1-768/1024.0);      // tc.y += (1-768/1024.0);
86      float2 tc = wpos.xy;      float2 tc = wpos.xy;
87    
88      float4 dotvec = {      float de = dep(tc, tex0);
             1./(256*256)  
             ,  
             1./(256)  
             ,  
             1  
             ,  
             0  
             };  
   
     float4 d = texRECT(tex0, tc);  
89    
     float de = dot(d, dotvec);  
90    
91  //    float d1 = tex2D(tex0, tc + float2(0,2/1024.0)).x;  //    float d1 = tex2D(tex0, tc + float2(0,2/1024.0)).x;
92  //    float d2 = tex2D(tex0, tc + float2(0,-2/1024.0)).x;  //    float d2 = tex2D(tex0, tc + float2(0,-2/1024.0)).x;
# Line 110  void main( Line 113  void main(
113    
114  */  */
115      float4 color;      float4 color;
     color.xyz = d;  
116      color.xyz = (de-.00199) * 1000;      color.xyz = (de-.00199) * 1000;
117      // 10000 *abs(d1-d);      // 10000 *abs(d1-d);
118      /*      /*

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

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