File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <TerrainOverlay transparent =" true" >
2+
3+ <uniform name =" Transparency" type =" float" value =" 0.5" />
4+ <uniform name =" DepthBump" type =" float" value =" 0.0" />
5+ <uniform name =" diffuseMap" type =" sampler2D" value =" 0" />
6+
7+ <vertexProgram >
8+ varying vec2 Texcoord;
9+
10+ void main( void )
11+ {
12+ Texcoord = gl_MultiTexCoord0.xy;
13+ gl_ClipVertex = gl_ModelViewMatrix*gl_Vertex;
14+ gl_Position = ftransform();
15+ }
16+
17+ </vertexProgram ><fragmentProgram >
18+
19+ varying vec2 Texcoord;
20+
21+ uniform float Transparency;
22+ uniform float DepthBump;
23+ uniform sampler2D diffuseMap;
24+
25+ void main( void )
26+ {
27+ vec4 DiffuseColor = texture2D( diffuseMap, Texcoord );
28+ DiffuseColor.a = DiffuseColor.a * Transparency;
29+
30+ gl_FragColor = DiffuseColor;
31+ gl_FragDepth += DepthBump;
32+ }
33+
34+ </fragmentProgram >
35+ </TerrainOverlay >
You can’t perform that action at this time.
0 commit comments