File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
worldwind/src/main/res/raw Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
#ifdef GL_FRAGMENT_PRECISION_HIGH
7
7
precision highp float ;
8
+ uniform highp sampler2D depthSampler;
8
9
#else
9
10
precision mediump float ;
11
+ uniform mediump sampler2D depthSampler;
10
12
#endif
11
13
12
14
uniform float range;
13
15
uniform vec4 color[2 ];
14
- uniform sampler2D depthSampler;
15
16
16
17
varying vec4 sightlinePosition;
17
18
varying float sightlineDistance;
@@ -32,7 +33,7 @@ void main() {
32
33
/* Compute a mask that's on when the object's depth is less than the sightline's depth. The depth texture contains
33
34
the scene's minimum depth at each position, from the sightline's point of view. */
34
35
vec3 sightlineCoord = clipCoord * 0.5 + 0.5 ;
35
- float sightlineDepth = texture2D (depthSampler, sightlineCoord.xy).z ;
36
+ float sightlineDepth = texture2D (depthSampler, sightlineCoord.xy).r ;
36
37
float occludeMask = step (sightlineDepth, sightlineCoord.z);
37
38
38
39
/* Modulate the RGBA color with the computed masks to display fragments according to the sightline's configuration. */
You can’t perform that action at this time.
0 commit comments