/[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.2 by jvk, Fri Jun 27 07:55:56 2003 UTC revision 1.3 by jvk, Fri Jun 27 09:11:47 2003 UTC
# Line 43  void main( Line 43  void main(
43    
44  """, "arbvp1")),  """, "arbvp1")),
45  ]  ]
46    
47    edgefp = GL.createProgram(cg.compile("""
48    void main(
49        float4 incol: COLOR0,
50        float4 wpos : WPOS,
51        uniform sampler2D tex0,
52        out float4 col : COLOR) {
53        float2 tc = wpos.xy / 1024.0;
54        float d = tex2D(tex0, tc).w;
55        float d1 = tex2D(tex0, tc + (0,1/1024.0)).w;
56        float d2 = tex2D(tex0, tc + (0,-1/1024.0)).w;
57        float d3 = tex2D(tex0, tc + (1/1024.0,0)).w;
58        float d4 = tex2D(tex0, tc + (-1/1024.0,0)).w;
59    
60        float4 color;
61        color.xyz = 100*(abs(d1-d) + abs(d2-d) + abs(d3-d) + abs(d4-d));
62        color.y = (d > .5 ? 1 : 0);
63        color.xz = 0;
64        color.x = tex2D(tex0, tc).x;
65        color.y = (d == 1 ? 1 : 0);
66        // color.z = wpos.x / 1024;
67        color.w = 1;
68    
69        col = color;
70    }
71        
72    """, "fp30"))

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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